@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
|
@@ -10,6 +10,7 @@ import { questionsContracts } from './questions.js';
|
|
|
10
10
|
export { questionsContracts } from './questions.js';
|
|
11
11
|
import { topicsContracts } from './topics.js';
|
|
12
12
|
export { topicsContracts } from './topics.js';
|
|
13
|
+
import { z } from 'zod';
|
|
13
14
|
import { lensesContracts } from './lenses.js';
|
|
14
15
|
export { lensesContracts } from './lenses.js';
|
|
15
16
|
import { ontologiesContracts } from './ontologies.js';
|
|
@@ -34,7 +35,6 @@ import { codingContracts } from './coding.js';
|
|
|
34
35
|
export { codingContracts } from './coding.js';
|
|
35
36
|
import { legacyContracts } from './legacy.js';
|
|
36
37
|
export { legacyContracts } from './legacy.js';
|
|
37
|
-
import { z } from 'zod';
|
|
38
38
|
|
|
39
39
|
// src/function-registry/index.ts
|
|
40
40
|
|
|
@@ -458,7 +458,22 @@ var ADD_WORKTREE = {
|
|
|
458
458
|
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.",
|
|
459
459
|
parameters: {
|
|
460
460
|
title: { type: "string", description: "Worktree name/objective" },
|
|
461
|
-
|
|
461
|
+
name: {
|
|
462
|
+
type: "string",
|
|
463
|
+
description: "Optional storage-name alias for callers that already use backend naming"
|
|
464
|
+
},
|
|
465
|
+
projectId: {
|
|
466
|
+
type: "string",
|
|
467
|
+
description: "Legacy topicId alias or resolver hint"
|
|
468
|
+
},
|
|
469
|
+
topicId: {
|
|
470
|
+
type: "string",
|
|
471
|
+
description: "Optional topic scope hint for resolver validation"
|
|
472
|
+
},
|
|
473
|
+
topicHint: {
|
|
474
|
+
type: "string",
|
|
475
|
+
description: "Natural-language topic hint for automatic topic resolution"
|
|
476
|
+
},
|
|
462
477
|
branchId: {
|
|
463
478
|
type: "string",
|
|
464
479
|
description: "The branch this worktree investigates"
|
|
@@ -471,18 +486,107 @@ var ADD_WORKTREE = {
|
|
|
471
486
|
type: "string",
|
|
472
487
|
description: "The testable claim this worktree investigates"
|
|
473
488
|
},
|
|
489
|
+
rationale: {
|
|
490
|
+
type: "string",
|
|
491
|
+
description: "Why this worktree exists and why it belongs in the campaign"
|
|
492
|
+
},
|
|
493
|
+
worktreeType: {
|
|
494
|
+
type: "string",
|
|
495
|
+
description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
|
|
496
|
+
},
|
|
497
|
+
gate: {
|
|
498
|
+
type: "string",
|
|
499
|
+
description: "Exit gate name for this worktree"
|
|
500
|
+
},
|
|
501
|
+
startDate: {
|
|
502
|
+
type: "number",
|
|
503
|
+
description: "Planned start timestamp in milliseconds since epoch"
|
|
504
|
+
},
|
|
505
|
+
endDate: {
|
|
506
|
+
type: "number",
|
|
507
|
+
description: "Planned end timestamp in milliseconds since epoch"
|
|
508
|
+
},
|
|
509
|
+
durationWeeks: {
|
|
510
|
+
type: "number",
|
|
511
|
+
description: "Planned duration in weeks"
|
|
512
|
+
},
|
|
513
|
+
confidenceImpact: {
|
|
514
|
+
type: "string",
|
|
515
|
+
description: "Expected confidence impact if the worktree succeeds",
|
|
516
|
+
enum: ["high", "medium", "low"]
|
|
517
|
+
},
|
|
518
|
+
beliefFocus: {
|
|
519
|
+
type: "string",
|
|
520
|
+
description: "Natural-language focus spanning the target belief neighborhood"
|
|
521
|
+
},
|
|
474
522
|
beliefIds: {
|
|
475
523
|
type: "array",
|
|
476
|
-
description: "
|
|
524
|
+
description: "Legacy alias for targetBeliefIds"
|
|
525
|
+
},
|
|
526
|
+
beliefs: {
|
|
527
|
+
type: "array",
|
|
528
|
+
description: "Legacy alias for targetBeliefIds"
|
|
529
|
+
},
|
|
530
|
+
targetBeliefIds: {
|
|
531
|
+
type: "array",
|
|
532
|
+
description: "Belief node IDs this worktree is expected to test or update"
|
|
533
|
+
},
|
|
534
|
+
targetQuestionIds: {
|
|
535
|
+
type: "array",
|
|
536
|
+
description: "Question node IDs this worktree is expected to answer"
|
|
537
|
+
},
|
|
538
|
+
keyQuestions: {
|
|
539
|
+
type: "array",
|
|
540
|
+
description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
|
|
541
|
+
},
|
|
542
|
+
evidenceSignals: {
|
|
543
|
+
type: "array",
|
|
544
|
+
description: "Evidence signal objects with signal, optional collected state, progress, and notes"
|
|
545
|
+
},
|
|
546
|
+
decisionGate: {
|
|
547
|
+
type: "object",
|
|
548
|
+
description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
|
|
549
|
+
},
|
|
550
|
+
goCriteria: {
|
|
551
|
+
type: "array",
|
|
552
|
+
description: "Shorthand go criteria used to build decisionGate"
|
|
553
|
+
},
|
|
554
|
+
noGoSignals: {
|
|
555
|
+
type: "array",
|
|
556
|
+
description: "Shorthand no-go signals used to build decisionGate"
|
|
557
|
+
},
|
|
558
|
+
proofArtifacts: {
|
|
559
|
+
type: "array",
|
|
560
|
+
description: "Expected proof artifacts required to close the worktree"
|
|
477
561
|
},
|
|
478
562
|
autoShape: {
|
|
479
563
|
type: "boolean",
|
|
480
564
|
description: "Whether to invoke inquiry auto-shaping during worktree creation"
|
|
481
565
|
},
|
|
566
|
+
autoFixPolicy: {
|
|
567
|
+
type: "object",
|
|
568
|
+
description: "Policy for permitted automatic remediation inside the worktree"
|
|
569
|
+
},
|
|
482
570
|
domainPackId: {
|
|
483
571
|
type: "string",
|
|
484
572
|
description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
|
|
485
573
|
},
|
|
574
|
+
tags: {
|
|
575
|
+
type: "array",
|
|
576
|
+
description: "Additional topic-resolution tags for the worktree"
|
|
577
|
+
},
|
|
578
|
+
touchedPaths: {
|
|
579
|
+
type: "array",
|
|
580
|
+
description: "File paths used as topic-resolution signals"
|
|
581
|
+
},
|
|
582
|
+
sourceRef: {
|
|
583
|
+
type: "string",
|
|
584
|
+
description: "Source reference used as a topic-resolution signal"
|
|
585
|
+
},
|
|
586
|
+
sourceKind: {
|
|
587
|
+
type: "string",
|
|
588
|
+
description: "Source kind used as a topic-resolution signal"
|
|
589
|
+
},
|
|
486
590
|
campaign: {
|
|
487
591
|
type: "number",
|
|
488
592
|
description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
|
|
@@ -507,12 +611,20 @@ var ADD_WORKTREE = {
|
|
|
507
611
|
type: "array",
|
|
508
612
|
description: "Worktree IDs blocked by this worktree"
|
|
509
613
|
},
|
|
510
|
-
|
|
614
|
+
staffingHint: {
|
|
511
615
|
type: "string",
|
|
512
|
-
description: "
|
|
616
|
+
description: "Suggested staffing or agent allocation note"
|
|
617
|
+
},
|
|
618
|
+
lensId: {
|
|
619
|
+
type: "string",
|
|
620
|
+
description: "Lens that scopes this worktree when applicable"
|
|
621
|
+
},
|
|
622
|
+
lastReconciledAt: {
|
|
623
|
+
type: "number",
|
|
624
|
+
description: "Timestamp when worktree metadata was last reconciled"
|
|
513
625
|
}
|
|
514
626
|
},
|
|
515
|
-
required: ["title"
|
|
627
|
+
required: ["title"],
|
|
516
628
|
response: {
|
|
517
629
|
description: "The created worktree",
|
|
518
630
|
fields: {
|
|
@@ -539,7 +651,7 @@ var MERGE = {
|
|
|
539
651
|
worktreeId: { type: "string", description: "The worktree to merge" },
|
|
540
652
|
outcomes: {
|
|
541
653
|
type: "array",
|
|
542
|
-
description: "
|
|
654
|
+
description: "Merge outcomes as key-finding strings, or scoring outcomes for beliefs: { beliefId, confidence, rationale }"
|
|
543
655
|
},
|
|
544
656
|
summary: { type: "string", description: "Overall findings summary" }
|
|
545
657
|
},
|
|
@@ -757,19 +869,23 @@ var FIND_CONTRADICTIONS = {
|
|
|
757
869
|
};
|
|
758
870
|
var CREATE_EDGE = {
|
|
759
871
|
name: "create_edge",
|
|
760
|
-
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.
|
|
872
|
+
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.",
|
|
761
873
|
parameters: {
|
|
762
|
-
|
|
763
|
-
type: "
|
|
764
|
-
description: "Source
|
|
874
|
+
from: {
|
|
875
|
+
type: "object",
|
|
876
|
+
description: "Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }"
|
|
765
877
|
},
|
|
766
|
-
|
|
767
|
-
type: "
|
|
768
|
-
description: "Target
|
|
878
|
+
to: {
|
|
879
|
+
type: "object",
|
|
880
|
+
description: "Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }"
|
|
769
881
|
},
|
|
770
882
|
edgeType: {
|
|
771
883
|
type: "string",
|
|
772
|
-
description: "Relationship type
|
|
884
|
+
description: "Relationship type from the public epistemic edge enum."
|
|
885
|
+
},
|
|
886
|
+
globalId: {
|
|
887
|
+
type: "string",
|
|
888
|
+
description: "Optional idempotent edge global ID."
|
|
773
889
|
},
|
|
774
890
|
weight: {
|
|
775
891
|
type: "number",
|
|
@@ -780,9 +896,13 @@ var CREATE_EDGE = {
|
|
|
780
896
|
type: "string",
|
|
781
897
|
description: "How this was determined",
|
|
782
898
|
enum: ["deductive", "inductive", "abductive", "analogical", "empirical"]
|
|
899
|
+
},
|
|
900
|
+
metadata: {
|
|
901
|
+
type: "object",
|
|
902
|
+
description: "Optional edge metadata."
|
|
783
903
|
}
|
|
784
904
|
},
|
|
785
|
-
required: ["
|
|
905
|
+
required: ["from", "to", "edgeType"],
|
|
786
906
|
response: {
|
|
787
907
|
description: "The created edge",
|
|
788
908
|
fields: {
|
|
@@ -796,6 +916,240 @@ var CREATE_EDGE = {
|
|
|
796
916
|
ontologyPrimitive: "edge",
|
|
797
917
|
tier: "showcase"
|
|
798
918
|
};
|
|
919
|
+
var UPDATE_EDGE = {
|
|
920
|
+
name: "update_edge",
|
|
921
|
+
description: "Amend metadata on an existing graph edge. Like `git commit --amend` \u2014 changes the edge annotation without recreating the relationship.",
|
|
922
|
+
parameters: {
|
|
923
|
+
edgeId: { type: "string", description: "Edge ID or global ID to update" },
|
|
924
|
+
weight: { type: "number", description: "Updated edge weight" },
|
|
925
|
+
confidence: { type: "number", description: "Updated confidence" },
|
|
926
|
+
context: { type: "string", description: "Updated human-readable context" },
|
|
927
|
+
derivationType: { type: "string", description: "Updated derivation type" },
|
|
928
|
+
metadata: { type: "object", description: "Updated metadata" }
|
|
929
|
+
},
|
|
930
|
+
required: ["edgeId"],
|
|
931
|
+
response: {
|
|
932
|
+
description: "Edge update result",
|
|
933
|
+
fields: { success: "boolean" }
|
|
934
|
+
},
|
|
935
|
+
ownerModule: "graph-primitives",
|
|
936
|
+
ontologyPrimitive: "edge",
|
|
937
|
+
tier: "workhorse"
|
|
938
|
+
};
|
|
939
|
+
var REMOVE_EDGE = {
|
|
940
|
+
name: "remove_edge",
|
|
941
|
+
description: "Remove one graph edge by ID. Like `git rm` \u2014 deletes a single explicit relationship from the spine.",
|
|
942
|
+
parameters: {
|
|
943
|
+
edgeId: { type: "string", description: "Edge ID or global ID to remove" }
|
|
944
|
+
},
|
|
945
|
+
required: ["edgeId"],
|
|
946
|
+
response: {
|
|
947
|
+
description: "Edge removal result",
|
|
948
|
+
fields: { success: "boolean" }
|
|
949
|
+
},
|
|
950
|
+
ownerModule: "graph-primitives",
|
|
951
|
+
ontologyPrimitive: "edge",
|
|
952
|
+
tier: "workhorse"
|
|
953
|
+
};
|
|
954
|
+
var REMOVE_EDGES_BETWEEN = {
|
|
955
|
+
name: "remove_edges_between",
|
|
956
|
+
description: "Remove graph edges between two nodes. Like `git rm <pathspec>` \u2014 deletes relationships matching a source, target, and optional type.",
|
|
957
|
+
parameters: {
|
|
958
|
+
fromNodeId: { type: "string", description: "Source node ID or global ID" },
|
|
959
|
+
toNodeId: { type: "string", description: "Target node ID or global ID" },
|
|
960
|
+
edgeType: { type: "string", description: "Optional edge type filter" }
|
|
961
|
+
},
|
|
962
|
+
required: ["fromNodeId", "toNodeId"],
|
|
963
|
+
response: {
|
|
964
|
+
description: "Matched edge removal result",
|
|
965
|
+
fields: { deleted: "number" }
|
|
966
|
+
},
|
|
967
|
+
ownerModule: "graph-primitives",
|
|
968
|
+
ontologyPrimitive: "edge",
|
|
969
|
+
tier: "workhorse"
|
|
970
|
+
};
|
|
971
|
+
var BATCH_CREATE_EDGES = {
|
|
972
|
+
name: "batch_create_edges",
|
|
973
|
+
description: "Commit multiple typed graph edges. Like `git commit` with many staged paths \u2014 writes a batch of explicit relationships atomically per edge.",
|
|
974
|
+
parameters: {
|
|
975
|
+
edges: {
|
|
976
|
+
type: "array",
|
|
977
|
+
description: "Edges to create, each with from, to, edgeType, and optional weight/confidence/context."
|
|
978
|
+
},
|
|
979
|
+
skipLayerValidation: {
|
|
980
|
+
type: "boolean",
|
|
981
|
+
description: "Skip kernel layer validation for trusted materialization flows."
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
required: ["edges"],
|
|
985
|
+
response: {
|
|
986
|
+
description: "Batch edge creation result",
|
|
987
|
+
fields: {
|
|
988
|
+
created: "number",
|
|
989
|
+
results: "array",
|
|
990
|
+
errors: "array"
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
ownerModule: "graph-primitives",
|
|
994
|
+
ontologyPrimitive: "edge",
|
|
995
|
+
tier: "workhorse"
|
|
996
|
+
};
|
|
997
|
+
var CREATE_EPISTEMIC_NODE = {
|
|
998
|
+
name: "create_epistemic_node",
|
|
999
|
+
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.",
|
|
1000
|
+
parameters: {
|
|
1001
|
+
globalId: { type: "string", description: "Optional idempotent node global ID" },
|
|
1002
|
+
nodeType: { type: "string", description: "Public epistemic node type" },
|
|
1003
|
+
canonicalText: { type: "string", description: "Canonical node text" },
|
|
1004
|
+
text: { type: "string", description: "Alias for canonicalText" },
|
|
1005
|
+
contentHash: { type: "string", description: "Optional idempotency content hash" },
|
|
1006
|
+
sourceType: { type: "string", description: "Source type for provenance" },
|
|
1007
|
+
topicId: { type: "string", description: "Optional topic scope" },
|
|
1008
|
+
content: { type: "string", description: "Extended content" },
|
|
1009
|
+
title: { type: "string", description: "Display title" },
|
|
1010
|
+
metadata: { type: "object", description: "Optional node metadata" }
|
|
1011
|
+
},
|
|
1012
|
+
required: ["nodeType"],
|
|
1013
|
+
response: {
|
|
1014
|
+
description: "Created node result",
|
|
1015
|
+
fields: {
|
|
1016
|
+
nodeId: "string",
|
|
1017
|
+
nodeGlobalId: "string",
|
|
1018
|
+
isDuplicate: "boolean"
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
ownerModule: "reasoning-kernel",
|
|
1022
|
+
ontologyPrimitive: "graph",
|
|
1023
|
+
tier: "showcase"
|
|
1024
|
+
};
|
|
1025
|
+
var GET_EPISTEMIC_NODE = {
|
|
1026
|
+
name: "get_epistemic_node",
|
|
1027
|
+
description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
|
|
1028
|
+
parameters: {
|
|
1029
|
+
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
1030
|
+
},
|
|
1031
|
+
required: ["nodeId"],
|
|
1032
|
+
response: {
|
|
1033
|
+
description: "The resolved node",
|
|
1034
|
+
fields: { node: "object" }
|
|
1035
|
+
},
|
|
1036
|
+
ownerModule: "reasoning-kernel",
|
|
1037
|
+
ontologyPrimitive: "graph",
|
|
1038
|
+
tier: "workhorse"
|
|
1039
|
+
};
|
|
1040
|
+
var LIST_EPISTEMIC_NODES = {
|
|
1041
|
+
name: "list_epistemic_nodes",
|
|
1042
|
+
description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
|
|
1043
|
+
parameters: {
|
|
1044
|
+
topicId: { type: "string", description: "Optional topic scope" },
|
|
1045
|
+
nodeType: { type: "string", description: "Optional node type filter" },
|
|
1046
|
+
status: { type: "string", description: "Optional lifecycle status" },
|
|
1047
|
+
searchQuery: { type: "string", description: "Optional text search query" },
|
|
1048
|
+
limit: { type: "number", description: "Maximum nodes to return" }
|
|
1049
|
+
},
|
|
1050
|
+
required: [],
|
|
1051
|
+
response: {
|
|
1052
|
+
description: "Matching nodes",
|
|
1053
|
+
fields: { nodes: "array" }
|
|
1054
|
+
},
|
|
1055
|
+
ownerModule: "reasoning-kernel",
|
|
1056
|
+
ontologyPrimitive: "graph",
|
|
1057
|
+
tier: "workhorse"
|
|
1058
|
+
};
|
|
1059
|
+
var UPDATE_EPISTEMIC_NODE = {
|
|
1060
|
+
name: "update_epistemic_node",
|
|
1061
|
+
description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
|
|
1062
|
+
parameters: {
|
|
1063
|
+
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1064
|
+
canonicalText: { type: "string", description: "Updated canonical text" },
|
|
1065
|
+
text: { type: "string", description: "Alias for canonicalText" },
|
|
1066
|
+
contentHash: { type: "string", description: "Updated content hash" },
|
|
1067
|
+
content: { type: "string", description: "Updated content" },
|
|
1068
|
+
title: { type: "string", description: "Updated display title" },
|
|
1069
|
+
metadata: { type: "object", description: "Updated metadata" },
|
|
1070
|
+
confidence: { type: "number", description: "Updated confidence" },
|
|
1071
|
+
verificationStatus: { type: "string", description: "Updated verification status" },
|
|
1072
|
+
status: { type: "string", description: "Updated lifecycle status" }
|
|
1073
|
+
},
|
|
1074
|
+
required: ["nodeId"],
|
|
1075
|
+
response: {
|
|
1076
|
+
description: "Node update result",
|
|
1077
|
+
fields: { success: "boolean" }
|
|
1078
|
+
},
|
|
1079
|
+
ownerModule: "reasoning-kernel",
|
|
1080
|
+
ontologyPrimitive: "graph",
|
|
1081
|
+
tier: "workhorse"
|
|
1082
|
+
};
|
|
1083
|
+
var ARCHIVE_EPISTEMIC_NODE = {
|
|
1084
|
+
name: "archive_epistemic_node",
|
|
1085
|
+
description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
|
|
1086
|
+
parameters: {
|
|
1087
|
+
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
1088
|
+
},
|
|
1089
|
+
required: ["nodeId"],
|
|
1090
|
+
response: {
|
|
1091
|
+
description: "Archive result",
|
|
1092
|
+
fields: { success: "boolean", effectiveStatus: "string" }
|
|
1093
|
+
},
|
|
1094
|
+
ownerModule: "reasoning-kernel",
|
|
1095
|
+
ontologyPrimitive: "graph",
|
|
1096
|
+
tier: "workhorse"
|
|
1097
|
+
};
|
|
1098
|
+
var VERIFY_EPISTEMIC_NODE = {
|
|
1099
|
+
name: "verify_epistemic_node",
|
|
1100
|
+
description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
|
|
1101
|
+
parameters: {
|
|
1102
|
+
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1103
|
+
verificationStatus: { type: "string", description: "Verification status" },
|
|
1104
|
+
confidence: { type: "number", description: "Optional confidence update" }
|
|
1105
|
+
},
|
|
1106
|
+
required: ["nodeId", "verificationStatus"],
|
|
1107
|
+
response: {
|
|
1108
|
+
description: "Verification result",
|
|
1109
|
+
fields: { success: "boolean" }
|
|
1110
|
+
},
|
|
1111
|
+
ownerModule: "reasoning-kernel",
|
|
1112
|
+
ontologyPrimitive: "graph",
|
|
1113
|
+
tier: "workhorse"
|
|
1114
|
+
};
|
|
1115
|
+
var SUPERSEDE_EPISTEMIC_NODE = {
|
|
1116
|
+
name: "supersede_epistemic_node",
|
|
1117
|
+
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.",
|
|
1118
|
+
parameters: {
|
|
1119
|
+
oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
|
|
1120
|
+
newGlobalId: { type: "string", description: "Optional replacement global ID" },
|
|
1121
|
+
newCanonicalText: { type: "string", description: "Replacement canonical text" },
|
|
1122
|
+
text: { type: "string", description: "Alias for newCanonicalText" },
|
|
1123
|
+
newContentHash: { type: "string", description: "Optional replacement content hash" },
|
|
1124
|
+
reason: { type: "string", description: "Reason for superseding" }
|
|
1125
|
+
},
|
|
1126
|
+
required: ["oldNodeId"],
|
|
1127
|
+
response: {
|
|
1128
|
+
description: "Supersede result",
|
|
1129
|
+
fields: { oldNodeId: "string", newNodeId: "string" }
|
|
1130
|
+
},
|
|
1131
|
+
ownerModule: "reasoning-kernel",
|
|
1132
|
+
ontologyPrimitive: "graph",
|
|
1133
|
+
tier: "workhorse"
|
|
1134
|
+
};
|
|
1135
|
+
var BATCH_CREATE_EPISTEMIC_NODES = {
|
|
1136
|
+
name: "batch_create_epistemic_nodes",
|
|
1137
|
+
description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
|
|
1138
|
+
parameters: {
|
|
1139
|
+
nodes: {
|
|
1140
|
+
type: "array",
|
|
1141
|
+
description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
required: ["nodes"],
|
|
1145
|
+
response: {
|
|
1146
|
+
description: "Batch node creation result",
|
|
1147
|
+
fields: { created: "number", results: "array" }
|
|
1148
|
+
},
|
|
1149
|
+
ownerModule: "reasoning-kernel",
|
|
1150
|
+
ontologyPrimitive: "graph",
|
|
1151
|
+
tier: "workhorse"
|
|
1152
|
+
};
|
|
799
1153
|
var RECORD_JUDGMENT = {
|
|
800
1154
|
name: "record_judgment",
|
|
801
1155
|
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).",
|
|
@@ -1093,6 +1447,74 @@ var GET_GRAPH_STRUCTURE_ANALYSIS = {
|
|
|
1093
1447
|
ontologyPrimitive: "graph",
|
|
1094
1448
|
tier: "showcase"
|
|
1095
1449
|
};
|
|
1450
|
+
var LIST_GRAPH_INTELLIGENCE_QUERIES = {
|
|
1451
|
+
name: "list_graph_intelligence_queries",
|
|
1452
|
+
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.",
|
|
1453
|
+
parameters: {
|
|
1454
|
+
categoryId: {
|
|
1455
|
+
type: "string",
|
|
1456
|
+
description: "Optional category filter, such as problems or strategic"
|
|
1457
|
+
},
|
|
1458
|
+
mode: {
|
|
1459
|
+
type: "string",
|
|
1460
|
+
description: "Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence"
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
required: [],
|
|
1464
|
+
response: {
|
|
1465
|
+
description: "Graph Intelligence query catalog and mode-to-tool mapping",
|
|
1466
|
+
fields: {
|
|
1467
|
+
categories: "array \u2014 query categories",
|
|
1468
|
+
queries: "array \u2014 query definitions with prompt templates and tools",
|
|
1469
|
+
quickQueries: "array \u2014 recommended one-click query presets",
|
|
1470
|
+
publicToolNamesByMode: "object \u2014 public tool names available to each Graph Intelligence mode"
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
ownerModule: "graph-intelligence",
|
|
1474
|
+
ontologyPrimitive: "graph",
|
|
1475
|
+
tier: "showcase"
|
|
1476
|
+
};
|
|
1477
|
+
var RUN_GRAPH_INTELLIGENCE_QUERY = {
|
|
1478
|
+
name: "run_graph_intelligence_query",
|
|
1479
|
+
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.",
|
|
1480
|
+
parameters: {
|
|
1481
|
+
topicId: { type: "string", description: "Topic to analyze" },
|
|
1482
|
+
queryId: {
|
|
1483
|
+
type: "string",
|
|
1484
|
+
description: "Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary"
|
|
1485
|
+
},
|
|
1486
|
+
prompt: {
|
|
1487
|
+
type: "string",
|
|
1488
|
+
description: "Optional custom prompt for custom analysis runs"
|
|
1489
|
+
},
|
|
1490
|
+
input: {
|
|
1491
|
+
type: "string",
|
|
1492
|
+
description: "Optional entity, theme, belief, company, or search text for input-driven queries"
|
|
1493
|
+
},
|
|
1494
|
+
mode: {
|
|
1495
|
+
type: "string",
|
|
1496
|
+
description: "Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence"
|
|
1497
|
+
},
|
|
1498
|
+
limit: {
|
|
1499
|
+
type: "number",
|
|
1500
|
+
description: "Maximum graph context rows to return"
|
|
1501
|
+
}
|
|
1502
|
+
},
|
|
1503
|
+
required: ["topicId"],
|
|
1504
|
+
response: {
|
|
1505
|
+
description: "Graph Intelligence query result bundle ready for model or prompt-library synthesis",
|
|
1506
|
+
fields: {
|
|
1507
|
+
query: "object \u2014 selected query definition",
|
|
1508
|
+
prompt: "string \u2014 resolved prompt template",
|
|
1509
|
+
toolPlan: "array \u2014 public tools and args the model can call next",
|
|
1510
|
+
analysis: "object \u2014 structure, coverage, gap, and confirmation-bias analysis",
|
|
1511
|
+
context: "object \u2014 sampled beliefs, questions, evidence, edges, and contradictions"
|
|
1512
|
+
}
|
|
1513
|
+
},
|
|
1514
|
+
ownerModule: "graph-intelligence",
|
|
1515
|
+
ontologyPrimitive: "graph",
|
|
1516
|
+
tier: "showcase"
|
|
1517
|
+
};
|
|
1096
1518
|
var GET_FALSIFICATION_QUESTIONS = {
|
|
1097
1519
|
name: "get_falsification_questions",
|
|
1098
1520
|
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.",
|
|
@@ -1941,15 +2363,15 @@ var IDENTITY_WHOAMI = {
|
|
|
1941
2363
|
};
|
|
1942
2364
|
var COMPILE_CONTEXT = {
|
|
1943
2365
|
name: "compile_context",
|
|
1944
|
-
description: "Compile a focused reasoning context
|
|
2366
|
+
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.",
|
|
1945
2367
|
parameters: {
|
|
1946
2368
|
topicId: {
|
|
1947
2369
|
type: "string",
|
|
1948
|
-
description: "
|
|
2370
|
+
description: "Optional topic scope ID. Omit to resolve the topic from query."
|
|
1949
2371
|
},
|
|
1950
2372
|
query: {
|
|
1951
2373
|
type: "string",
|
|
1952
|
-
description: "
|
|
2374
|
+
description: "Focus query used to resolve the topic and rank context items. Required when topicId is omitted."
|
|
1953
2375
|
},
|
|
1954
2376
|
budget: {
|
|
1955
2377
|
type: "number",
|
|
@@ -1973,7 +2395,7 @@ var COMPILE_CONTEXT = {
|
|
|
1973
2395
|
description: "Include related ontological entities in the compiled result"
|
|
1974
2396
|
}
|
|
1975
2397
|
},
|
|
1976
|
-
required: [
|
|
2398
|
+
required: [],
|
|
1977
2399
|
response: {
|
|
1978
2400
|
description: "Compiled context pack for the requested topic",
|
|
1979
2401
|
fields: {
|
|
@@ -2147,18 +2569,60 @@ var CREATE_TASK = {
|
|
|
2147
2569
|
name: "create_task",
|
|
2148
2570
|
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.",
|
|
2149
2571
|
parameters: {
|
|
2150
|
-
title: { type: "string", description: "Task
|
|
2572
|
+
title: { type: "string", description: "Task title" },
|
|
2151
2573
|
topicId: { type: "string", description: "Topic scope" },
|
|
2574
|
+
description: {
|
|
2575
|
+
type: "string",
|
|
2576
|
+
description: "Long-form task description"
|
|
2577
|
+
},
|
|
2152
2578
|
taskType: {
|
|
2153
2579
|
type: "string",
|
|
2154
|
-
description: "
|
|
2155
|
-
enum: [
|
|
2580
|
+
description: "Task taxonomy",
|
|
2581
|
+
enum: [
|
|
2582
|
+
"general",
|
|
2583
|
+
"find_evidence",
|
|
2584
|
+
"verify_claim",
|
|
2585
|
+
"research",
|
|
2586
|
+
"review",
|
|
2587
|
+
"interview",
|
|
2588
|
+
"analysis",
|
|
2589
|
+
"track_metrics"
|
|
2590
|
+
]
|
|
2591
|
+
},
|
|
2592
|
+
priority: {
|
|
2593
|
+
type: "string",
|
|
2594
|
+
description: "Priority",
|
|
2595
|
+
enum: ["urgent", "high", "medium", "low"]
|
|
2596
|
+
},
|
|
2597
|
+
status: {
|
|
2598
|
+
type: "string",
|
|
2599
|
+
description: "Initial status (defaults to todo)",
|
|
2600
|
+
enum: ["todo", "in_progress", "blocked", "done"]
|
|
2601
|
+
},
|
|
2602
|
+
linkedWorktreeId: {
|
|
2603
|
+
type: "string",
|
|
2604
|
+
description: "Worktree this task belongs to"
|
|
2605
|
+
},
|
|
2606
|
+
linkedBeliefId: {
|
|
2607
|
+
type: "string",
|
|
2608
|
+
description: "Belief this task supports"
|
|
2156
2609
|
},
|
|
2157
2610
|
linkedQuestionId: {
|
|
2158
2611
|
type: "string",
|
|
2159
2612
|
description: "Question this task addresses"
|
|
2160
2613
|
},
|
|
2161
|
-
|
|
2614
|
+
assigneeId: {
|
|
2615
|
+
type: "string",
|
|
2616
|
+
description: "Principal assigned to the task"
|
|
2617
|
+
},
|
|
2618
|
+
dueDate: {
|
|
2619
|
+
type: "number",
|
|
2620
|
+
description: "Due date as epoch milliseconds"
|
|
2621
|
+
},
|
|
2622
|
+
tags: {
|
|
2623
|
+
type: "array",
|
|
2624
|
+
description: "Free-form string tags"
|
|
2625
|
+
}
|
|
2162
2626
|
},
|
|
2163
2627
|
required: ["title"],
|
|
2164
2628
|
response: {
|
|
@@ -2278,6 +2742,10 @@ var CREATE_TOPIC = {
|
|
|
2278
2742
|
name: "create_topic",
|
|
2279
2743
|
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.",
|
|
2280
2744
|
parameters: {
|
|
2745
|
+
globalId: {
|
|
2746
|
+
type: "string",
|
|
2747
|
+
description: "Optional idempotent topic global ID"
|
|
2748
|
+
},
|
|
2281
2749
|
name: { type: "string", description: "Topic name" },
|
|
2282
2750
|
type: {
|
|
2283
2751
|
type: "string",
|
|
@@ -2288,6 +2756,18 @@ var CREATE_TOPIC = {
|
|
|
2288
2756
|
type: "string",
|
|
2289
2757
|
description: "Optional parent topic for nesting"
|
|
2290
2758
|
},
|
|
2759
|
+
parentTopicGlobalId: {
|
|
2760
|
+
type: "string",
|
|
2761
|
+
description: "Optional parent topic global ID for nesting"
|
|
2762
|
+
},
|
|
2763
|
+
tenantId: { type: "string", description: "Optional tenant scope" },
|
|
2764
|
+
workspaceId: { type: "string", description: "Optional workspace scope" },
|
|
2765
|
+
visibility: {
|
|
2766
|
+
type: "string",
|
|
2767
|
+
description: "Topic visibility",
|
|
2768
|
+
enum: ["private", "team", "firm", "external", "public"]
|
|
2769
|
+
},
|
|
2770
|
+
metadata: { type: "object", description: "Optional topic metadata" },
|
|
2291
2771
|
createdBy: { type: "string", description: "Who created this topic" }
|
|
2292
2772
|
},
|
|
2293
2773
|
required: ["name", "type"],
|
|
@@ -2296,6 +2776,9 @@ var CREATE_TOPIC = {
|
|
|
2296
2776
|
fields: {
|
|
2297
2777
|
id: "string \u2014 topic ID",
|
|
2298
2778
|
globalId: "string \u2014 globally unique ID",
|
|
2779
|
+
topicGlobalId: "string \u2014 topic global ID",
|
|
2780
|
+
epistemicNodeId: "string \u2014 materialized topic node ID",
|
|
2781
|
+
epistemicNodeGlobalId: "string \u2014 materialized topic node global ID",
|
|
2299
2782
|
depth: "number \u2014 nesting depth"
|
|
2300
2783
|
}
|
|
2301
2784
|
},
|
|
@@ -2426,6 +2909,65 @@ var GET_TOPIC_TREE = {
|
|
|
2426
2909
|
ontologyPrimitive: "graph",
|
|
2427
2910
|
tier: "workhorse"
|
|
2428
2911
|
};
|
|
2912
|
+
var MATERIALIZE_TOPIC_GRAPH = {
|
|
2913
|
+
name: "materialize_topic_graph",
|
|
2914
|
+
description: "Backfill the topic graph spine. Like `git fsck --connectivity-only` with repair enabled \u2014 creates missing topic nodes and parent-child edges idempotently.",
|
|
2915
|
+
parameters: {
|
|
2916
|
+
rootTopicId: {
|
|
2917
|
+
type: "string",
|
|
2918
|
+
description: "Optional root topic for a bounded materialization pass"
|
|
2919
|
+
},
|
|
2920
|
+
dryRun: {
|
|
2921
|
+
type: "boolean",
|
|
2922
|
+
description: "When true, report missing rows without writing them"
|
|
2923
|
+
}
|
|
2924
|
+
},
|
|
2925
|
+
required: [],
|
|
2926
|
+
response: {
|
|
2927
|
+
description: "Topic graph materialization counts",
|
|
2928
|
+
fields: {
|
|
2929
|
+
topicsSeen: "number",
|
|
2930
|
+
nodesCreated: "number",
|
|
2931
|
+
nodesExisting: "number",
|
|
2932
|
+
edgesCreated: "number",
|
|
2933
|
+
edgesExisting: "number",
|
|
2934
|
+
errors: "array"
|
|
2935
|
+
}
|
|
2936
|
+
},
|
|
2937
|
+
ownerModule: "reasoning-kernel",
|
|
2938
|
+
ontologyPrimitive: "graph",
|
|
2939
|
+
tier: "workhorse"
|
|
2940
|
+
};
|
|
2941
|
+
var GET_TOPIC_GRAPH_SPINE = {
|
|
2942
|
+
name: "get_topic_graph_spine",
|
|
2943
|
+
description: "Verify the topic graph spine. Like `git fsck` \u2014 reads topics, materialized topic nodes, parent-child edges, and missing spine rows.",
|
|
2944
|
+
parameters: {
|
|
2945
|
+
rootTopicId: {
|
|
2946
|
+
type: "string",
|
|
2947
|
+
description: "Optional root topic for a bounded verifier pass"
|
|
2948
|
+
},
|
|
2949
|
+
includeTopicBeliefEdges: {
|
|
2950
|
+
type: "boolean",
|
|
2951
|
+
description: "Include topic -> belief edges in the verifier payload"
|
|
2952
|
+
}
|
|
2953
|
+
},
|
|
2954
|
+
required: [],
|
|
2955
|
+
response: {
|
|
2956
|
+
description: "Topic graph spine verification payload",
|
|
2957
|
+
fields: {
|
|
2958
|
+
ok: "boolean",
|
|
2959
|
+
counts: "object",
|
|
2960
|
+
topics: "array",
|
|
2961
|
+
topicNodes: "array",
|
|
2962
|
+
parentEdges: "array",
|
|
2963
|
+
missingTopicNodes: "array",
|
|
2964
|
+
missingParentEdges: "array"
|
|
2965
|
+
}
|
|
2966
|
+
},
|
|
2967
|
+
ownerModule: "reasoning-kernel",
|
|
2968
|
+
ontologyPrimitive: "graph",
|
|
2969
|
+
tier: "workhorse"
|
|
2970
|
+
};
|
|
2429
2971
|
var GET_CODE_CONTEXT = {
|
|
2430
2972
|
name: "get_code_context",
|
|
2431
2973
|
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.",
|
|
@@ -3558,6 +4100,69 @@ var GENERATE_SESSION_HANDOFF = {
|
|
|
3558
4100
|
tier: "showcase",
|
|
3559
4101
|
internal: true
|
|
3560
4102
|
};
|
|
4103
|
+
var BEGIN_BUILD_SESSION = {
|
|
4104
|
+
name: "begin_build_session",
|
|
4105
|
+
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.",
|
|
4106
|
+
parameters: {
|
|
4107
|
+
worktreeId: {
|
|
4108
|
+
type: "string",
|
|
4109
|
+
description: "The Lucern worktree ID to bootstrap."
|
|
4110
|
+
},
|
|
4111
|
+
branch: {
|
|
4112
|
+
type: "string",
|
|
4113
|
+
description: "Optional git branch name. Auto-generated from the worktree name when omitted."
|
|
4114
|
+
},
|
|
4115
|
+
branchBase: {
|
|
4116
|
+
type: "string",
|
|
4117
|
+
description: 'Base branch for the feature branch. Default: "staging".'
|
|
4118
|
+
},
|
|
4119
|
+
prBase: {
|
|
4120
|
+
type: "string",
|
|
4121
|
+
description: 'Target branch for the PR. Default: "staging".'
|
|
4122
|
+
},
|
|
4123
|
+
sessionMode: {
|
|
4124
|
+
type: "string",
|
|
4125
|
+
description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
|
|
4126
|
+
enum: ["async", "interactive"]
|
|
4127
|
+
},
|
|
4128
|
+
activateIfPlanning: {
|
|
4129
|
+
type: "boolean",
|
|
4130
|
+
description: "When true, automatically activate a planning worktree during bootstrap."
|
|
4131
|
+
}
|
|
4132
|
+
},
|
|
4133
|
+
required: ["worktreeId"],
|
|
4134
|
+
response: {
|
|
4135
|
+
description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
|
|
4136
|
+
fields: {
|
|
4137
|
+
topicId: "string \u2014 canonical topic scope",
|
|
4138
|
+
topicName: "string \u2014 human-readable topic name",
|
|
4139
|
+
worktreeId: "string \u2014 worktree ID",
|
|
4140
|
+
worktreeName: "string \u2014 human-readable worktree name",
|
|
4141
|
+
branch: "string \u2014 git branch name",
|
|
4142
|
+
branchBase: "string \u2014 base branch",
|
|
4143
|
+
prBase: "string \u2014 PR target branch",
|
|
4144
|
+
campaign: "number | null \u2014 top-level pipeline campaign",
|
|
4145
|
+
lane: "string \u2014 campaign lane",
|
|
4146
|
+
gate: "string \u2014 exit gate",
|
|
4147
|
+
hypothesis: "string \u2014 worktree hypothesis",
|
|
4148
|
+
focus: "string \u2014 session focus",
|
|
4149
|
+
status: "string \u2014 worktree status after optional activation",
|
|
4150
|
+
sessionMode: "string \u2014 async | interactive",
|
|
4151
|
+
targetBeliefIds: "array \u2014 scoped belief IDs",
|
|
4152
|
+
targetQuestionIds: "array \u2014 scoped question IDs",
|
|
4153
|
+
topBeliefs: "array \u2014 highest-confidence scoped beliefs",
|
|
4154
|
+
openQuestions: "array \u2014 open scoped questions",
|
|
4155
|
+
resolvedDecisions: "array \u2014 answered questions summarized for the session",
|
|
4156
|
+
dependencies: "array \u2014 upstream worktrees",
|
|
4157
|
+
unblocks: "array \u2014 downstream worktrees",
|
|
4158
|
+
mergeOrderNotes: "string \u2014 merge ordering advisory"
|
|
4159
|
+
}
|
|
4160
|
+
},
|
|
4161
|
+
ownerModule: "bootstrap",
|
|
4162
|
+
ontologyPrimitive: "worktree",
|
|
4163
|
+
tier: "showcase",
|
|
4164
|
+
internal: true
|
|
4165
|
+
};
|
|
3561
4166
|
var MCP_TOOL_CONTRACTS = {
|
|
3562
4167
|
// Belief lifecycle (commit, amend, fork, archive)
|
|
3563
4168
|
create_belief: CREATE_BELIEF,
|
|
@@ -3600,11 +4205,26 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3600
4205
|
bisect_confidence: BISECT_CONFIDENCE,
|
|
3601
4206
|
// Edges (commit)
|
|
3602
4207
|
create_edge: CREATE_EDGE,
|
|
4208
|
+
update_edge: UPDATE_EDGE,
|
|
4209
|
+
remove_edge: REMOVE_EDGE,
|
|
4210
|
+
remove_edges_between: REMOVE_EDGES_BETWEEN,
|
|
4211
|
+
batch_create_edges: BATCH_CREATE_EDGES,
|
|
4212
|
+
// Epistemic node spine (commit/amend/show)
|
|
4213
|
+
create_epistemic_node: CREATE_EPISTEMIC_NODE,
|
|
4214
|
+
get_epistemic_node: GET_EPISTEMIC_NODE,
|
|
4215
|
+
list_epistemic_nodes: LIST_EPISTEMIC_NODES,
|
|
4216
|
+
update_epistemic_node: UPDATE_EPISTEMIC_NODE,
|
|
4217
|
+
archive_epistemic_node: ARCHIVE_EPISTEMIC_NODE,
|
|
4218
|
+
verify_epistemic_node: VERIFY_EPISTEMIC_NODE,
|
|
4219
|
+
supersede_epistemic_node: SUPERSEDE_EPISTEMIC_NODE,
|
|
4220
|
+
batch_create_epistemic_nodes: BATCH_CREATE_EPISTEMIC_NODES,
|
|
3603
4221
|
// Judgments (tag)
|
|
3604
4222
|
record_judgment: RECORD_JUDGMENT,
|
|
3605
4223
|
// Graph intelligence (showcase)
|
|
3606
4224
|
detect_confirmation_bias: DETECT_CONFIRMATION_BIAS,
|
|
3607
4225
|
get_graph_structure_analysis: GET_GRAPH_STRUCTURE_ANALYSIS,
|
|
4226
|
+
list_graph_intelligence_queries: LIST_GRAPH_INTELLIGENCE_QUERIES,
|
|
4227
|
+
run_graph_intelligence_query: RUN_GRAPH_INTELLIGENCE_QUERY,
|
|
3608
4228
|
get_falsification_questions: GET_FALSIFICATION_QUESTIONS,
|
|
3609
4229
|
// Evidence operations (workhorse)
|
|
3610
4230
|
search_evidence: SEARCH_EVIDENCE,
|
|
@@ -3651,6 +4271,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3651
4271
|
get_agent_inbox: GET_AGENT_INBOX,
|
|
3652
4272
|
claim_files: CLAIM_FILES,
|
|
3653
4273
|
generate_session_handoff: GENERATE_SESSION_HANDOFF,
|
|
4274
|
+
begin_build_session: BEGIN_BUILD_SESSION,
|
|
3654
4275
|
// Policy / ACL (workhorse)
|
|
3655
4276
|
check_permission: CHECK_PERMISSION,
|
|
3656
4277
|
filter_by_permission: FILTER_BY_PERMISSION,
|
|
@@ -3670,6 +4291,8 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3670
4291
|
get_topic: GET_TOPIC,
|
|
3671
4292
|
update_topic: UPDATE_TOPIC,
|
|
3672
4293
|
get_topic_tree: GET_TOPIC_TREE,
|
|
4294
|
+
materialize_topic_graph: MATERIALIZE_TOPIC_GRAPH,
|
|
4295
|
+
get_topic_graph_spine: GET_TOPIC_GRAPH_SPINE,
|
|
3673
4296
|
// Coding intelligence (code-grounded knowledge)
|
|
3674
4297
|
get_code_context: GET_CODE_CONTEXT,
|
|
3675
4298
|
get_change_history: GET_CHANGE_HISTORY,
|
|
@@ -3774,18 +4397,34 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
3774
4397
|
"find_missing_questions",
|
|
3775
4398
|
"get_high_priority_questions",
|
|
3776
4399
|
"get_falsification_questions",
|
|
4400
|
+
"create_epistemic_node",
|
|
4401
|
+
"get_epistemic_node",
|
|
4402
|
+
"list_epistemic_nodes",
|
|
4403
|
+
"update_epistemic_node",
|
|
4404
|
+
"archive_epistemic_node",
|
|
4405
|
+
"verify_epistemic_node",
|
|
4406
|
+
"supersede_epistemic_node",
|
|
4407
|
+
"batch_create_epistemic_nodes",
|
|
3777
4408
|
"create_topic",
|
|
3778
4409
|
"get_topic",
|
|
3779
4410
|
"list_topics",
|
|
3780
4411
|
"update_topic",
|
|
3781
|
-
"get_topic_tree"
|
|
4412
|
+
"get_topic_tree",
|
|
4413
|
+
"materialize_topic_graph",
|
|
4414
|
+
"get_topic_graph_spine"
|
|
3782
4415
|
];
|
|
3783
4416
|
var MCP_ANALYSIS_PLATFORM_OPERATION_NAMES = [
|
|
3784
4417
|
"create_edge",
|
|
4418
|
+
"update_edge",
|
|
4419
|
+
"remove_edge",
|
|
4420
|
+
"remove_edges_between",
|
|
4421
|
+
"batch_create_edges",
|
|
3785
4422
|
"query_lineage",
|
|
3786
4423
|
"traverse_graph",
|
|
3787
4424
|
"get_graph_neighborhood",
|
|
3788
4425
|
"get_graph_structure_analysis",
|
|
4426
|
+
"list_graph_intelligence_queries",
|
|
4427
|
+
"run_graph_intelligence_query",
|
|
3789
4428
|
"find_contradictions",
|
|
3790
4429
|
"flag_contradiction",
|
|
3791
4430
|
"detect_confirmation_bias",
|
|
@@ -3877,6 +4516,7 @@ var PLATFORM_INTERNAL_OPERATION_NAMES = [
|
|
|
3877
4516
|
"get_change_history",
|
|
3878
4517
|
"get_failure_log",
|
|
3879
4518
|
"record_attempt",
|
|
4519
|
+
"begin_build_session",
|
|
3880
4520
|
"push",
|
|
3881
4521
|
"open_pull_request",
|
|
3882
4522
|
"record_judgment",
|
|
@@ -3931,7 +4571,6 @@ var SDK_ONLY_OPERATION_NAMES = [
|
|
|
3931
4571
|
"find_semantic_orphans"
|
|
3932
4572
|
];
|
|
3933
4573
|
var MCP_ONLY_INTERNAL_OPERATION_NAMES = [
|
|
3934
|
-
"begin_build_session",
|
|
3935
4574
|
"evaluate_engineering_contract",
|
|
3936
4575
|
"evaluate_research_contract"
|
|
3937
4576
|
];
|
|
@@ -4213,9 +4852,7 @@ function mcpContractFromArgsSchema(base, args, contractName) {
|
|
|
4213
4852
|
required: converted.filter(([, field]) => field.required).map(([fieldName]) => fieldName)
|
|
4214
4853
|
};
|
|
4215
4854
|
}
|
|
4216
|
-
|
|
4217
|
-
return contract;
|
|
4218
|
-
}
|
|
4855
|
+
var defineFunctionContract = (contract) => contract;
|
|
4219
4856
|
function classifyContract(contract, surfaceClass) {
|
|
4220
4857
|
return {
|
|
4221
4858
|
...contract,
|
|
@@ -4350,6 +4987,381 @@ function assertSurfaceCoverage(contracts) {
|
|
|
4350
4987
|
}
|
|
4351
4988
|
}
|
|
4352
4989
|
}
|
|
4990
|
+
var NODE_TYPE = z.enum(["decision", "belief", "question", "theme", "deal", "topic", "claim", "evidence", "synthesis", "answer", "atomic_fact", "excerpt", "source", "company", "person", "investor", "function", "value_chain"]);
|
|
4991
|
+
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"];
|
|
4992
|
+
var STORAGE_EDGE_TYPE_VALUES = [...EDGE_TYPE_VALUES, "extracted_from"];
|
|
4993
|
+
z.enum(EDGE_TYPE_VALUES);
|
|
4994
|
+
z.enum(STORAGE_EDGE_TYPE_VALUES);
|
|
4995
|
+
z.enum(["active", "archived", "watching"]);
|
|
4996
|
+
z.enum(["private", "team", "firm", "external", "public"]);
|
|
4997
|
+
|
|
4998
|
+
// src/function-registry/nodes.ts
|
|
4999
|
+
var sourceTypeSchema = z.enum([
|
|
5000
|
+
"human",
|
|
5001
|
+
"ai_extracted",
|
|
5002
|
+
"ai_generated",
|
|
5003
|
+
"imported",
|
|
5004
|
+
"system",
|
|
5005
|
+
"verified",
|
|
5006
|
+
"proprietary"
|
|
5007
|
+
]);
|
|
5008
|
+
var verificationStatusSchema = z.enum([
|
|
5009
|
+
"unverified",
|
|
5010
|
+
"human_verified",
|
|
5011
|
+
"ai_verified",
|
|
5012
|
+
"contradicted",
|
|
5013
|
+
"outdated"
|
|
5014
|
+
]);
|
|
5015
|
+
var nodeStatusSchema = z.enum([
|
|
5016
|
+
"active",
|
|
5017
|
+
"superseded",
|
|
5018
|
+
"archived",
|
|
5019
|
+
"deleted"
|
|
5020
|
+
]);
|
|
5021
|
+
var externalIdsArgs = z.object({
|
|
5022
|
+
crunchbase: z.string().optional(),
|
|
5023
|
+
linkedin: z.string().optional(),
|
|
5024
|
+
pitchbook: z.string().optional(),
|
|
5025
|
+
twitter: z.string().optional(),
|
|
5026
|
+
website: z.string().optional()
|
|
5027
|
+
}).optional();
|
|
5028
|
+
var createEpistemicNodeItemArgs = z.object({
|
|
5029
|
+
globalId: z.string().optional().describe("Optional idempotent node global ID."),
|
|
5030
|
+
nodeType: NODE_TYPE.describe("Public epistemic node type."),
|
|
5031
|
+
subtype: z.string().optional(),
|
|
5032
|
+
canonicalText: z.string().optional().describe("Canonical node text."),
|
|
5033
|
+
text: z.string().optional().describe("Alias for canonicalText."),
|
|
5034
|
+
contentHash: z.string().optional().describe("Optional idempotency content hash."),
|
|
5035
|
+
content: z.string().optional(),
|
|
5036
|
+
contentType: z.string().optional(),
|
|
5037
|
+
title: z.string().optional(),
|
|
5038
|
+
tags: z.array(z.string()).optional(),
|
|
5039
|
+
domain: z.string().optional(),
|
|
5040
|
+
metadata: z.record(z.unknown()).optional(),
|
|
5041
|
+
externalIds: externalIdsArgs,
|
|
5042
|
+
sourceType: sourceTypeSchema.optional(),
|
|
5043
|
+
aiProvider: z.string().optional(),
|
|
5044
|
+
extractedFromNodeId: z.string().optional(),
|
|
5045
|
+
confidence: z.number().optional(),
|
|
5046
|
+
verificationStatus: verificationStatusSchema.optional(),
|
|
5047
|
+
topicId: z.string().optional(),
|
|
5048
|
+
projectId: z.string().optional(),
|
|
5049
|
+
createdBy: z.string().optional(),
|
|
5050
|
+
trustedBypassAccessCheck: z.boolean().optional()
|
|
5051
|
+
});
|
|
5052
|
+
var createEpistemicNodeArgs = createEpistemicNodeItemArgs;
|
|
5053
|
+
var batchCreateEpistemicNodesArgs = z.object({
|
|
5054
|
+
nodes: z.array(createEpistemicNodeItemArgs)
|
|
5055
|
+
});
|
|
5056
|
+
var getEpistemicNodeArgs = z.object({
|
|
5057
|
+
nodeId: z.string().describe("Node ID or global ID."),
|
|
5058
|
+
globalId: z.string().optional().describe("Node global ID alias.")
|
|
5059
|
+
});
|
|
5060
|
+
var listEpistemicNodesArgs = z.object({
|
|
5061
|
+
topicId: z.string().optional(),
|
|
5062
|
+
projectId: z.string().optional(),
|
|
5063
|
+
nodeType: NODE_TYPE.optional(),
|
|
5064
|
+
status: nodeStatusSchema.optional(),
|
|
5065
|
+
searchQuery: z.string().optional(),
|
|
5066
|
+
query: z.string().optional(),
|
|
5067
|
+
limit: z.number().optional()
|
|
5068
|
+
});
|
|
5069
|
+
var updateEpistemicNodeArgs = z.object({
|
|
5070
|
+
nodeId: z.string().describe("Node ID or global ID."),
|
|
5071
|
+
id: z.string().optional().describe("Node ID alias."),
|
|
5072
|
+
subtype: z.string().optional(),
|
|
5073
|
+
canonicalText: z.string().optional(),
|
|
5074
|
+
text: z.string().optional(),
|
|
5075
|
+
contentHash: z.string().optional(),
|
|
5076
|
+
content: z.string().optional(),
|
|
5077
|
+
contentType: z.string().optional(),
|
|
5078
|
+
title: z.string().optional(),
|
|
5079
|
+
tags: z.array(z.string()).optional(),
|
|
5080
|
+
domain: z.string().optional(),
|
|
5081
|
+
metadata: z.record(z.unknown()).optional(),
|
|
5082
|
+
externalIds: externalIdsArgs,
|
|
5083
|
+
confidence: z.number().optional(),
|
|
5084
|
+
verificationStatus: verificationStatusSchema.optional(),
|
|
5085
|
+
status: nodeStatusSchema.optional(),
|
|
5086
|
+
userId: z.string().optional(),
|
|
5087
|
+
trustedBypassAccessCheck: z.boolean().optional()
|
|
5088
|
+
});
|
|
5089
|
+
var archiveEpistemicNodeArgs = z.object({
|
|
5090
|
+
nodeId: z.string().describe("Node ID or global ID."),
|
|
5091
|
+
id: z.string().optional().describe("Node ID alias."),
|
|
5092
|
+
userId: z.string().optional(),
|
|
5093
|
+
trustedBypassAccessCheck: z.boolean().optional()
|
|
5094
|
+
});
|
|
5095
|
+
var verifyEpistemicNodeArgs = z.object({
|
|
5096
|
+
nodeId: z.string().describe("Node ID or global ID."),
|
|
5097
|
+
id: z.string().optional().describe("Node ID alias."),
|
|
5098
|
+
verificationStatus: verificationStatusSchema,
|
|
5099
|
+
confidence: z.number().optional(),
|
|
5100
|
+
userId: z.string().optional()
|
|
5101
|
+
});
|
|
5102
|
+
var supersedeEpistemicNodeArgs = z.object({
|
|
5103
|
+
oldNodeId: z.string().describe("Node ID or global ID to supersede."),
|
|
5104
|
+
nodeId: z.string().optional().describe("Old node ID alias."),
|
|
5105
|
+
newGlobalId: z.string().optional(),
|
|
5106
|
+
newCanonicalText: z.string().optional(),
|
|
5107
|
+
text: z.string().optional(),
|
|
5108
|
+
canonicalText: z.string().optional(),
|
|
5109
|
+
newContentHash: z.string().optional(),
|
|
5110
|
+
reason: z.string().optional(),
|
|
5111
|
+
createdBy: z.string().optional(),
|
|
5112
|
+
trustedBypassAccessCheck: z.boolean().optional()
|
|
5113
|
+
});
|
|
5114
|
+
function generatedGlobalId(prefix) {
|
|
5115
|
+
return `${prefix}:${crypto.randomUUID()}`;
|
|
5116
|
+
}
|
|
5117
|
+
function resolveCanonicalText(input) {
|
|
5118
|
+
const text = input.canonicalText ?? input.text ?? input.title ?? input.content;
|
|
5119
|
+
if (typeof text !== "string" || text.trim().length === 0) {
|
|
5120
|
+
throw new Error("canonicalText or text is required.");
|
|
5121
|
+
}
|
|
5122
|
+
return text;
|
|
5123
|
+
}
|
|
5124
|
+
function createNodeInput(input, context) {
|
|
5125
|
+
const canonicalText = resolveCanonicalText(input);
|
|
5126
|
+
const nodeType = String(input.nodeType);
|
|
5127
|
+
return withCreatedBy(
|
|
5128
|
+
compactRecord({
|
|
5129
|
+
globalId: typeof input.globalId === "string" && input.globalId.trim() ? input.globalId : generatedGlobalId(nodeType),
|
|
5130
|
+
nodeType,
|
|
5131
|
+
subtype: input.subtype,
|
|
5132
|
+
canonicalText,
|
|
5133
|
+
contentHash: typeof input.contentHash === "string" && input.contentHash.trim() ? input.contentHash : `${nodeType}:${canonicalText}`,
|
|
5134
|
+
content: input.content,
|
|
5135
|
+
contentType: input.contentType,
|
|
5136
|
+
title: input.title,
|
|
5137
|
+
tags: input.tags,
|
|
5138
|
+
domain: input.domain,
|
|
5139
|
+
metadata: input.metadata,
|
|
5140
|
+
externalIds: input.externalIds,
|
|
5141
|
+
sourceType: typeof input.sourceType === "string" && input.sourceType.trim() ? input.sourceType : "human",
|
|
5142
|
+
aiProvider: input.aiProvider,
|
|
5143
|
+
extractedFromNodeId: input.extractedFromNodeId,
|
|
5144
|
+
confidence: input.confidence,
|
|
5145
|
+
verificationStatus: input.verificationStatus,
|
|
5146
|
+
topicId: input.topicId,
|
|
5147
|
+
projectId: input.projectId
|
|
5148
|
+
}),
|
|
5149
|
+
context
|
|
5150
|
+
);
|
|
5151
|
+
}
|
|
5152
|
+
var getNodeInput = (input) => compactRecord({
|
|
5153
|
+
nodeId: input.nodeId ?? input.globalId
|
|
5154
|
+
});
|
|
5155
|
+
var listNodesInput = (input) => compactRecord({
|
|
5156
|
+
topicId: input.topicId,
|
|
5157
|
+
projectId: input.projectId,
|
|
5158
|
+
nodeType: input.nodeType,
|
|
5159
|
+
status: input.status,
|
|
5160
|
+
searchQuery: input.searchQuery ?? input.query,
|
|
5161
|
+
limit: input.limit
|
|
5162
|
+
});
|
|
5163
|
+
var updateNodeInput = (input, context) => withUserId(
|
|
5164
|
+
compactRecord({
|
|
5165
|
+
nodeId: input.nodeId ?? input.id,
|
|
5166
|
+
subtype: input.subtype,
|
|
5167
|
+
canonicalText: input.canonicalText ?? input.text,
|
|
5168
|
+
contentHash: input.contentHash,
|
|
5169
|
+
content: input.content,
|
|
5170
|
+
contentType: input.contentType,
|
|
5171
|
+
title: input.title,
|
|
5172
|
+
tags: input.tags,
|
|
5173
|
+
domain: input.domain,
|
|
5174
|
+
metadata: input.metadata,
|
|
5175
|
+
externalIds: input.externalIds,
|
|
5176
|
+
confidence: input.confidence,
|
|
5177
|
+
verificationStatus: input.verificationStatus,
|
|
5178
|
+
status: input.status,
|
|
5179
|
+
trustedBypassAccessCheck: input.trustedBypassAccessCheck
|
|
5180
|
+
}),
|
|
5181
|
+
context
|
|
5182
|
+
);
|
|
5183
|
+
var archiveNodeInput = (input, context) => withUserId(
|
|
5184
|
+
compactRecord({
|
|
5185
|
+
nodeId: input.nodeId ?? input.id,
|
|
5186
|
+
trustedBypassAccessCheck: input.trustedBypassAccessCheck
|
|
5187
|
+
}),
|
|
5188
|
+
context
|
|
5189
|
+
);
|
|
5190
|
+
var verifyNodeInput = (input, context) => withUserId(
|
|
5191
|
+
compactRecord({
|
|
5192
|
+
nodeId: input.nodeId ?? input.id,
|
|
5193
|
+
verificationStatus: input.verificationStatus,
|
|
5194
|
+
confidence: input.confidence
|
|
5195
|
+
}),
|
|
5196
|
+
context
|
|
5197
|
+
);
|
|
5198
|
+
var supersedeNodeInput = (input, context) => {
|
|
5199
|
+
const newCanonicalText = input.newCanonicalText ?? input.canonicalText ?? input.text;
|
|
5200
|
+
if (typeof newCanonicalText !== "string" || newCanonicalText.trim().length === 0) {
|
|
5201
|
+
throw new Error("newCanonicalText or text is required.");
|
|
5202
|
+
}
|
|
5203
|
+
return {
|
|
5204
|
+
oldNodeId: input.oldNodeId ?? input.nodeId,
|
|
5205
|
+
newGlobalId: typeof input.newGlobalId === "string" && input.newGlobalId.trim() ? input.newGlobalId : generatedGlobalId("node"),
|
|
5206
|
+
newCanonicalText,
|
|
5207
|
+
newContentHash: typeof input.newContentHash === "string" && input.newContentHash.trim() ? input.newContentHash : `superseded:${newCanonicalText}`,
|
|
5208
|
+
createdBy: typeof input.createdBy === "string" ? input.createdBy : authUserId(context),
|
|
5209
|
+
reason: input.reason,
|
|
5210
|
+
trustedBypassAccessCheck: input.trustedBypassAccessCheck
|
|
5211
|
+
};
|
|
5212
|
+
};
|
|
5213
|
+
var batchCreateNodesInput = (input, context) => {
|
|
5214
|
+
const nodes = Array.isArray(input.nodes) ? input.nodes : [];
|
|
5215
|
+
return {
|
|
5216
|
+
nodes: nodes.map(
|
|
5217
|
+
(node) => createNodeInput(
|
|
5218
|
+
node && typeof node === "object" ? node : {},
|
|
5219
|
+
context
|
|
5220
|
+
)
|
|
5221
|
+
)
|
|
5222
|
+
};
|
|
5223
|
+
};
|
|
5224
|
+
var nodesContracts = [
|
|
5225
|
+
surfaceContract({
|
|
5226
|
+
name: "create_epistemic_node",
|
|
5227
|
+
kind: "mutation",
|
|
5228
|
+
domain: "nodes",
|
|
5229
|
+
surfaceClass: "platform_public",
|
|
5230
|
+
path: "/nodes",
|
|
5231
|
+
sdkNamespace: "nodes",
|
|
5232
|
+
sdkMethod: "createEpistemicNode",
|
|
5233
|
+
summary: "Create a generic epistemic graph node.",
|
|
5234
|
+
convex: {
|
|
5235
|
+
module: "nodes",
|
|
5236
|
+
functionName: "create",
|
|
5237
|
+
kind: "mutation",
|
|
5238
|
+
inputProjection: createNodeInput
|
|
5239
|
+
},
|
|
5240
|
+
args: createEpistemicNodeArgs
|
|
5241
|
+
}),
|
|
5242
|
+
surfaceContract({
|
|
5243
|
+
name: "get_epistemic_node",
|
|
5244
|
+
kind: "query",
|
|
5245
|
+
domain: "nodes",
|
|
5246
|
+
surfaceClass: "platform_public",
|
|
5247
|
+
method: "GET",
|
|
5248
|
+
path: "/nodes/get",
|
|
5249
|
+
sdkNamespace: "nodes",
|
|
5250
|
+
sdkMethod: "getEpistemicNode",
|
|
5251
|
+
summary: "Get a generic epistemic graph node.",
|
|
5252
|
+
convex: {
|
|
5253
|
+
module: "nodes",
|
|
5254
|
+
functionName: "get",
|
|
5255
|
+
kind: "query",
|
|
5256
|
+
inputProjection: getNodeInput
|
|
5257
|
+
},
|
|
5258
|
+
args: getEpistemicNodeArgs
|
|
5259
|
+
}),
|
|
5260
|
+
surfaceContract({
|
|
5261
|
+
name: "list_epistemic_nodes",
|
|
5262
|
+
kind: "query",
|
|
5263
|
+
domain: "nodes",
|
|
5264
|
+
surfaceClass: "platform_public",
|
|
5265
|
+
method: "GET",
|
|
5266
|
+
path: "/nodes",
|
|
5267
|
+
sdkNamespace: "nodes",
|
|
5268
|
+
sdkMethod: "listEpistemicNodes",
|
|
5269
|
+
summary: "List generic epistemic graph nodes.",
|
|
5270
|
+
convex: {
|
|
5271
|
+
module: "nodes",
|
|
5272
|
+
functionName: "list",
|
|
5273
|
+
kind: "query",
|
|
5274
|
+
inputProjection: listNodesInput
|
|
5275
|
+
},
|
|
5276
|
+
args: listEpistemicNodesArgs
|
|
5277
|
+
}),
|
|
5278
|
+
surfaceContract({
|
|
5279
|
+
name: "update_epistemic_node",
|
|
5280
|
+
kind: "mutation",
|
|
5281
|
+
domain: "nodes",
|
|
5282
|
+
surfaceClass: "platform_public",
|
|
5283
|
+
method: "PATCH",
|
|
5284
|
+
path: "/nodes",
|
|
5285
|
+
sdkNamespace: "nodes",
|
|
5286
|
+
sdkMethod: "updateEpistemicNode",
|
|
5287
|
+
summary: "Update a generic epistemic graph node.",
|
|
5288
|
+
convex: {
|
|
5289
|
+
module: "nodes",
|
|
5290
|
+
functionName: "update",
|
|
5291
|
+
kind: "mutation",
|
|
5292
|
+
inputProjection: updateNodeInput
|
|
5293
|
+
},
|
|
5294
|
+
args: updateEpistemicNodeArgs
|
|
5295
|
+
}),
|
|
5296
|
+
surfaceContract({
|
|
5297
|
+
name: "archive_epistemic_node",
|
|
5298
|
+
kind: "mutation",
|
|
5299
|
+
domain: "nodes",
|
|
5300
|
+
surfaceClass: "platform_public",
|
|
5301
|
+
path: "/nodes/archive",
|
|
5302
|
+
sdkNamespace: "nodes",
|
|
5303
|
+
sdkMethod: "archiveEpistemicNode",
|
|
5304
|
+
summary: "Archive a generic epistemic graph node.",
|
|
5305
|
+
convex: {
|
|
5306
|
+
module: "nodes",
|
|
5307
|
+
functionName: "archive",
|
|
5308
|
+
kind: "mutation",
|
|
5309
|
+
inputProjection: archiveNodeInput
|
|
5310
|
+
},
|
|
5311
|
+
args: archiveEpistemicNodeArgs
|
|
5312
|
+
}),
|
|
5313
|
+
surfaceContract({
|
|
5314
|
+
name: "verify_epistemic_node",
|
|
5315
|
+
kind: "mutation",
|
|
5316
|
+
domain: "nodes",
|
|
5317
|
+
surfaceClass: "platform_public",
|
|
5318
|
+
path: "/nodes/verify",
|
|
5319
|
+
sdkNamespace: "nodes",
|
|
5320
|
+
sdkMethod: "verifyEpistemicNode",
|
|
5321
|
+
summary: "Verify a generic epistemic graph node.",
|
|
5322
|
+
convex: {
|
|
5323
|
+
module: "nodes",
|
|
5324
|
+
functionName: "verify",
|
|
5325
|
+
kind: "mutation",
|
|
5326
|
+
inputProjection: verifyNodeInput
|
|
5327
|
+
},
|
|
5328
|
+
args: verifyEpistemicNodeArgs
|
|
5329
|
+
}),
|
|
5330
|
+
surfaceContract({
|
|
5331
|
+
name: "supersede_epistemic_node",
|
|
5332
|
+
kind: "mutation",
|
|
5333
|
+
domain: "nodes",
|
|
5334
|
+
surfaceClass: "platform_public",
|
|
5335
|
+
path: "/nodes/supersede",
|
|
5336
|
+
sdkNamespace: "nodes",
|
|
5337
|
+
sdkMethod: "supersedeEpistemicNode",
|
|
5338
|
+
summary: "Supersede a generic epistemic graph node.",
|
|
5339
|
+
convex: {
|
|
5340
|
+
module: "nodes",
|
|
5341
|
+
functionName: "supersede",
|
|
5342
|
+
kind: "mutation",
|
|
5343
|
+
inputProjection: supersedeNodeInput
|
|
5344
|
+
},
|
|
5345
|
+
args: supersedeEpistemicNodeArgs
|
|
5346
|
+
}),
|
|
5347
|
+
surfaceContract({
|
|
5348
|
+
name: "batch_create_epistemic_nodes",
|
|
5349
|
+
kind: "mutation",
|
|
5350
|
+
domain: "nodes",
|
|
5351
|
+
surfaceClass: "platform_public",
|
|
5352
|
+
path: "/nodes/batch",
|
|
5353
|
+
sdkNamespace: "nodes",
|
|
5354
|
+
sdkMethod: "batchCreateEpistemicNodes",
|
|
5355
|
+
summary: "Batch create generic epistemic graph nodes.",
|
|
5356
|
+
convex: {
|
|
5357
|
+
module: "nodes",
|
|
5358
|
+
functionName: "batchCreate",
|
|
5359
|
+
kind: "mutation",
|
|
5360
|
+
inputProjection: batchCreateNodesInput
|
|
5361
|
+
},
|
|
5362
|
+
args: batchCreateEpistemicNodesArgs
|
|
5363
|
+
})
|
|
5364
|
+
];
|
|
4353
5365
|
var ALL_FUNCTION_CONTRACTS = [
|
|
4354
5366
|
...contextContracts,
|
|
4355
5367
|
...identityContracts,
|
|
@@ -4357,6 +5369,7 @@ var ALL_FUNCTION_CONTRACTS = [
|
|
|
4357
5369
|
...evidenceContracts,
|
|
4358
5370
|
...questionsContracts,
|
|
4359
5371
|
...topicsContracts,
|
|
5372
|
+
...nodesContracts,
|
|
4360
5373
|
...lensesContracts,
|
|
4361
5374
|
...ontologiesContracts,
|
|
4362
5375
|
...worktreesContracts,
|
|
@@ -4375,10 +5388,10 @@ var FUNCTION_SURFACE_CONTRACTS = ALL_FUNCTION_CONTRACTS;
|
|
|
4375
5388
|
var FUNCTION_CONTRACTS_BY_NAME = new Map(
|
|
4376
5389
|
ALL_FUNCTION_CONTRACTS.map((contract) => [contract.name, contract])
|
|
4377
5390
|
);
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
5391
|
+
var getFunctionContract = FUNCTION_CONTRACTS_BY_NAME.get.bind(
|
|
5392
|
+
FUNCTION_CONTRACTS_BY_NAME
|
|
5393
|
+
);
|
|
4381
5394
|
|
|
4382
|
-
export { ALL_FUNCTION_CONTRACTS, DUPLICATE_OPERATION_NAMES, FORBIDDEN_APPLICATION_OPERATION_NAMES, FUNCTION_CONTRACTS_BY_NAME, FUNCTION_SURFACE_CONTRACTS, LEGACY_COMPAT_OPERATION_NAMES, LUCERN_OPERATION_MANIFEST, MCP_ANALYSIS_PLATFORM_OPERATION_NAMES, MCP_ANALYSIS_TENANT_OPERATION_NAMES, MCP_AUTOMATION_OPERATION_NAMES, MCP_CORE_OPERATION_NAMES, MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES, MCP_GOVERNANCE_TENANT_OPERATION_NAMES, MCP_ONLY_INTERNAL_OPERATION_NAMES, MCP_WORKFLOW_PLATFORM_OPERATION_NAMES, MCP_WORKFLOW_TENANT_OPERATION_NAMES, PLATFORM_INTERNAL_OPERATION_NAMES, PLATFORM_PUBLIC_OPERATION_NAMES, SDK_ONLY_OPERATION_NAMES, TENANT_PUBLIC_OPERATION_NAMES, argsSchemaFromMcpContract, assertSurfaceCoverage, authUserId, classifyContract, compactRecord, defineFunctionContract, getFunctionContract, inputSchemaFromMcpContract, jsonObjectSchema, recordValue, surfaceContract, surfaceEnabled, surfaceIntentGateViolations, surfaceMcpContract, withCreatedBy, withUserId };
|
|
5395
|
+
export { ALL_FUNCTION_CONTRACTS, DUPLICATE_OPERATION_NAMES, FORBIDDEN_APPLICATION_OPERATION_NAMES, FUNCTION_CONTRACTS_BY_NAME, FUNCTION_SURFACE_CONTRACTS, LEGACY_COMPAT_OPERATION_NAMES, LUCERN_OPERATION_MANIFEST, MCP_ANALYSIS_PLATFORM_OPERATION_NAMES, MCP_ANALYSIS_TENANT_OPERATION_NAMES, MCP_AUTOMATION_OPERATION_NAMES, MCP_CORE_OPERATION_NAMES, MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES, MCP_GOVERNANCE_TENANT_OPERATION_NAMES, MCP_ONLY_INTERNAL_OPERATION_NAMES, MCP_WORKFLOW_PLATFORM_OPERATION_NAMES, MCP_WORKFLOW_TENANT_OPERATION_NAMES, PLATFORM_INTERNAL_OPERATION_NAMES, PLATFORM_PUBLIC_OPERATION_NAMES, SDK_ONLY_OPERATION_NAMES, TENANT_PUBLIC_OPERATION_NAMES, argsSchemaFromMcpContract, assertSurfaceCoverage, authUserId, classifyContract, compactRecord, defineFunctionContract, getFunctionContract, inputSchemaFromMcpContract, jsonObjectSchema, nodesContracts, recordValue, surfaceContract, surfaceEnabled, surfaceIntentGateViolations, surfaceMcpContract, withCreatedBy, withUserId };
|
|
4383
5396
|
//# sourceMappingURL=index.js.map
|
|
4384
5397
|
//# sourceMappingURL=index.js.map
|