@lucern/contracts 0.3.0-alpha.1 → 0.3.0-alpha.10
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 +4 -0
- package/dist/component-boundary.contract.d.ts +14 -0
- package/dist/component-boundary.contract.js +155 -0
- package/dist/component-boundary.contract.js.map +1 -0
- package/dist/component-host-boundary.contract.d.ts +41 -0
- package/dist/component-host-boundary.contract.js +54 -0
- package/dist/component-host-boundary.contract.js.map +1 -0
- package/dist/context-pack.contract.d.ts +5 -3
- package/dist/context-pack.contract.js.map +1 -1
- package/dist/{dsl-BgpoVOVQ.d.ts → dsl-djCRfuWC.d.ts} +1 -1
- package/dist/dsl.d.ts +1 -1
- package/dist/dsl.js +1 -4
- package/dist/dsl.js.map +1 -1
- package/dist/edge-policy-manifest-Dw5IhT1L.d.ts +133 -0
- package/dist/function-registry/beliefs.d.ts +41 -41
- package/dist/function-registry/beliefs.js +709 -31
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.js +694 -31
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +13 -13
- package/dist/function-registry/context.js +700 -35
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.js +665 -28
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.js +665 -28
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +156 -0
- package/dist/function-registry/edges.js +876 -60
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +33 -33
- package/dist/function-registry/evidence.js +717 -37
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +131 -53
- package/dist/function-registry/graph.js +781 -35
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +3 -3
- package/dist/function-registry/helpers.js +665 -28
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.js +665 -28
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +321 -7
- package/dist/function-registry/index.js +1046 -33
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +9 -9
- package/dist/function-registry/judgments.js +677 -31
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.js +665 -28
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +17 -17
- package/dist/function-registry/lenses.js +688 -31
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +6 -6
- package/dist/function-registry/manifest.js +18 -2
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/ontologies.d.ts +45 -45
- package/dist/function-registry/ontologies.js +683 -34
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +13 -13
- package/dist/function-registry/pipeline.js +674 -31
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +49 -49
- package/dist/function-registry/questions.js +762 -36
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +17 -17
- package/dist/function-registry/tasks.js +709 -30
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +99 -21
- package/dist/function-registry/topics.js +747 -32
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +1 -1
- package/dist/function-registry/worktrees.d.ts +80 -41
- package/dist/function-registry/worktrees.js +804 -40
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/function-registry-input-audit.d.ts +13 -0
- package/dist/function-registry-input-audit.js +166 -0
- package/dist/function-registry-input-audit.js.map +1 -0
- package/dist/gateway.contract.d.ts +2 -0
- package/dist/gateway.contract.js.map +1 -1
- package/dist/generated/convexSchemas.js +4 -3
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/generated/schema-manifest.json +49 -3
- package/dist/generated/tableOwnership.d.ts +2 -1
- package/dist/generated/tableOwnership.js +2 -0
- package/dist/generated/tableOwnership.js.map +1 -1
- package/dist/generated/tier-expectations.json +4 -2
- package/dist/graph-intelligence.contract.d.ts +506 -0
- package/dist/graph-intelligence.contract.js +595 -0
- package/dist/graph-intelligence.contract.js.map +1 -0
- package/dist/graph-types/index.d.ts +5 -1
- package/dist/graph-types/index.js +15 -4
- package/dist/graph-types/index.js.map +1 -1
- package/dist/{index-CV-0_VWJ.d.ts → index-O09U2xHk.d.ts} +5 -2
- package/dist/index.d.ts +24 -413
- package/dist/index.js +3286 -136
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +174 -0
- package/dist/infisical-runtime.contract.js +317 -0
- package/dist/infisical-runtime.contract.js.map +1 -0
- package/dist/lens-filter.contract.js +4 -3
- package/dist/lens-filter.contract.js.map +1 -1
- package/dist/lens-workflow.contract.js +4 -3
- package/dist/lens-workflow.contract.js.map +1 -1
- package/dist/manifests/edge-policy-manifest.d.ts +2 -0
- package/dist/manifests/edge-policy-manifest.data.d.ts +13 -0
- package/dist/manifests/edge-policy-manifest.data.js +26 -0
- package/dist/manifests/edge-policy-manifest.data.js.map +1 -0
- package/dist/manifests/edge-policy-manifest.js +92 -0
- package/dist/manifests/edge-policy-manifest.js.map +1 -0
- package/dist/manifests/infisical-runtime-manifest.d.ts +151 -0
- package/dist/manifests/infisical-runtime-manifest.js +316 -0
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -0
- package/dist/manifests/invariant-manifest.d.ts +65 -0
- package/dist/manifests/invariant-manifest.js +18 -0
- package/dist/manifests/invariant-manifest.js.map +1 -0
- package/dist/manifests/invariants/ast-utils.d.ts +14 -0
- package/dist/manifests/invariants/ast-utils.js +54 -0
- package/dist/manifests/invariants/ast-utils.js.map +1 -0
- package/dist/manifests/invariants/index.d.ts +15 -0
- package/dist/manifests/invariants/index.js +183 -0
- package/dist/manifests/invariants/index.js.map +1 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +12 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js +94 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +12 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.js +99 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.js.map +1 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +12 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +42 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +1 -0
- package/dist/manifests/tenant-client-manifest.d.ts +322 -0
- package/dist/manifests/tenant-client-manifest.js +432 -0
- package/dist/manifests/tenant-client-manifest.js.map +1 -0
- package/dist/mcp-gateway-boundary.contract.d.ts +181 -0
- package/dist/mcp-gateway-boundary.contract.js +43 -0
- package/dist/mcp-gateway-boundary.contract.js.map +1 -0
- package/dist/projections/check-convex-args-shape.d.ts +3 -0
- package/dist/projections/check-convex-args-shape.js +399 -0
- package/dist/projections/check-convex-args-shape.js.map +1 -0
- package/dist/projections/create-evidence.projection.d.ts +176 -0
- package/dist/projections/create-evidence.projection.js +131 -0
- package/dist/projections/create-evidence.projection.js.map +1 -0
- package/dist/projections/index.d.ts +102 -0
- package/dist/projections/index.js +348 -0
- package/dist/projections/index.js.map +1 -0
- package/dist/projections/list-beliefs.projection.d.ts +36 -0
- package/dist/projections/list-beliefs.projection.js +54 -0
- package/dist/projections/list-beliefs.projection.js.map +1 -0
- package/dist/projections/list-tasks.projection.d.ts +32 -0
- package/dist/projections/list-tasks.projection.js +52 -0
- package/dist/projections/list-tasks.projection.js.map +1 -0
- package/dist/projections/modulate-confidence.projection.d.ts +219 -0
- package/dist/projections/modulate-confidence.projection.js +148 -0
- package/dist/projections/modulate-confidence.projection.js.map +1 -0
- package/dist/projections/projection-dsl.d.ts +11 -0
- package/dist/projections/projection-dsl.js +8 -0
- package/dist/projections/projection-dsl.js.map +1 -0
- package/dist/schema-helpers/enumValidation.js +2 -5
- package/dist/schema-helpers/enumValidation.js.map +1 -1
- package/dist/schema-helpers/spine/nodes/decision.js +2 -1
- 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 +2 -2
- package/dist/schemas/enums.d.ts +5 -2
- package/dist/schemas/enums.js +5 -2
- package/dist/schemas/enums.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +45 -4
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +1030 -890
- package/dist/schemas/manifest.js +44 -3
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/sl-opinion.d.ts +4 -4
- package/dist/schemas/tables/identity/platform.d.ts +10 -10
- package/dist/schemas/tables/kernel/epistemic.d.ts +6 -6
- package/dist/schemas/tables/kernel/infra.d.ts +4 -4
- package/dist/schemas/tables/kernel/intelligence.d.ts +10 -10
- package/dist/schemas/tables/kernel/lens.d.ts +4 -4
- package/dist/schemas/tables/kernel/platform.d.ts +12 -12
- package/dist/schemas/tables/kernel/spine.d.ts +3 -3
- package/dist/schemas/tables/kernel/spine.js +5 -2
- package/dist/schemas/tables/kernel/spine.js.map +1 -1
- package/dist/schemas/tables/kernel/task.d.ts +42 -42
- package/dist/schemas/tables/kernel/topic.js +5 -1
- package/dist/schemas/tables/kernel/topic.js.map +1 -1
- package/dist/schemas/tables/kernel/worktree.d.ts +58 -58
- package/dist/schemas/tables/mc/identity.d.ts +26 -3
- package/dist/schemas/tables/mc/identity.js +35 -1
- package/dist/schemas/tables/mc/identity.js.map +1 -1
- package/dist/schemas/tables/mc/pack.d.ts +20 -20
- package/dist/schemas/tables/mc/registry.d.ts +4 -4
- package/dist/schemas/tables/mc/workspace.d.ts +9 -3
- package/dist/schemas/tables/mc/workspace.js +3 -1
- package/dist/schemas/tables/mc/workspace.js.map +1 -1
- package/dist/sdk-methods.contract.d.ts +2 -2
- package/dist/{sdk-tools.contract-S4ia0TTo.d.ts → sdk-tools.contract-BNklQDfB.d.ts} +2 -2
- package/dist/sdk-tools.contract.d.ts +2 -2
- package/dist/sdk-tools.contract.js +646 -23
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.contract.d.ts +1101 -0
- package/dist/tenant-bootstrap-seed.contract.js +653 -0
- package/dist/tenant-bootstrap-seed.contract.js.map +1 -0
- package/dist/tenant-bootstrap-seed.defaults.d.ts +16 -0
- package/dist/tenant-bootstrap-seed.defaults.js +303 -0
- package/dist/tenant-bootstrap-seed.defaults.js.map +1 -0
- package/dist/tenant-client.contract.d.ts +349 -0
- package/dist/tenant-client.contract.js +488 -0
- package/dist/tenant-client.contract.js.map +1 -0
- package/dist/{tool-contracts-C92-9ueT.d.ts → tool-contracts-BevD9Ho2.d.ts} +36 -2
- package/dist/tool-contracts.d.ts +1 -1
- package/dist/tool-contracts.js +647 -24
- package/dist/tool-contracts.js.map +1 -1
- package/package.json +9 -1
|
@@ -423,7 +423,22 @@ var ADD_WORKTREE = {
|
|
|
423
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.",
|
|
424
424
|
parameters: {
|
|
425
425
|
title: { type: "string", description: "Worktree name/objective" },
|
|
426
|
-
|
|
426
|
+
name: {
|
|
427
|
+
type: "string",
|
|
428
|
+
description: "Optional storage-name alias for callers that already use backend naming"
|
|
429
|
+
},
|
|
430
|
+
projectId: {
|
|
431
|
+
type: "string",
|
|
432
|
+
description: "Legacy topicId alias or resolver hint"
|
|
433
|
+
},
|
|
434
|
+
topicId: {
|
|
435
|
+
type: "string",
|
|
436
|
+
description: "Optional topic scope hint for resolver validation"
|
|
437
|
+
},
|
|
438
|
+
topicHint: {
|
|
439
|
+
type: "string",
|
|
440
|
+
description: "Natural-language topic hint for automatic topic resolution"
|
|
441
|
+
},
|
|
427
442
|
branchId: {
|
|
428
443
|
type: "string",
|
|
429
444
|
description: "The branch this worktree investigates"
|
|
@@ -436,18 +451,107 @@ var ADD_WORKTREE = {
|
|
|
436
451
|
type: "string",
|
|
437
452
|
description: "The testable claim this worktree investigates"
|
|
438
453
|
},
|
|
454
|
+
rationale: {
|
|
455
|
+
type: "string",
|
|
456
|
+
description: "Why this worktree exists and why it belongs in the campaign"
|
|
457
|
+
},
|
|
458
|
+
worktreeType: {
|
|
459
|
+
type: "string",
|
|
460
|
+
description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
|
|
461
|
+
},
|
|
462
|
+
gate: {
|
|
463
|
+
type: "string",
|
|
464
|
+
description: "Exit gate name for this worktree"
|
|
465
|
+
},
|
|
466
|
+
startDate: {
|
|
467
|
+
type: "number",
|
|
468
|
+
description: "Planned start timestamp in milliseconds since epoch"
|
|
469
|
+
},
|
|
470
|
+
endDate: {
|
|
471
|
+
type: "number",
|
|
472
|
+
description: "Planned end timestamp in milliseconds since epoch"
|
|
473
|
+
},
|
|
474
|
+
durationWeeks: {
|
|
475
|
+
type: "number",
|
|
476
|
+
description: "Planned duration in weeks"
|
|
477
|
+
},
|
|
478
|
+
confidenceImpact: {
|
|
479
|
+
type: "string",
|
|
480
|
+
description: "Expected confidence impact if the worktree succeeds",
|
|
481
|
+
enum: ["high", "medium", "low"]
|
|
482
|
+
},
|
|
483
|
+
beliefFocus: {
|
|
484
|
+
type: "string",
|
|
485
|
+
description: "Natural-language focus spanning the target belief neighborhood"
|
|
486
|
+
},
|
|
439
487
|
beliefIds: {
|
|
440
488
|
type: "array",
|
|
441
|
-
description: "
|
|
489
|
+
description: "Legacy alias for targetBeliefIds"
|
|
490
|
+
},
|
|
491
|
+
beliefs: {
|
|
492
|
+
type: "array",
|
|
493
|
+
description: "Legacy alias for targetBeliefIds"
|
|
494
|
+
},
|
|
495
|
+
targetBeliefIds: {
|
|
496
|
+
type: "array",
|
|
497
|
+
description: "Belief node IDs this worktree is expected to test or update"
|
|
498
|
+
},
|
|
499
|
+
targetQuestionIds: {
|
|
500
|
+
type: "array",
|
|
501
|
+
description: "Question node IDs this worktree is expected to answer"
|
|
502
|
+
},
|
|
503
|
+
keyQuestions: {
|
|
504
|
+
type: "array",
|
|
505
|
+
description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
|
|
506
|
+
},
|
|
507
|
+
evidenceSignals: {
|
|
508
|
+
type: "array",
|
|
509
|
+
description: "Evidence signal objects with signal, optional collected state, progress, and notes"
|
|
510
|
+
},
|
|
511
|
+
decisionGate: {
|
|
512
|
+
type: "object",
|
|
513
|
+
description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
|
|
514
|
+
},
|
|
515
|
+
goCriteria: {
|
|
516
|
+
type: "array",
|
|
517
|
+
description: "Shorthand go criteria used to build decisionGate"
|
|
518
|
+
},
|
|
519
|
+
noGoSignals: {
|
|
520
|
+
type: "array",
|
|
521
|
+
description: "Shorthand no-go signals used to build decisionGate"
|
|
522
|
+
},
|
|
523
|
+
proofArtifacts: {
|
|
524
|
+
type: "array",
|
|
525
|
+
description: "Expected proof artifacts required to close the worktree"
|
|
442
526
|
},
|
|
443
527
|
autoShape: {
|
|
444
528
|
type: "boolean",
|
|
445
529
|
description: "Whether to invoke inquiry auto-shaping during worktree creation"
|
|
446
530
|
},
|
|
531
|
+
autoFixPolicy: {
|
|
532
|
+
type: "object",
|
|
533
|
+
description: "Policy for permitted automatic remediation inside the worktree"
|
|
534
|
+
},
|
|
447
535
|
domainPackId: {
|
|
448
536
|
type: "string",
|
|
449
537
|
description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
|
|
450
538
|
},
|
|
539
|
+
tags: {
|
|
540
|
+
type: "array",
|
|
541
|
+
description: "Additional topic-resolution tags for the worktree"
|
|
542
|
+
},
|
|
543
|
+
touchedPaths: {
|
|
544
|
+
type: "array",
|
|
545
|
+
description: "File paths used as topic-resolution signals"
|
|
546
|
+
},
|
|
547
|
+
sourceRef: {
|
|
548
|
+
type: "string",
|
|
549
|
+
description: "Source reference used as a topic-resolution signal"
|
|
550
|
+
},
|
|
551
|
+
sourceKind: {
|
|
552
|
+
type: "string",
|
|
553
|
+
description: "Source kind used as a topic-resolution signal"
|
|
554
|
+
},
|
|
451
555
|
campaign: {
|
|
452
556
|
type: "number",
|
|
453
557
|
description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
|
|
@@ -472,12 +576,20 @@ var ADD_WORKTREE = {
|
|
|
472
576
|
type: "array",
|
|
473
577
|
description: "Worktree IDs blocked by this worktree"
|
|
474
578
|
},
|
|
475
|
-
|
|
579
|
+
staffingHint: {
|
|
476
580
|
type: "string",
|
|
477
|
-
description: "
|
|
581
|
+
description: "Suggested staffing or agent allocation note"
|
|
582
|
+
},
|
|
583
|
+
lensId: {
|
|
584
|
+
type: "string",
|
|
585
|
+
description: "Lens that scopes this worktree when applicable"
|
|
586
|
+
},
|
|
587
|
+
lastReconciledAt: {
|
|
588
|
+
type: "number",
|
|
589
|
+
description: "Timestamp when worktree metadata was last reconciled"
|
|
478
590
|
}
|
|
479
591
|
},
|
|
480
|
-
required: ["title"
|
|
592
|
+
required: ["title"],
|
|
481
593
|
response: {
|
|
482
594
|
description: "The created worktree",
|
|
483
595
|
fields: {
|
|
@@ -504,7 +616,7 @@ var MERGE = {
|
|
|
504
616
|
worktreeId: { type: "string", description: "The worktree to merge" },
|
|
505
617
|
outcomes: {
|
|
506
618
|
type: "array",
|
|
507
|
-
description: "
|
|
619
|
+
description: "Merge outcomes as key-finding strings, or scoring outcomes for beliefs: { beliefId, confidence, rationale }"
|
|
508
620
|
},
|
|
509
621
|
summary: { type: "string", description: "Overall findings summary" }
|
|
510
622
|
},
|
|
@@ -722,19 +834,23 @@ var FIND_CONTRADICTIONS = {
|
|
|
722
834
|
};
|
|
723
835
|
var CREATE_EDGE = {
|
|
724
836
|
name: "create_edge",
|
|
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.
|
|
837
|
+
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. Accepts any public epistemic edge type between public graph node refs so agents can author the full spine.",
|
|
726
838
|
parameters: {
|
|
727
|
-
|
|
728
|
-
type: "
|
|
729
|
-
description: "Source
|
|
839
|
+
from: {
|
|
840
|
+
type: "object",
|
|
841
|
+
description: "Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }"
|
|
730
842
|
},
|
|
731
|
-
|
|
732
|
-
type: "
|
|
733
|
-
description: "Target
|
|
843
|
+
to: {
|
|
844
|
+
type: "object",
|
|
845
|
+
description: "Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }"
|
|
734
846
|
},
|
|
735
847
|
edgeType: {
|
|
736
848
|
type: "string",
|
|
737
|
-
description: "Relationship type
|
|
849
|
+
description: "Relationship type from the public epistemic edge enum."
|
|
850
|
+
},
|
|
851
|
+
globalId: {
|
|
852
|
+
type: "string",
|
|
853
|
+
description: "Optional idempotent edge global ID."
|
|
738
854
|
},
|
|
739
855
|
weight: {
|
|
740
856
|
type: "number",
|
|
@@ -745,9 +861,13 @@ var CREATE_EDGE = {
|
|
|
745
861
|
type: "string",
|
|
746
862
|
description: "How this was determined",
|
|
747
863
|
enum: ["deductive", "inductive", "abductive", "analogical", "empirical"]
|
|
864
|
+
},
|
|
865
|
+
metadata: {
|
|
866
|
+
type: "object",
|
|
867
|
+
description: "Optional edge metadata."
|
|
748
868
|
}
|
|
749
869
|
},
|
|
750
|
-
required: ["
|
|
870
|
+
required: ["from", "to", "edgeType"],
|
|
751
871
|
response: {
|
|
752
872
|
description: "The created edge",
|
|
753
873
|
fields: {
|
|
@@ -761,6 +881,240 @@ var CREATE_EDGE = {
|
|
|
761
881
|
ontologyPrimitive: "edge",
|
|
762
882
|
tier: "showcase"
|
|
763
883
|
};
|
|
884
|
+
var UPDATE_EDGE = {
|
|
885
|
+
name: "update_edge",
|
|
886
|
+
description: "Amend metadata on an existing graph edge. Like `git commit --amend` \u2014 changes the edge annotation without recreating the relationship.",
|
|
887
|
+
parameters: {
|
|
888
|
+
edgeId: { type: "string", description: "Edge ID or global ID to update" },
|
|
889
|
+
weight: { type: "number", description: "Updated edge weight" },
|
|
890
|
+
confidence: { type: "number", description: "Updated confidence" },
|
|
891
|
+
context: { type: "string", description: "Updated human-readable context" },
|
|
892
|
+
derivationType: { type: "string", description: "Updated derivation type" },
|
|
893
|
+
metadata: { type: "object", description: "Updated metadata" }
|
|
894
|
+
},
|
|
895
|
+
required: ["edgeId"],
|
|
896
|
+
response: {
|
|
897
|
+
description: "Edge update result",
|
|
898
|
+
fields: { success: "boolean" }
|
|
899
|
+
},
|
|
900
|
+
ownerModule: "graph-primitives",
|
|
901
|
+
ontologyPrimitive: "edge",
|
|
902
|
+
tier: "workhorse"
|
|
903
|
+
};
|
|
904
|
+
var REMOVE_EDGE = {
|
|
905
|
+
name: "remove_edge",
|
|
906
|
+
description: "Remove one graph edge by ID. Like `git rm` \u2014 deletes a single explicit relationship from the spine.",
|
|
907
|
+
parameters: {
|
|
908
|
+
edgeId: { type: "string", description: "Edge ID or global ID to remove" }
|
|
909
|
+
},
|
|
910
|
+
required: ["edgeId"],
|
|
911
|
+
response: {
|
|
912
|
+
description: "Edge removal result",
|
|
913
|
+
fields: { success: "boolean" }
|
|
914
|
+
},
|
|
915
|
+
ownerModule: "graph-primitives",
|
|
916
|
+
ontologyPrimitive: "edge",
|
|
917
|
+
tier: "workhorse"
|
|
918
|
+
};
|
|
919
|
+
var REMOVE_EDGES_BETWEEN = {
|
|
920
|
+
name: "remove_edges_between",
|
|
921
|
+
description: "Remove graph edges between two nodes. Like `git rm <pathspec>` \u2014 deletes relationships matching a source, target, and optional type.",
|
|
922
|
+
parameters: {
|
|
923
|
+
fromNodeId: { type: "string", description: "Source node ID or global ID" },
|
|
924
|
+
toNodeId: { type: "string", description: "Target node ID or global ID" },
|
|
925
|
+
edgeType: { type: "string", description: "Optional edge type filter" }
|
|
926
|
+
},
|
|
927
|
+
required: ["fromNodeId", "toNodeId"],
|
|
928
|
+
response: {
|
|
929
|
+
description: "Matched edge removal result",
|
|
930
|
+
fields: { deleted: "number" }
|
|
931
|
+
},
|
|
932
|
+
ownerModule: "graph-primitives",
|
|
933
|
+
ontologyPrimitive: "edge",
|
|
934
|
+
tier: "workhorse"
|
|
935
|
+
};
|
|
936
|
+
var BATCH_CREATE_EDGES = {
|
|
937
|
+
name: "batch_create_edges",
|
|
938
|
+
description: "Commit multiple typed graph edges. Like `git commit` with many staged paths \u2014 writes a batch of explicit relationships atomically per edge.",
|
|
939
|
+
parameters: {
|
|
940
|
+
edges: {
|
|
941
|
+
type: "array",
|
|
942
|
+
description: "Edges to create, each with from, to, edgeType, and optional weight/confidence/context."
|
|
943
|
+
},
|
|
944
|
+
skipLayerValidation: {
|
|
945
|
+
type: "boolean",
|
|
946
|
+
description: "Skip kernel layer validation for trusted materialization flows."
|
|
947
|
+
}
|
|
948
|
+
},
|
|
949
|
+
required: ["edges"],
|
|
950
|
+
response: {
|
|
951
|
+
description: "Batch edge creation result",
|
|
952
|
+
fields: {
|
|
953
|
+
created: "number",
|
|
954
|
+
results: "array",
|
|
955
|
+
errors: "array"
|
|
956
|
+
}
|
|
957
|
+
},
|
|
958
|
+
ownerModule: "graph-primitives",
|
|
959
|
+
ontologyPrimitive: "edge",
|
|
960
|
+
tier: "workhorse"
|
|
961
|
+
};
|
|
962
|
+
var CREATE_EPISTEMIC_NODE = {
|
|
963
|
+
name: "create_epistemic_node",
|
|
964
|
+
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.",
|
|
965
|
+
parameters: {
|
|
966
|
+
globalId: { type: "string", description: "Optional idempotent node global ID" },
|
|
967
|
+
nodeType: { type: "string", description: "Public epistemic node type" },
|
|
968
|
+
canonicalText: { type: "string", description: "Canonical node text" },
|
|
969
|
+
text: { type: "string", description: "Alias for canonicalText" },
|
|
970
|
+
contentHash: { type: "string", description: "Optional idempotency content hash" },
|
|
971
|
+
sourceType: { type: "string", description: "Source type for provenance" },
|
|
972
|
+
topicId: { type: "string", description: "Optional topic scope" },
|
|
973
|
+
content: { type: "string", description: "Extended content" },
|
|
974
|
+
title: { type: "string", description: "Display title" },
|
|
975
|
+
metadata: { type: "object", description: "Optional node metadata" }
|
|
976
|
+
},
|
|
977
|
+
required: ["nodeType"],
|
|
978
|
+
response: {
|
|
979
|
+
description: "Created node result",
|
|
980
|
+
fields: {
|
|
981
|
+
nodeId: "string",
|
|
982
|
+
nodeGlobalId: "string",
|
|
983
|
+
isDuplicate: "boolean"
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
ownerModule: "reasoning-kernel",
|
|
987
|
+
ontologyPrimitive: "graph",
|
|
988
|
+
tier: "showcase"
|
|
989
|
+
};
|
|
990
|
+
var GET_EPISTEMIC_NODE = {
|
|
991
|
+
name: "get_epistemic_node",
|
|
992
|
+
description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
|
|
993
|
+
parameters: {
|
|
994
|
+
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
995
|
+
},
|
|
996
|
+
required: ["nodeId"],
|
|
997
|
+
response: {
|
|
998
|
+
description: "The resolved node",
|
|
999
|
+
fields: { node: "object" }
|
|
1000
|
+
},
|
|
1001
|
+
ownerModule: "reasoning-kernel",
|
|
1002
|
+
ontologyPrimitive: "graph",
|
|
1003
|
+
tier: "workhorse"
|
|
1004
|
+
};
|
|
1005
|
+
var LIST_EPISTEMIC_NODES = {
|
|
1006
|
+
name: "list_epistemic_nodes",
|
|
1007
|
+
description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
|
|
1008
|
+
parameters: {
|
|
1009
|
+
topicId: { type: "string", description: "Optional topic scope" },
|
|
1010
|
+
nodeType: { type: "string", description: "Optional node type filter" },
|
|
1011
|
+
status: { type: "string", description: "Optional lifecycle status" },
|
|
1012
|
+
searchQuery: { type: "string", description: "Optional text search query" },
|
|
1013
|
+
limit: { type: "number", description: "Maximum nodes to return" }
|
|
1014
|
+
},
|
|
1015
|
+
required: [],
|
|
1016
|
+
response: {
|
|
1017
|
+
description: "Matching nodes",
|
|
1018
|
+
fields: { nodes: "array" }
|
|
1019
|
+
},
|
|
1020
|
+
ownerModule: "reasoning-kernel",
|
|
1021
|
+
ontologyPrimitive: "graph",
|
|
1022
|
+
tier: "workhorse"
|
|
1023
|
+
};
|
|
1024
|
+
var UPDATE_EPISTEMIC_NODE = {
|
|
1025
|
+
name: "update_epistemic_node",
|
|
1026
|
+
description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
|
|
1027
|
+
parameters: {
|
|
1028
|
+
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1029
|
+
canonicalText: { type: "string", description: "Updated canonical text" },
|
|
1030
|
+
text: { type: "string", description: "Alias for canonicalText" },
|
|
1031
|
+
contentHash: { type: "string", description: "Updated content hash" },
|
|
1032
|
+
content: { type: "string", description: "Updated content" },
|
|
1033
|
+
title: { type: "string", description: "Updated display title" },
|
|
1034
|
+
metadata: { type: "object", description: "Updated metadata" },
|
|
1035
|
+
confidence: { type: "number", description: "Updated confidence" },
|
|
1036
|
+
verificationStatus: { type: "string", description: "Updated verification status" },
|
|
1037
|
+
status: { type: "string", description: "Updated lifecycle status" }
|
|
1038
|
+
},
|
|
1039
|
+
required: ["nodeId"],
|
|
1040
|
+
response: {
|
|
1041
|
+
description: "Node update result",
|
|
1042
|
+
fields: { success: "boolean" }
|
|
1043
|
+
},
|
|
1044
|
+
ownerModule: "reasoning-kernel",
|
|
1045
|
+
ontologyPrimitive: "graph",
|
|
1046
|
+
tier: "workhorse"
|
|
1047
|
+
};
|
|
1048
|
+
var ARCHIVE_EPISTEMIC_NODE = {
|
|
1049
|
+
name: "archive_epistemic_node",
|
|
1050
|
+
description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
|
|
1051
|
+
parameters: {
|
|
1052
|
+
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
1053
|
+
},
|
|
1054
|
+
required: ["nodeId"],
|
|
1055
|
+
response: {
|
|
1056
|
+
description: "Archive result",
|
|
1057
|
+
fields: { success: "boolean", effectiveStatus: "string" }
|
|
1058
|
+
},
|
|
1059
|
+
ownerModule: "reasoning-kernel",
|
|
1060
|
+
ontologyPrimitive: "graph",
|
|
1061
|
+
tier: "workhorse"
|
|
1062
|
+
};
|
|
1063
|
+
var VERIFY_EPISTEMIC_NODE = {
|
|
1064
|
+
name: "verify_epistemic_node",
|
|
1065
|
+
description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
|
|
1066
|
+
parameters: {
|
|
1067
|
+
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1068
|
+
verificationStatus: { type: "string", description: "Verification status" },
|
|
1069
|
+
confidence: { type: "number", description: "Optional confidence update" }
|
|
1070
|
+
},
|
|
1071
|
+
required: ["nodeId", "verificationStatus"],
|
|
1072
|
+
response: {
|
|
1073
|
+
description: "Verification result",
|
|
1074
|
+
fields: { success: "boolean" }
|
|
1075
|
+
},
|
|
1076
|
+
ownerModule: "reasoning-kernel",
|
|
1077
|
+
ontologyPrimitive: "graph",
|
|
1078
|
+
tier: "workhorse"
|
|
1079
|
+
};
|
|
1080
|
+
var SUPERSEDE_EPISTEMIC_NODE = {
|
|
1081
|
+
name: "supersede_epistemic_node",
|
|
1082
|
+
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.",
|
|
1083
|
+
parameters: {
|
|
1084
|
+
oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
|
|
1085
|
+
newGlobalId: { type: "string", description: "Optional replacement global ID" },
|
|
1086
|
+
newCanonicalText: { type: "string", description: "Replacement canonical text" },
|
|
1087
|
+
text: { type: "string", description: "Alias for newCanonicalText" },
|
|
1088
|
+
newContentHash: { type: "string", description: "Optional replacement content hash" },
|
|
1089
|
+
reason: { type: "string", description: "Reason for superseding" }
|
|
1090
|
+
},
|
|
1091
|
+
required: ["oldNodeId"],
|
|
1092
|
+
response: {
|
|
1093
|
+
description: "Supersede result",
|
|
1094
|
+
fields: { oldNodeId: "string", newNodeId: "string" }
|
|
1095
|
+
},
|
|
1096
|
+
ownerModule: "reasoning-kernel",
|
|
1097
|
+
ontologyPrimitive: "graph",
|
|
1098
|
+
tier: "workhorse"
|
|
1099
|
+
};
|
|
1100
|
+
var BATCH_CREATE_EPISTEMIC_NODES = {
|
|
1101
|
+
name: "batch_create_epistemic_nodes",
|
|
1102
|
+
description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
|
|
1103
|
+
parameters: {
|
|
1104
|
+
nodes: {
|
|
1105
|
+
type: "array",
|
|
1106
|
+
description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
|
|
1107
|
+
}
|
|
1108
|
+
},
|
|
1109
|
+
required: ["nodes"],
|
|
1110
|
+
response: {
|
|
1111
|
+
description: "Batch node creation result",
|
|
1112
|
+
fields: { created: "number", results: "array" }
|
|
1113
|
+
},
|
|
1114
|
+
ownerModule: "reasoning-kernel",
|
|
1115
|
+
ontologyPrimitive: "graph",
|
|
1116
|
+
tier: "workhorse"
|
|
1117
|
+
};
|
|
764
1118
|
var RECORD_JUDGMENT = {
|
|
765
1119
|
name: "record_judgment",
|
|
766
1120
|
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).",
|
|
@@ -1058,6 +1412,74 @@ var GET_GRAPH_STRUCTURE_ANALYSIS = {
|
|
|
1058
1412
|
ontologyPrimitive: "graph",
|
|
1059
1413
|
tier: "showcase"
|
|
1060
1414
|
};
|
|
1415
|
+
var LIST_GRAPH_INTELLIGENCE_QUERIES = {
|
|
1416
|
+
name: "list_graph_intelligence_queries",
|
|
1417
|
+
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.",
|
|
1418
|
+
parameters: {
|
|
1419
|
+
categoryId: {
|
|
1420
|
+
type: "string",
|
|
1421
|
+
description: "Optional category filter, such as problems or strategic"
|
|
1422
|
+
},
|
|
1423
|
+
mode: {
|
|
1424
|
+
type: "string",
|
|
1425
|
+
description: "Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
required: [],
|
|
1429
|
+
response: {
|
|
1430
|
+
description: "Graph Intelligence query catalog and mode-to-tool mapping",
|
|
1431
|
+
fields: {
|
|
1432
|
+
categories: "array \u2014 query categories",
|
|
1433
|
+
queries: "array \u2014 query definitions with prompt templates and tools",
|
|
1434
|
+
quickQueries: "array \u2014 recommended one-click query presets",
|
|
1435
|
+
publicToolNamesByMode: "object \u2014 public tool names available to each Graph Intelligence mode"
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1438
|
+
ownerModule: "graph-intelligence",
|
|
1439
|
+
ontologyPrimitive: "graph",
|
|
1440
|
+
tier: "showcase"
|
|
1441
|
+
};
|
|
1442
|
+
var RUN_GRAPH_INTELLIGENCE_QUERY = {
|
|
1443
|
+
name: "run_graph_intelligence_query",
|
|
1444
|
+
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.",
|
|
1445
|
+
parameters: {
|
|
1446
|
+
topicId: { type: "string", description: "Topic to analyze" },
|
|
1447
|
+
queryId: {
|
|
1448
|
+
type: "string",
|
|
1449
|
+
description: "Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary"
|
|
1450
|
+
},
|
|
1451
|
+
prompt: {
|
|
1452
|
+
type: "string",
|
|
1453
|
+
description: "Optional custom prompt for custom analysis runs"
|
|
1454
|
+
},
|
|
1455
|
+
input: {
|
|
1456
|
+
type: "string",
|
|
1457
|
+
description: "Optional entity, theme, belief, company, or search text for input-driven queries"
|
|
1458
|
+
},
|
|
1459
|
+
mode: {
|
|
1460
|
+
type: "string",
|
|
1461
|
+
description: "Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence"
|
|
1462
|
+
},
|
|
1463
|
+
limit: {
|
|
1464
|
+
type: "number",
|
|
1465
|
+
description: "Maximum graph context rows to return"
|
|
1466
|
+
}
|
|
1467
|
+
},
|
|
1468
|
+
required: ["topicId"],
|
|
1469
|
+
response: {
|
|
1470
|
+
description: "Graph Intelligence query result bundle ready for model or prompt-library synthesis",
|
|
1471
|
+
fields: {
|
|
1472
|
+
query: "object \u2014 selected query definition",
|
|
1473
|
+
prompt: "string \u2014 resolved prompt template",
|
|
1474
|
+
toolPlan: "array \u2014 public tools and args the model can call next",
|
|
1475
|
+
analysis: "object \u2014 structure, coverage, gap, and confirmation-bias analysis",
|
|
1476
|
+
context: "object \u2014 sampled beliefs, questions, evidence, edges, and contradictions"
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
ownerModule: "graph-intelligence",
|
|
1480
|
+
ontologyPrimitive: "graph",
|
|
1481
|
+
tier: "showcase"
|
|
1482
|
+
};
|
|
1061
1483
|
var GET_FALSIFICATION_QUESTIONS = {
|
|
1062
1484
|
name: "get_falsification_questions",
|
|
1063
1485
|
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.",
|
|
@@ -1906,15 +2328,15 @@ var IDENTITY_WHOAMI = {
|
|
|
1906
2328
|
};
|
|
1907
2329
|
var COMPILE_CONTEXT = {
|
|
1908
2330
|
name: "compile_context",
|
|
1909
|
-
description: "Compile a focused reasoning context
|
|
2331
|
+
description: "Compile a focused reasoning context. If topicId is omitted, Lucern resolves the best topic from the query. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
|
|
1910
2332
|
parameters: {
|
|
1911
2333
|
topicId: {
|
|
1912
2334
|
type: "string",
|
|
1913
|
-
description: "
|
|
2335
|
+
description: "Optional topic scope ID. Omit to resolve the topic from query."
|
|
1914
2336
|
},
|
|
1915
2337
|
query: {
|
|
1916
2338
|
type: "string",
|
|
1917
|
-
description: "
|
|
2339
|
+
description: "Focus query used to resolve the topic and rank context items. Required when topicId is omitted."
|
|
1918
2340
|
},
|
|
1919
2341
|
budget: {
|
|
1920
2342
|
type: "number",
|
|
@@ -1938,7 +2360,7 @@ var COMPILE_CONTEXT = {
|
|
|
1938
2360
|
description: "Include related ontological entities in the compiled result"
|
|
1939
2361
|
}
|
|
1940
2362
|
},
|
|
1941
|
-
required: [
|
|
2363
|
+
required: [],
|
|
1942
2364
|
response: {
|
|
1943
2365
|
description: "Compiled context pack for the requested topic",
|
|
1944
2366
|
fields: {
|
|
@@ -2112,18 +2534,60 @@ var CREATE_TASK = {
|
|
|
2112
2534
|
name: "create_task",
|
|
2113
2535
|
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.",
|
|
2114
2536
|
parameters: {
|
|
2115
|
-
title: { type: "string", description: "Task
|
|
2537
|
+
title: { type: "string", description: "Task title" },
|
|
2116
2538
|
topicId: { type: "string", description: "Topic scope" },
|
|
2539
|
+
description: {
|
|
2540
|
+
type: "string",
|
|
2541
|
+
description: "Long-form task description"
|
|
2542
|
+
},
|
|
2117
2543
|
taskType: {
|
|
2118
2544
|
type: "string",
|
|
2119
|
-
description: "
|
|
2120
|
-
enum: [
|
|
2545
|
+
description: "Task taxonomy",
|
|
2546
|
+
enum: [
|
|
2547
|
+
"general",
|
|
2548
|
+
"find_evidence",
|
|
2549
|
+
"verify_claim",
|
|
2550
|
+
"research",
|
|
2551
|
+
"review",
|
|
2552
|
+
"interview",
|
|
2553
|
+
"analysis",
|
|
2554
|
+
"track_metrics"
|
|
2555
|
+
]
|
|
2556
|
+
},
|
|
2557
|
+
priority: {
|
|
2558
|
+
type: "string",
|
|
2559
|
+
description: "Priority",
|
|
2560
|
+
enum: ["urgent", "high", "medium", "low"]
|
|
2561
|
+
},
|
|
2562
|
+
status: {
|
|
2563
|
+
type: "string",
|
|
2564
|
+
description: "Initial status (defaults to todo)",
|
|
2565
|
+
enum: ["todo", "in_progress", "blocked", "done"]
|
|
2566
|
+
},
|
|
2567
|
+
linkedWorktreeId: {
|
|
2568
|
+
type: "string",
|
|
2569
|
+
description: "Worktree this task belongs to"
|
|
2570
|
+
},
|
|
2571
|
+
linkedBeliefId: {
|
|
2572
|
+
type: "string",
|
|
2573
|
+
description: "Belief this task supports"
|
|
2121
2574
|
},
|
|
2122
2575
|
linkedQuestionId: {
|
|
2123
2576
|
type: "string",
|
|
2124
2577
|
description: "Question this task addresses"
|
|
2125
2578
|
},
|
|
2126
|
-
|
|
2579
|
+
assigneeId: {
|
|
2580
|
+
type: "string",
|
|
2581
|
+
description: "Principal assigned to the task"
|
|
2582
|
+
},
|
|
2583
|
+
dueDate: {
|
|
2584
|
+
type: "number",
|
|
2585
|
+
description: "Due date as epoch milliseconds"
|
|
2586
|
+
},
|
|
2587
|
+
tags: {
|
|
2588
|
+
type: "array",
|
|
2589
|
+
description: "Free-form string tags"
|
|
2590
|
+
}
|
|
2127
2591
|
},
|
|
2128
2592
|
required: ["title"],
|
|
2129
2593
|
response: {
|
|
@@ -2243,6 +2707,10 @@ var CREATE_TOPIC = {
|
|
|
2243
2707
|
name: "create_topic",
|
|
2244
2708
|
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.",
|
|
2245
2709
|
parameters: {
|
|
2710
|
+
globalId: {
|
|
2711
|
+
type: "string",
|
|
2712
|
+
description: "Optional idempotent topic global ID"
|
|
2713
|
+
},
|
|
2246
2714
|
name: { type: "string", description: "Topic name" },
|
|
2247
2715
|
type: {
|
|
2248
2716
|
type: "string",
|
|
@@ -2253,6 +2721,18 @@ var CREATE_TOPIC = {
|
|
|
2253
2721
|
type: "string",
|
|
2254
2722
|
description: "Optional parent topic for nesting"
|
|
2255
2723
|
},
|
|
2724
|
+
parentTopicGlobalId: {
|
|
2725
|
+
type: "string",
|
|
2726
|
+
description: "Optional parent topic global ID for nesting"
|
|
2727
|
+
},
|
|
2728
|
+
tenantId: { type: "string", description: "Optional tenant scope" },
|
|
2729
|
+
workspaceId: { type: "string", description: "Optional workspace scope" },
|
|
2730
|
+
visibility: {
|
|
2731
|
+
type: "string",
|
|
2732
|
+
description: "Topic visibility",
|
|
2733
|
+
enum: ["private", "team", "firm", "external", "public"]
|
|
2734
|
+
},
|
|
2735
|
+
metadata: { type: "object", description: "Optional topic metadata" },
|
|
2256
2736
|
createdBy: { type: "string", description: "Who created this topic" }
|
|
2257
2737
|
},
|
|
2258
2738
|
required: ["name", "type"],
|
|
@@ -2261,6 +2741,9 @@ var CREATE_TOPIC = {
|
|
|
2261
2741
|
fields: {
|
|
2262
2742
|
id: "string \u2014 topic ID",
|
|
2263
2743
|
globalId: "string \u2014 globally unique ID",
|
|
2744
|
+
topicGlobalId: "string \u2014 topic global ID",
|
|
2745
|
+
epistemicNodeId: "string \u2014 materialized topic node ID",
|
|
2746
|
+
epistemicNodeGlobalId: "string \u2014 materialized topic node global ID",
|
|
2264
2747
|
depth: "number \u2014 nesting depth"
|
|
2265
2748
|
}
|
|
2266
2749
|
},
|
|
@@ -2391,6 +2874,65 @@ var GET_TOPIC_TREE = {
|
|
|
2391
2874
|
ontologyPrimitive: "graph",
|
|
2392
2875
|
tier: "workhorse"
|
|
2393
2876
|
};
|
|
2877
|
+
var MATERIALIZE_TOPIC_GRAPH = {
|
|
2878
|
+
name: "materialize_topic_graph",
|
|
2879
|
+
description: "Backfill the topic graph spine. Like `git fsck --connectivity-only` with repair enabled \u2014 creates missing topic nodes and parent-child edges idempotently.",
|
|
2880
|
+
parameters: {
|
|
2881
|
+
rootTopicId: {
|
|
2882
|
+
type: "string",
|
|
2883
|
+
description: "Optional root topic for a bounded materialization pass"
|
|
2884
|
+
},
|
|
2885
|
+
dryRun: {
|
|
2886
|
+
type: "boolean",
|
|
2887
|
+
description: "When true, report missing rows without writing them"
|
|
2888
|
+
}
|
|
2889
|
+
},
|
|
2890
|
+
required: [],
|
|
2891
|
+
response: {
|
|
2892
|
+
description: "Topic graph materialization counts",
|
|
2893
|
+
fields: {
|
|
2894
|
+
topicsSeen: "number",
|
|
2895
|
+
nodesCreated: "number",
|
|
2896
|
+
nodesExisting: "number",
|
|
2897
|
+
edgesCreated: "number",
|
|
2898
|
+
edgesExisting: "number",
|
|
2899
|
+
errors: "array"
|
|
2900
|
+
}
|
|
2901
|
+
},
|
|
2902
|
+
ownerModule: "reasoning-kernel",
|
|
2903
|
+
ontologyPrimitive: "graph",
|
|
2904
|
+
tier: "workhorse"
|
|
2905
|
+
};
|
|
2906
|
+
var GET_TOPIC_GRAPH_SPINE = {
|
|
2907
|
+
name: "get_topic_graph_spine",
|
|
2908
|
+
description: "Verify the topic graph spine. Like `git fsck` \u2014 reads topics, materialized topic nodes, parent-child edges, and missing spine rows.",
|
|
2909
|
+
parameters: {
|
|
2910
|
+
rootTopicId: {
|
|
2911
|
+
type: "string",
|
|
2912
|
+
description: "Optional root topic for a bounded verifier pass"
|
|
2913
|
+
},
|
|
2914
|
+
includeTopicBeliefEdges: {
|
|
2915
|
+
type: "boolean",
|
|
2916
|
+
description: "Include topic -> belief edges in the verifier payload"
|
|
2917
|
+
}
|
|
2918
|
+
},
|
|
2919
|
+
required: [],
|
|
2920
|
+
response: {
|
|
2921
|
+
description: "Topic graph spine verification payload",
|
|
2922
|
+
fields: {
|
|
2923
|
+
ok: "boolean",
|
|
2924
|
+
counts: "object",
|
|
2925
|
+
topics: "array",
|
|
2926
|
+
topicNodes: "array",
|
|
2927
|
+
parentEdges: "array",
|
|
2928
|
+
missingTopicNodes: "array",
|
|
2929
|
+
missingParentEdges: "array"
|
|
2930
|
+
}
|
|
2931
|
+
},
|
|
2932
|
+
ownerModule: "reasoning-kernel",
|
|
2933
|
+
ontologyPrimitive: "graph",
|
|
2934
|
+
tier: "workhorse"
|
|
2935
|
+
};
|
|
2394
2936
|
var GET_CODE_CONTEXT = {
|
|
2395
2937
|
name: "get_code_context",
|
|
2396
2938
|
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.",
|
|
@@ -3523,6 +4065,69 @@ var GENERATE_SESSION_HANDOFF = {
|
|
|
3523
4065
|
tier: "showcase",
|
|
3524
4066
|
internal: true
|
|
3525
4067
|
};
|
|
4068
|
+
var BEGIN_BUILD_SESSION = {
|
|
4069
|
+
name: "begin_build_session",
|
|
4070
|
+
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.",
|
|
4071
|
+
parameters: {
|
|
4072
|
+
worktreeId: {
|
|
4073
|
+
type: "string",
|
|
4074
|
+
description: "The Lucern worktree ID to bootstrap."
|
|
4075
|
+
},
|
|
4076
|
+
branch: {
|
|
4077
|
+
type: "string",
|
|
4078
|
+
description: "Optional git branch name. Auto-generated from the worktree name when omitted."
|
|
4079
|
+
},
|
|
4080
|
+
branchBase: {
|
|
4081
|
+
type: "string",
|
|
4082
|
+
description: 'Base branch for the feature branch. Default: "staging".'
|
|
4083
|
+
},
|
|
4084
|
+
prBase: {
|
|
4085
|
+
type: "string",
|
|
4086
|
+
description: 'Target branch for the PR. Default: "staging".'
|
|
4087
|
+
},
|
|
4088
|
+
sessionMode: {
|
|
4089
|
+
type: "string",
|
|
4090
|
+
description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
|
|
4091
|
+
enum: ["async", "interactive"]
|
|
4092
|
+
},
|
|
4093
|
+
activateIfPlanning: {
|
|
4094
|
+
type: "boolean",
|
|
4095
|
+
description: "When true, automatically activate a planning worktree during bootstrap."
|
|
4096
|
+
}
|
|
4097
|
+
},
|
|
4098
|
+
required: ["worktreeId"],
|
|
4099
|
+
response: {
|
|
4100
|
+
description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
|
|
4101
|
+
fields: {
|
|
4102
|
+
topicId: "string \u2014 canonical topic scope",
|
|
4103
|
+
topicName: "string \u2014 human-readable topic name",
|
|
4104
|
+
worktreeId: "string \u2014 worktree ID",
|
|
4105
|
+
worktreeName: "string \u2014 human-readable worktree name",
|
|
4106
|
+
branch: "string \u2014 git branch name",
|
|
4107
|
+
branchBase: "string \u2014 base branch",
|
|
4108
|
+
prBase: "string \u2014 PR target branch",
|
|
4109
|
+
campaign: "number | null \u2014 top-level pipeline campaign",
|
|
4110
|
+
lane: "string \u2014 campaign lane",
|
|
4111
|
+
gate: "string \u2014 exit gate",
|
|
4112
|
+
hypothesis: "string \u2014 worktree hypothesis",
|
|
4113
|
+
focus: "string \u2014 session focus",
|
|
4114
|
+
status: "string \u2014 worktree status after optional activation",
|
|
4115
|
+
sessionMode: "string \u2014 async | interactive",
|
|
4116
|
+
targetBeliefIds: "array \u2014 scoped belief IDs",
|
|
4117
|
+
targetQuestionIds: "array \u2014 scoped question IDs",
|
|
4118
|
+
topBeliefs: "array \u2014 highest-confidence scoped beliefs",
|
|
4119
|
+
openQuestions: "array \u2014 open scoped questions",
|
|
4120
|
+
resolvedDecisions: "array \u2014 answered questions summarized for the session",
|
|
4121
|
+
dependencies: "array \u2014 upstream worktrees",
|
|
4122
|
+
unblocks: "array \u2014 downstream worktrees",
|
|
4123
|
+
mergeOrderNotes: "string \u2014 merge ordering advisory"
|
|
4124
|
+
}
|
|
4125
|
+
},
|
|
4126
|
+
ownerModule: "bootstrap",
|
|
4127
|
+
ontologyPrimitive: "worktree",
|
|
4128
|
+
tier: "showcase",
|
|
4129
|
+
internal: true
|
|
4130
|
+
};
|
|
3526
4131
|
var MCP_TOOL_CONTRACTS = {
|
|
3527
4132
|
// Belief lifecycle (commit, amend, fork, archive)
|
|
3528
4133
|
create_belief: CREATE_BELIEF,
|
|
@@ -3565,11 +4170,26 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3565
4170
|
bisect_confidence: BISECT_CONFIDENCE,
|
|
3566
4171
|
// Edges (commit)
|
|
3567
4172
|
create_edge: CREATE_EDGE,
|
|
4173
|
+
update_edge: UPDATE_EDGE,
|
|
4174
|
+
remove_edge: REMOVE_EDGE,
|
|
4175
|
+
remove_edges_between: REMOVE_EDGES_BETWEEN,
|
|
4176
|
+
batch_create_edges: BATCH_CREATE_EDGES,
|
|
4177
|
+
// Epistemic node spine (commit/amend/show)
|
|
4178
|
+
create_epistemic_node: CREATE_EPISTEMIC_NODE,
|
|
4179
|
+
get_epistemic_node: GET_EPISTEMIC_NODE,
|
|
4180
|
+
list_epistemic_nodes: LIST_EPISTEMIC_NODES,
|
|
4181
|
+
update_epistemic_node: UPDATE_EPISTEMIC_NODE,
|
|
4182
|
+
archive_epistemic_node: ARCHIVE_EPISTEMIC_NODE,
|
|
4183
|
+
verify_epistemic_node: VERIFY_EPISTEMIC_NODE,
|
|
4184
|
+
supersede_epistemic_node: SUPERSEDE_EPISTEMIC_NODE,
|
|
4185
|
+
batch_create_epistemic_nodes: BATCH_CREATE_EPISTEMIC_NODES,
|
|
3568
4186
|
// Judgments (tag)
|
|
3569
4187
|
record_judgment: RECORD_JUDGMENT,
|
|
3570
4188
|
// Graph intelligence (showcase)
|
|
3571
4189
|
detect_confirmation_bias: DETECT_CONFIRMATION_BIAS,
|
|
3572
4190
|
get_graph_structure_analysis: GET_GRAPH_STRUCTURE_ANALYSIS,
|
|
4191
|
+
list_graph_intelligence_queries: LIST_GRAPH_INTELLIGENCE_QUERIES,
|
|
4192
|
+
run_graph_intelligence_query: RUN_GRAPH_INTELLIGENCE_QUERY,
|
|
3573
4193
|
get_falsification_questions: GET_FALSIFICATION_QUESTIONS,
|
|
3574
4194
|
// Evidence operations (workhorse)
|
|
3575
4195
|
search_evidence: SEARCH_EVIDENCE,
|
|
@@ -3616,6 +4236,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3616
4236
|
get_agent_inbox: GET_AGENT_INBOX,
|
|
3617
4237
|
claim_files: CLAIM_FILES,
|
|
3618
4238
|
generate_session_handoff: GENERATE_SESSION_HANDOFF,
|
|
4239
|
+
begin_build_session: BEGIN_BUILD_SESSION,
|
|
3619
4240
|
// Policy / ACL (workhorse)
|
|
3620
4241
|
check_permission: CHECK_PERMISSION,
|
|
3621
4242
|
filter_by_permission: FILTER_BY_PERMISSION,
|
|
@@ -3635,6 +4256,8 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3635
4256
|
get_topic: GET_TOPIC,
|
|
3636
4257
|
update_topic: UPDATE_TOPIC,
|
|
3637
4258
|
get_topic_tree: GET_TOPIC_TREE,
|
|
4259
|
+
materialize_topic_graph: MATERIALIZE_TOPIC_GRAPH,
|
|
4260
|
+
get_topic_graph_spine: GET_TOPIC_GRAPH_SPINE,
|
|
3638
4261
|
// Coding intelligence (code-grounded knowledge)
|
|
3639
4262
|
get_code_context: GET_CODE_CONTEXT,
|
|
3640
4263
|
get_change_history: GET_CHANGE_HISTORY,
|
|
@@ -3739,18 +4362,34 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
3739
4362
|
"find_missing_questions",
|
|
3740
4363
|
"get_high_priority_questions",
|
|
3741
4364
|
"get_falsification_questions",
|
|
4365
|
+
"create_epistemic_node",
|
|
4366
|
+
"get_epistemic_node",
|
|
4367
|
+
"list_epistemic_nodes",
|
|
4368
|
+
"update_epistemic_node",
|
|
4369
|
+
"archive_epistemic_node",
|
|
4370
|
+
"verify_epistemic_node",
|
|
4371
|
+
"supersede_epistemic_node",
|
|
4372
|
+
"batch_create_epistemic_nodes",
|
|
3742
4373
|
"create_topic",
|
|
3743
4374
|
"get_topic",
|
|
3744
4375
|
"list_topics",
|
|
3745
4376
|
"update_topic",
|
|
3746
|
-
"get_topic_tree"
|
|
4377
|
+
"get_topic_tree",
|
|
4378
|
+
"materialize_topic_graph",
|
|
4379
|
+
"get_topic_graph_spine"
|
|
3747
4380
|
];
|
|
3748
4381
|
var MCP_ANALYSIS_PLATFORM_OPERATION_NAMES = [
|
|
3749
4382
|
"create_edge",
|
|
4383
|
+
"update_edge",
|
|
4384
|
+
"remove_edge",
|
|
4385
|
+
"remove_edges_between",
|
|
4386
|
+
"batch_create_edges",
|
|
3750
4387
|
"query_lineage",
|
|
3751
4388
|
"traverse_graph",
|
|
3752
4389
|
"get_graph_neighborhood",
|
|
3753
4390
|
"get_graph_structure_analysis",
|
|
4391
|
+
"list_graph_intelligence_queries",
|
|
4392
|
+
"run_graph_intelligence_query",
|
|
3754
4393
|
"find_contradictions",
|
|
3755
4394
|
"flag_contradiction",
|
|
3756
4395
|
"detect_confirmation_bias",
|
|
@@ -3829,6 +4468,7 @@ var PLATFORM_INTERNAL_OPERATION_NAMES = [
|
|
|
3829
4468
|
"get_change_history",
|
|
3830
4469
|
"get_failure_log",
|
|
3831
4470
|
"record_attempt",
|
|
4471
|
+
"begin_build_session",
|
|
3832
4472
|
"push",
|
|
3833
4473
|
"open_pull_request",
|
|
3834
4474
|
"record_judgment",
|
|
@@ -3883,7 +4523,6 @@ var SDK_ONLY_OPERATION_NAMES = [
|
|
|
3883
4523
|
"find_semantic_orphans"
|
|
3884
4524
|
];
|
|
3885
4525
|
var MCP_ONLY_INTERNAL_OPERATION_NAMES = [
|
|
3886
|
-
"begin_build_session",
|
|
3887
4526
|
"evaluate_engineering_contract",
|
|
3888
4527
|
"evaluate_research_contract"
|
|
3889
4528
|
];
|
|
@@ -4138,9 +4777,7 @@ function mcpContractFromArgsSchema(base, args, contractName) {
|
|
|
4138
4777
|
required: converted.filter(([, field]) => field.required).map(([fieldName]) => fieldName)
|
|
4139
4778
|
};
|
|
4140
4779
|
}
|
|
4141
|
-
|
|
4142
|
-
return contract;
|
|
4143
|
-
}
|
|
4780
|
+
var defineFunctionContract = (contract) => contract;
|
|
4144
4781
|
function compactRecord(input) {
|
|
4145
4782
|
return Object.fromEntries(
|
|
4146
4783
|
Object.entries(input).filter(([, value]) => value !== void 0)
|
|
@@ -4281,6 +4918,46 @@ var listTasksProjection = defineProjection({
|
|
|
4281
4918
|
});
|
|
4282
4919
|
|
|
4283
4920
|
// src/function-registry/tasks.ts
|
|
4921
|
+
var taskPrioritySchema = z.enum(["urgent", "high", "medium", "low"]);
|
|
4922
|
+
var taskStatusSchema2 = z.enum(["todo", "in_progress", "blocked", "done"]);
|
|
4923
|
+
var taskTypeSchema = z.enum([
|
|
4924
|
+
"general",
|
|
4925
|
+
"find_evidence",
|
|
4926
|
+
"verify_claim",
|
|
4927
|
+
"research",
|
|
4928
|
+
"review",
|
|
4929
|
+
"interview",
|
|
4930
|
+
"analysis",
|
|
4931
|
+
"track_metrics"
|
|
4932
|
+
]);
|
|
4933
|
+
var createTaskArgs = z.object({
|
|
4934
|
+
title: z.string().describe("Task title."),
|
|
4935
|
+
topicId: z.string().optional().describe("Topic scope."),
|
|
4936
|
+
description: z.string().optional().describe("Long-form task description."),
|
|
4937
|
+
taskType: taskTypeSchema.optional().describe("Task taxonomy."),
|
|
4938
|
+
priority: taskPrioritySchema.optional().describe("Priority. Defaults to medium when omitted by the server."),
|
|
4939
|
+
status: taskStatusSchema2.optional().describe("Initial status. Defaults to todo."),
|
|
4940
|
+
linkedWorktreeId: z.string().optional().describe("Worktree this task belongs to."),
|
|
4941
|
+
linkedBeliefId: z.string().optional().describe("Belief this task supports."),
|
|
4942
|
+
linkedQuestionId: z.string().optional().describe("Question this task addresses."),
|
|
4943
|
+
assigneeId: z.string().optional().describe("Principal assigned to the task."),
|
|
4944
|
+
dueDate: z.number().optional().describe("Due date as epoch milliseconds."),
|
|
4945
|
+
tags: z.array(z.string()).optional().describe("Free-form tags.")
|
|
4946
|
+
});
|
|
4947
|
+
var createTaskInput = (input) => compactRecord({
|
|
4948
|
+
title: input.title,
|
|
4949
|
+
topicId: input.topicId,
|
|
4950
|
+
description: input.description,
|
|
4951
|
+
taskType: input.taskType,
|
|
4952
|
+
priority: input.priority ?? "medium",
|
|
4953
|
+
status: input.status ?? "todo",
|
|
4954
|
+
linkedWorktreeId: input.linkedWorktreeId,
|
|
4955
|
+
linkedBeliefId: input.linkedBeliefId,
|
|
4956
|
+
linkedQuestionId: input.linkedQuestionId,
|
|
4957
|
+
assigneeId: input.assigneeId,
|
|
4958
|
+
dueDate: input.dueDate,
|
|
4959
|
+
tags: input.tags
|
|
4960
|
+
});
|
|
4284
4961
|
var taskInput = (input) => compactRecord({
|
|
4285
4962
|
...input,
|
|
4286
4963
|
taskId: input.taskId ?? input.id
|
|
@@ -4312,8 +4989,10 @@ var tasksContracts = [
|
|
|
4312
4989
|
convex: {
|
|
4313
4990
|
module: "tasks",
|
|
4314
4991
|
functionName: "create",
|
|
4315
|
-
kind: "mutation"
|
|
4316
|
-
|
|
4992
|
+
kind: "mutation",
|
|
4993
|
+
inputProjection: createTaskInput
|
|
4994
|
+
},
|
|
4995
|
+
args: createTaskArgs
|
|
4317
4996
|
}),
|
|
4318
4997
|
surfaceContract({
|
|
4319
4998
|
name: "list_tasks",
|