@lucern/contracts 1.0.0 → 1.0.1
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 -1
- package/dist/dsl.d.ts +75 -4
- package/dist/dsl.values-rhsroqi0.d.ts +21 -0
- package/dist/dsl.values.d.ts +5 -0
- package/dist/dsl.values.js +675 -0
- package/dist/dsl.values.js.map +1 -0
- package/dist/function-registry/beliefs.d.ts +1 -17
- package/dist/function-registry/beliefs.js +155 -117
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.d.ts +1 -17
- package/dist/function-registry/coding.js +155 -117
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +1 -17
- package/dist/function-registry/context.js +155 -117
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.d.ts +1 -17
- package/dist/function-registry/contracts.js +155 -117
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.d.ts +1 -17
- package/dist/function-registry/coordination.js +155 -117
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +1 -17
- package/dist/function-registry/edges.js +155 -117
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +1 -17
- package/dist/function-registry/evidence.js +155 -117
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +1 -17
- package/dist/function-registry/graph.js +155 -117
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +1 -1
- package/dist/function-registry/helpers.js +155 -117
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.d.ts +1 -17
- package/dist/function-registry/identity.js +155 -117
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +1 -1
- package/dist/function-registry/index.js +158 -118
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +1 -17
- package/dist/function-registry/judgments.js +155 -117
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.d.ts +1 -17
- package/dist/function-registry/legacy.js +155 -117
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +1 -17
- package/dist/function-registry/lenses.js +155 -117
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +3 -3
- package/dist/function-registry/manifest.js +1 -0
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.d.ts +1 -17
- package/dist/function-registry/nodes.js +155 -117
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.d.ts +1 -17
- package/dist/function-registry/ontologies.js +155 -117
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +1 -17
- package/dist/function-registry/pipeline.js +155 -117
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +1 -17
- package/dist/function-registry/questions.js +155 -117
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +1 -17
- package/dist/function-registry/tasks.js +155 -117
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +1 -17
- package/dist/function-registry/topics.js +155 -117
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +2 -2
- package/dist/function-registry/worktrees.d.ts +41 -17
- package/dist/function-registry/worktrees.js +174 -117
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/generated/lucernWebPublicEnv.js.map +1 -1
- package/dist/generated/lucernWebServerEnv.js.map +1 -1
- package/dist/{idOf-DR8tkhQS.d.ts → idOf-BmkVDhD8.d.ts} +1 -1
- package/dist/index.d.ts +47 -8
- package/dist/index.js +45072 -45005
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.base.d.ts +444 -0
- package/dist/infisical-runtime.base.js +640 -0
- package/dist/infisical-runtime.base.js.map +1 -0
- package/dist/infisical-runtime.contract.d.ts +9 -440
- package/dist/infisical-runtime.contract.js +14 -1
- package/dist/infisical-runtime.contract.js.map +1 -1
- package/dist/infisical-runtime.platform-ops-secrets.d.ts +743 -0
- package/dist/infisical-runtime.platform-ops-secrets.js +962 -0
- package/dist/infisical-runtime.platform-ops-secrets.js.map +1 -0
- package/dist/infisical-runtime.platform-secrets.d.ts +598 -0
- package/dist/infisical-runtime.platform-secrets.js +726 -0
- package/dist/infisical-runtime.platform-secrets.js.map +1 -0
- package/dist/infisical-runtime.tenant-secrets.d.ts +486 -0
- package/dist/infisical-runtime.tenant-secrets.js +1131 -0
- package/dist/infisical-runtime.tenant-secrets.js.map +1 -0
- package/dist/manifests/edge-policy-manifest.d.ts +1 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +1 -1
- package/dist/manifests/infisical-runtime-manifest.js +14 -1
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
- package/dist/manifests/tenant-client-manifest.d.ts +5 -1
- package/dist/manifests/tenant-client-manifest.js +5 -0
- package/dist/manifests/tenant-client-manifest.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +61 -61
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/tables/kernel/config.js.map +1 -1
- package/dist/schemas/tables/kernel/coordination.js.map +1 -1
- package/dist/schemas/tables/kernel/decision.d.ts +1 -1
- package/dist/schemas/tables/kernel/decision.js.map +1 -1
- package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
- package/dist/schemas/tables/kernel/embedding.js.map +1 -1
- package/dist/schemas/tables/kernel/epistemic.d.ts +1 -1
- package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
- package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
- package/dist/schemas/tables/kernel/infra.js.map +1 -1
- package/dist/schemas/tables/kernel/intelligence.d.ts +1 -1
- package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
- package/dist/schemas/tables/kernel/lens.d.ts +5 -5
- package/dist/schemas/tables/kernel/lens.js.map +1 -1
- package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
- package/dist/schemas/tables/kernel/ontology.js.map +1 -1
- package/dist/schemas/tables/kernel/platform.js.map +1 -1
- package/dist/schemas/tables/kernel/spine.d.ts +1 -1
- package/dist/schemas/tables/kernel/spine.js.map +1 -1
- package/dist/schemas/tables/kernel/task.d.ts +1 -1
- package/dist/schemas/tables/kernel/task.js.map +1 -1
- package/dist/schemas/tables/kernel/topic.d.ts +1 -1
- package/dist/schemas/tables/kernel/topic.js.map +1 -1
- package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
- package/dist/schemas/tables/kernel/workflow.js.map +1 -1
- package/dist/schemas/tables/kernel/worktree.d.ts +1 -1
- package/dist/schemas/tables/kernel/worktree.js.map +1 -1
- package/dist/schemas/tables/mc/identity.d.ts +1 -1
- package/dist/schemas/tables/mc/methodology.d.ts +1 -1
- package/dist/schemas/tables/mc/pack.d.ts +9 -9
- package/dist/schemas/tables/mc/policy.d.ts +1 -1
- package/dist/schemas/tables/mc/registry.d.ts +1 -1
- package/dist/schemas/tables/mc/runtime.d.ts +1 -1
- package/dist/schemas/tables/mc/tenant.d.ts +1 -1
- package/dist/schemas/tables/mc/workspace.d.ts +1 -1
- package/dist/schemas.values-5J5oIK7z.d.ts +26 -0
- package/dist/schemas.values.d.ts +7 -0
- package/dist/schemas.values.js +5324 -0
- package/dist/schemas.values.js.map +1 -0
- package/dist/sdk-tools.contract.analytics.d.ts +27 -0
- package/dist/sdk-tools.contract.analytics.js +616 -0
- package/dist/sdk-tools.contract.analytics.js.map +1 -0
- package/dist/sdk-tools.contract.d.ts +43 -2
- package/dist/sdk-tools.contract.graph.d.ts +11 -0
- package/dist/sdk-tools.contract.graph.js +156 -0
- package/dist/sdk-tools.contract.graph.js.map +1 -0
- package/dist/sdk-tools.contract.js +4107 -4062
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.d.ts +25 -0
- package/dist/sdk-tools.contract.registry.js +5504 -0
- package/dist/sdk-tools.contract.registry.js.map +1 -0
- package/dist/sdk-tools.contract.types.d.ts +15 -0
- package/dist/sdk-tools.contract.types.js +3 -0
- package/dist/sdk-tools.contract.types.js.map +1 -0
- package/dist/sdk-tools.contract.values-LuBh95zg.d.ts +58 -0
- package/dist/sdk-tools.contract.values.d.ts +7 -0
- package/dist/sdk-tools.contract.values.js +5581 -0
- package/dist/sdk-tools.contract.values.js.map +1 -0
- package/dist/sdk-tools.contract.workflow.d.ts +17 -0
- package/dist/sdk-tools.contract.workflow.js +287 -0
- package/dist/sdk-tools.contract.workflow.js.map +1 -0
- package/dist/tenant-client.contract.d.ts +5 -1
- package/dist/tenant-client.contract.js +5 -0
- package/dist/tenant-client.contract.js.map +1 -1
- package/dist/tool-contracts.d.ts +34 -1
- package/dist/tool-contracts.graph.d.ts +18 -0
- package/dist/tool-contracts.graph.js +378 -0
- package/dist/tool-contracts.graph.js.map +1 -0
- package/dist/tool-contracts.intelligence-evidence.d.ts +15 -0
- package/dist/tool-contracts.intelligence-evidence.js +303 -0
- package/dist/tool-contracts.intelligence-evidence.js.map +1 -0
- package/dist/tool-contracts.js +155 -118
- package/dist/tool-contracts.js.map +1 -1
- package/dist/tool-contracts.lifecycle.d.ts +13 -0
- package/dist/tool-contracts.lifecycle.js +410 -0
- package/dist/tool-contracts.lifecycle.js.map +1 -0
- package/dist/tool-contracts.nodes-lenses.d.ts +17 -0
- package/dist/tool-contracts.nodes-lenses.js +334 -0
- package/dist/tool-contracts.nodes-lenses.js.map +1 -0
- package/dist/tool-contracts.ontology.d.ts +16 -0
- package/dist/tool-contracts.ontology.js +344 -0
- package/dist/tool-contracts.ontology.js.map +1 -0
- package/dist/tool-contracts.pipeline-coordination.d.ts +25 -0
- package/dist/tool-contracts.pipeline-coordination.js +684 -0
- package/dist/tool-contracts.pipeline-coordination.js.map +1 -0
- package/dist/tool-contracts.policy-observation-task-topic.d.ts +25 -0
- package/dist/tool-contracts.policy-observation-task-topic.js +740 -0
- package/dist/tool-contracts.policy-observation-task-topic.js.map +1 -0
- package/dist/tool-contracts.questions-listing.d.ts +27 -0
- package/dist/tool-contracts.questions-listing.js +782 -0
- package/dist/tool-contracts.questions-listing.js.map +1 -0
- package/dist/tool-contracts.types.d.ts +34 -0
- package/dist/tool-contracts.types.js +3 -0
- package/dist/tool-contracts.types.js.map +1 -0
- package/dist/tool-contracts.values-DjctSW7S.d.ts +147 -0
- package/dist/tool-contracts.values.d.ts +11 -0
- package/dist/tool-contracts.values.js +4398 -0
- package/dist/tool-contracts.values.js.map +1 -0
- package/dist/tool-contracts.worktrees.d.ts +8 -0
- package/dist/tool-contracts.worktrees.js +280 -0
- package/dist/tool-contracts.worktrees.js.map +1 -0
- package/package.json +3 -11
- package/dist/dsl-DVPthQGY.d.ts +0 -110
- package/dist/index-CM1Pl_vI.d.ts +0 -28
- package/dist/sdk-tools.contract-CKmSsrZ2.d.ts +0 -146
- package/dist/tool-contracts-C_xvM9q2.d.ts +0 -326
- package/dist/{edge-policy-manifest-Dw5IhT1L.d.ts → edge-policy-manifest-4KOSP4nk.d.ts} +2 -2
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
// src/tool-contracts.ontology.ts
|
|
2
|
+
var MANAGE_WRITE_POLICY = {
|
|
3
|
+
name: "manage_write_policy",
|
|
4
|
+
description: "Manage write policies for MCP mutation tools. Like `git config` for write permissions \u2014 sets per-topic or global policies that control which roles can mutate the graph.",
|
|
5
|
+
parameters: {
|
|
6
|
+
action: {
|
|
7
|
+
type: "string",
|
|
8
|
+
description: "Action to perform: 'get' (read policies) or 'set' (upsert a policy)",
|
|
9
|
+
enum: ["get", "set"]
|
|
10
|
+
},
|
|
11
|
+
topicId: {
|
|
12
|
+
type: "string",
|
|
13
|
+
description: "Topic scope for the policy. Omit for global policies."
|
|
14
|
+
},
|
|
15
|
+
role: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Role to set policy for (required for 'set'). E.g. 'agent:internal' or a Permit role key such as 'workspace_admin'."
|
|
18
|
+
},
|
|
19
|
+
permission: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Permission level (required for 'set').",
|
|
22
|
+
enum: ["allow", "deny", "read_only"]
|
|
23
|
+
},
|
|
24
|
+
maxWritesPerSession: {
|
|
25
|
+
type: "number",
|
|
26
|
+
description: "Optional per-session write limit for this role+scope."
|
|
27
|
+
},
|
|
28
|
+
rationale: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Why this policy is being set (audit trail)."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
required: ["action"],
|
|
34
|
+
response: {
|
|
35
|
+
description: "Policy operation result",
|
|
36
|
+
fields: {
|
|
37
|
+
action: "string \u2014 get | set",
|
|
38
|
+
topicId: "string|null \u2014 topic scope or null for global",
|
|
39
|
+
policies: "array \u2014 (for get) list of matching policies",
|
|
40
|
+
role: "string \u2014 (for set) role that was updated",
|
|
41
|
+
permission: "string \u2014 (for set) new permission level",
|
|
42
|
+
maxWritesPerSession: "number|null \u2014 (for set) session write cap"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
ownerModule: "access-control",
|
|
46
|
+
ontologyPrimitive: "policy",
|
|
47
|
+
tier: "workhorse"
|
|
48
|
+
};
|
|
49
|
+
var LIST_ONTOLOGIES = {
|
|
50
|
+
name: "list_ontologies",
|
|
51
|
+
description: "List ontology definitions with optional filters. Like `git remote -v` for ontologies \u2014 shows all registered ontology definitions with their tier, status, and tenant scope.",
|
|
52
|
+
parameters: {
|
|
53
|
+
tenantId: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Filter by tenant ID. Omit for platform-level ontologies."
|
|
56
|
+
},
|
|
57
|
+
tier: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Filter by tier",
|
|
60
|
+
enum: ["platform", "pack", "tenant"]
|
|
61
|
+
},
|
|
62
|
+
status: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Filter by status",
|
|
65
|
+
enum: ["draft", "active", "deprecated", "archived"]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
required: [],
|
|
69
|
+
response: {
|
|
70
|
+
description: "Array of ontology definitions",
|
|
71
|
+
fields: {
|
|
72
|
+
ontologies: "array \u2014 ontology definitions with id, ontologyKey, name, tier, status"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
ownerModule: "graph-primitives",
|
|
76
|
+
ontologyPrimitive: "ontology",
|
|
77
|
+
tier: "showcase"
|
|
78
|
+
};
|
|
79
|
+
var GET_ONTOLOGY = {
|
|
80
|
+
name: "get_ontology",
|
|
81
|
+
description: "Get a single ontology definition by ID or ontologyKey. Like `git show` for an ontology \u2014 returns the definition metadata plus the latest published version with entity types and edge types.",
|
|
82
|
+
parameters: {
|
|
83
|
+
id: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "Ontology definition ID (Convex document ID)"
|
|
86
|
+
},
|
|
87
|
+
ontologyKey: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "Ontology key (e.g., 'investment-ontology'). Alternative to id."
|
|
90
|
+
},
|
|
91
|
+
tenantId: {
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "Tenant scope for key lookup. Omit for platform-level."
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
required: ["id"],
|
|
97
|
+
response: {
|
|
98
|
+
description: "Ontology definition with latest published version",
|
|
99
|
+
fields: {
|
|
100
|
+
id: "string \u2014 definition ID",
|
|
101
|
+
ontologyKey: "string \u2014 unique key",
|
|
102
|
+
name: "string \u2014 display name",
|
|
103
|
+
publishedVersion: "object|null \u2014 latest published version with entityTypes and edgeTypes"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
ownerModule: "graph-primitives",
|
|
107
|
+
ontologyPrimitive: "ontology",
|
|
108
|
+
tier: "showcase"
|
|
109
|
+
};
|
|
110
|
+
var APPLY_ONTOLOGY = {
|
|
111
|
+
name: "apply_ontology",
|
|
112
|
+
description: "Bind an ontology definition directly to a topic. Like `git checkout` for a domain vocabulary \u2014 applies an ontology to a topic so the topic and its descendants inherit the configured entity and edge schema.",
|
|
113
|
+
parameters: {
|
|
114
|
+
ontologyId: {
|
|
115
|
+
type: "string",
|
|
116
|
+
description: "Canonical ontology identifier to bind"
|
|
117
|
+
},
|
|
118
|
+
topicId: {
|
|
119
|
+
type: "string",
|
|
120
|
+
description: "Canonical topic identifier to receive the binding"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
required: ["ontologyId", "topicId"],
|
|
124
|
+
response: {
|
|
125
|
+
description: "Ontology binding summary",
|
|
126
|
+
fields: {
|
|
127
|
+
applied: "boolean \u2014 true when the binding was written",
|
|
128
|
+
source: "string \u2014 always 'direct' for an explicit bind",
|
|
129
|
+
ontologyId: "string \u2014 canonical ontology ID",
|
|
130
|
+
ontologyKey: "string \u2014 ontology key",
|
|
131
|
+
topicId: "string \u2014 canonical topic ID"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
ownerModule: "reasoning-kernel",
|
|
135
|
+
ontologyPrimitive: "ontology",
|
|
136
|
+
tier: "showcase"
|
|
137
|
+
};
|
|
138
|
+
var MATCH_ENTITY_TYPE = {
|
|
139
|
+
name: "match_entity_type",
|
|
140
|
+
description: "Classify free text against the effective ontology vocabulary. Like `git grep` for ontology types \u2014 ranks the most likely entity types for the supplied text using the topic-bound or explicitly selected ontology.",
|
|
141
|
+
parameters: {
|
|
142
|
+
text: {
|
|
143
|
+
type: "string",
|
|
144
|
+
description: "Free text to classify against ontology entity types"
|
|
145
|
+
},
|
|
146
|
+
topicId: {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "Canonical topic ID used to resolve the effective ontology when ontologyId is omitted"
|
|
149
|
+
},
|
|
150
|
+
ontologyId: {
|
|
151
|
+
type: "string",
|
|
152
|
+
description: "Optional ontology definition ID to match against instead of the topic-bound ontology"
|
|
153
|
+
},
|
|
154
|
+
minScore: {
|
|
155
|
+
type: "number",
|
|
156
|
+
description: "Optional lower similarity bound for returned matches"
|
|
157
|
+
},
|
|
158
|
+
limit: {
|
|
159
|
+
type: "number",
|
|
160
|
+
description: "Optional maximum number of ranked matches to return"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
required: ["text", "ontologyId"],
|
|
164
|
+
response: {
|
|
165
|
+
description: "Ranked ontology entity type matches",
|
|
166
|
+
fields: {
|
|
167
|
+
matches: "array \u2014 ranked entity type matches with score, entityType, label, and optional description",
|
|
168
|
+
ontologyId: "string|null \u2014 ontology used for matching",
|
|
169
|
+
topicId: "string|null \u2014 topic scope used for ontology resolution"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
ownerModule: "reasoning-kernel",
|
|
173
|
+
ontologyPrimitive: "ontology",
|
|
174
|
+
tier: "showcase"
|
|
175
|
+
};
|
|
176
|
+
var CREATE_ONTOLOGY = {
|
|
177
|
+
name: "create_ontology",
|
|
178
|
+
description: "Create a new ontology definition. Like `git init` for a domain vocabulary \u2014 creates a named, versioned container for entity types and edge types. Starts in 'draft' status.",
|
|
179
|
+
parameters: {
|
|
180
|
+
ontologyKey: {
|
|
181
|
+
type: "string",
|
|
182
|
+
description: "Unique key (lowercase, hyphens, e.g., 'investment-ontology')"
|
|
183
|
+
},
|
|
184
|
+
name: { type: "string", description: "Human-readable name" },
|
|
185
|
+
description: { type: "string", description: "What this ontology covers" },
|
|
186
|
+
tenantId: {
|
|
187
|
+
type: "string",
|
|
188
|
+
description: "Tenant scope. Omit for platform-level."
|
|
189
|
+
},
|
|
190
|
+
tier: {
|
|
191
|
+
type: "string",
|
|
192
|
+
description: "Ontology tier",
|
|
193
|
+
enum: ["platform", "pack", "tenant"]
|
|
194
|
+
},
|
|
195
|
+
parentOntologyId: {
|
|
196
|
+
type: "string",
|
|
197
|
+
description: "Parent ontology ID for layered composition"
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
required: ["ontologyKey", "name", "tier"],
|
|
201
|
+
response: {
|
|
202
|
+
description: "Created ontology definition",
|
|
203
|
+
fields: {
|
|
204
|
+
id: "string \u2014 new definition ID",
|
|
205
|
+
ontologyKey: "string \u2014 normalized key"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
ownerModule: "graph-primitives",
|
|
209
|
+
ontologyPrimitive: "ontology",
|
|
210
|
+
tier: "showcase"
|
|
211
|
+
};
|
|
212
|
+
var UPDATE_ONTOLOGY = {
|
|
213
|
+
name: "update_ontology",
|
|
214
|
+
description: "Update an ontology definition's metadata (name, description, status). Like `git config` for an ontology \u2014 updates mutable fields on the definition. Only allowed while the ontology is in draft or active status.",
|
|
215
|
+
parameters: {
|
|
216
|
+
id: { type: "string", description: "Ontology definition ID" },
|
|
217
|
+
name: { type: "string", description: "New display name" },
|
|
218
|
+
description: { type: "string", description: "New description" },
|
|
219
|
+
status: {
|
|
220
|
+
type: "string",
|
|
221
|
+
description: "New status",
|
|
222
|
+
enum: ["draft", "active", "deprecated"]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
required: ["id"],
|
|
226
|
+
response: {
|
|
227
|
+
description: "Update confirmation",
|
|
228
|
+
fields: { success: "boolean" }
|
|
229
|
+
},
|
|
230
|
+
ownerModule: "graph-primitives",
|
|
231
|
+
ontologyPrimitive: "ontology",
|
|
232
|
+
tier: "workhorse"
|
|
233
|
+
};
|
|
234
|
+
var ARCHIVE_ONTOLOGY = {
|
|
235
|
+
name: "archive_ontology",
|
|
236
|
+
description: "Archive an ontology definition. Like `git rm` for an ontology \u2014 soft-deletes the definition. Archived ontologies are preserved in history but no longer active.",
|
|
237
|
+
parameters: {
|
|
238
|
+
id: { type: "string", description: "Ontology definition ID to archive" }
|
|
239
|
+
},
|
|
240
|
+
required: ["id"],
|
|
241
|
+
response: {
|
|
242
|
+
description: "Archive confirmation",
|
|
243
|
+
fields: { success: "boolean" }
|
|
244
|
+
},
|
|
245
|
+
ownerModule: "graph-primitives",
|
|
246
|
+
ontologyPrimitive: "ontology",
|
|
247
|
+
tier: "workhorse"
|
|
248
|
+
};
|
|
249
|
+
var CREATE_ONTOLOGY_VERSION = {
|
|
250
|
+
name: "create_ontology_version",
|
|
251
|
+
description: "Create a new version snapshot for an ontology definition. Like `git commit` for ontology content \u2014 captures entity types and edge types in a versioned snapshot. Starts in 'draft' status. Publish to freeze.",
|
|
252
|
+
parameters: {
|
|
253
|
+
ontologyId: {
|
|
254
|
+
type: "string",
|
|
255
|
+
description: "Parent ontology definition ID"
|
|
256
|
+
},
|
|
257
|
+
version: {
|
|
258
|
+
type: "string",
|
|
259
|
+
description: "Semantic version string (X.Y.Z format)"
|
|
260
|
+
},
|
|
261
|
+
entityTypes: {
|
|
262
|
+
type: "array",
|
|
263
|
+
description: "Array of entity type definitions: [{ value, label, description?, schema?, subtypes? }]"
|
|
264
|
+
},
|
|
265
|
+
edgeTypes: {
|
|
266
|
+
type: "array",
|
|
267
|
+
description: "Array of edge type definitions: [{ value, label, description?, sourceTypes?, targetTypes?, constraintSeverity? }]"
|
|
268
|
+
},
|
|
269
|
+
releaseNotes: {
|
|
270
|
+
type: "string",
|
|
271
|
+
description: "Optional release notes for this version"
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
required: ["ontologyId", "version", "entityTypes", "edgeTypes"],
|
|
275
|
+
response: {
|
|
276
|
+
description: "Created version",
|
|
277
|
+
fields: {
|
|
278
|
+
id: "string \u2014 new version ID",
|
|
279
|
+
version: "string \u2014 version string"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
ownerModule: "graph-primitives",
|
|
283
|
+
ontologyPrimitive: "ontology",
|
|
284
|
+
tier: "showcase"
|
|
285
|
+
};
|
|
286
|
+
var PUBLISH_ONTOLOGY_VERSION = {
|
|
287
|
+
name: "publish_ontology_version",
|
|
288
|
+
description: "Publish a draft ontology version \u2014 freezes it permanently. Like `git tag` for an ontology release \u2014 the version becomes immutable after publish. If the parent definition is still in 'draft', promotes it to 'active'.",
|
|
289
|
+
parameters: {
|
|
290
|
+
id: { type: "string", description: "Ontology version ID to publish" }
|
|
291
|
+
},
|
|
292
|
+
required: ["id"],
|
|
293
|
+
response: {
|
|
294
|
+
description: "Publish confirmation",
|
|
295
|
+
fields: {
|
|
296
|
+
success: "boolean",
|
|
297
|
+
publishedAt: "number \u2014 timestamp"
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
ownerModule: "graph-primitives",
|
|
301
|
+
ontologyPrimitive: "ontology",
|
|
302
|
+
tier: "showcase"
|
|
303
|
+
};
|
|
304
|
+
var DEPRECATE_ONTOLOGY_VERSION = {
|
|
305
|
+
name: "deprecate_ontology_version",
|
|
306
|
+
description: "Deprecate a published ontology version. Like `git tag -d` for an ontology release \u2014 marks the version as deprecated. Only published versions can be deprecated.",
|
|
307
|
+
parameters: {
|
|
308
|
+
id: { type: "string", description: "Ontology version ID to deprecate" }
|
|
309
|
+
},
|
|
310
|
+
required: ["id"],
|
|
311
|
+
response: {
|
|
312
|
+
description: "Deprecation confirmation",
|
|
313
|
+
fields: { success: "boolean" }
|
|
314
|
+
},
|
|
315
|
+
ownerModule: "graph-primitives",
|
|
316
|
+
ontologyPrimitive: "ontology",
|
|
317
|
+
tier: "workhorse"
|
|
318
|
+
};
|
|
319
|
+
var RESOLVE_EFFECTIVE_ONTOLOGY = {
|
|
320
|
+
name: "resolve_effective_ontology",
|
|
321
|
+
description: "Resolve the effective ontology by composing the parent chain. Like `git merge --squash` for ontology layers \u2014 walks parentOntologyId chain (max depth 3) and merges entity/edge types additively from root (platform) to leaf (tenant).",
|
|
322
|
+
parameters: {
|
|
323
|
+
ontologyId: {
|
|
324
|
+
type: "string",
|
|
325
|
+
description: "Ontology definition ID to resolve from"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
required: ["ontologyId"],
|
|
329
|
+
response: {
|
|
330
|
+
description: "Merged ontology with composed entity and edge types",
|
|
331
|
+
fields: {
|
|
332
|
+
entityTypes: "array \u2014 merged entity types from all layers",
|
|
333
|
+
edgeTypes: "array \u2014 merged edge types from all layers",
|
|
334
|
+
layers: "array \u2014 ontology keys in composition order"
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
ownerModule: "graph-primitives",
|
|
338
|
+
ontologyPrimitive: "ontology",
|
|
339
|
+
tier: "workhorse"
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export { APPLY_ONTOLOGY, ARCHIVE_ONTOLOGY, CREATE_ONTOLOGY, CREATE_ONTOLOGY_VERSION, DEPRECATE_ONTOLOGY_VERSION, GET_ONTOLOGY, LIST_ONTOLOGIES, MANAGE_WRITE_POLICY, MATCH_ENTITY_TYPE, PUBLISH_ONTOLOGY_VERSION, RESOLVE_EFFECTIVE_ONTOLOGY, UPDATE_ONTOLOGY };
|
|
343
|
+
//# sourceMappingURL=tool-contracts.ontology.js.map
|
|
344
|
+
//# sourceMappingURL=tool-contracts.ontology.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tool-contracts.ontology.ts"],"names":[],"mappings":";AAEO,IAAM,mBAAA,GAAuC;AAAA,EAClD,IAAA,EAAM,qBAAA;AAAA,EACN,WAAA,EACE,+KAAA;AAAA,EAGF,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EACE,qEAAA;AAAA,MACF,IAAA,EAAM,CAAC,KAAA,EAAO,KAAK;AAAA,KACrB;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EAAa;AAAA,KACf;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EACE;AAAA,KACJ;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EAAa,wCAAA;AAAA,MACb,IAAA,EAAM,CAAC,OAAA,EAAS,MAAA,EAAQ,WAAW;AAAA,KACrC;AAAA,IACA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;AAAA,EACA,WAAA,EAAa,kBAAA;AAAA,EACb,iBAAA,EAAmB,UAAA;AAAA,EACnB,IAAA,EAAM;AACR;AAEO,IAAM,0BAAA,GAA8C;AAAA,EACzD,IAAA,EAAM,4BAAA;AAAA,EACN,WAAA,EACE,8OAAA;AAAA,EAGF,UAAA,EAAY;AAAA,IACV,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EAAa;AAAA;AACf,GACF;AAAA,EACA,QAAA,EAAU,CAAC,YAAY,CAAA;AAAA,EACvB,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,qDAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,WAAA,EAAa,kDAAA;AAAA,MACb,SAAA,EAAW,gDAAA;AAAA,MACX,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,WAAA,EAAa,kBAAA;AAAA,EACb,iBAAA,EAAmB,UAAA;AAAA,EACnB,IAAA,EAAM;AACR","file":"tool-contracts.ontology.js","sourcesContent":["import type { McpToolContract } from \"./tool-contracts.types\";\n\nexport const MANAGE_WRITE_POLICY: McpToolContract = {\n name: \"manage_write_policy\",\n description:\n \"Manage write policies for MCP mutation tools. \" +\n \"Like `git config` for write permissions — sets per-topic or global \" +\n \"policies that control which roles can mutate the graph.\",\n parameters: {\n action: {\n type: \"string\",\n description:\n \"Action to perform: 'get' (read policies) or 'set' (upsert a policy)\",\n enum: [\"get\", \"set\"],\n },\n topicId: {\n type: \"string\",\n description: \"Topic scope for the policy. Omit for global policies.\",\n },\n role: {\n type: \"string\",\n description:\n \"Role to set policy for (required for 'set'). E.g. 'agent:internal' or a Permit role key such as 'workspace_admin'.\",\n },\n permission: {\n type: \"string\",\n description: \"Permission level (required for 'set').\",\n enum: [\"allow\", \"deny\", \"read_only\"],\n },\n maxWritesPerSession: {\n type: \"number\",\n description: \"Optional per-session write limit for this role+scope.\",\n },\n rationale: {\n type: \"string\",\n description: \"Why this policy is being set (audit trail).\",\n },\n },\n required: [\"action\"],\n response: {\n description: \"Policy operation result\",\n fields: {\n action: \"string — get | set\",\n topicId: \"string|null — topic scope or null for global\",\n policies: \"array — (for get) list of matching policies\",\n role: \"string — (for set) role that was updated\",\n permission: \"string — (for set) new permission level\",\n maxWritesPerSession: \"number|null — (for set) session write cap\",\n },\n },\n ownerModule: \"access-control\",\n ontologyPrimitive: \"policy\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// ONTOLOGY TOOLS (ontology lifecycle, version management)\n// =============================================================================\n\nexport const LIST_ONTOLOGIES: McpToolContract = {\n name: \"list_ontologies\",\n description:\n \"List ontology definitions with optional filters. \" +\n \"Like `git remote -v` for ontologies — shows all registered ontology definitions \" +\n \"with their tier, status, and tenant scope.\",\n parameters: {\n tenantId: {\n type: \"string\",\n description: \"Filter by tenant ID. Omit for platform-level ontologies.\",\n },\n tier: {\n type: \"string\",\n description: \"Filter by tier\",\n enum: [\"platform\", \"pack\", \"tenant\"],\n },\n status: {\n type: \"string\",\n description: \"Filter by status\",\n enum: [\"draft\", \"active\", \"deprecated\", \"archived\"],\n },\n },\n required: [],\n response: {\n description: \"Array of ontology definitions\",\n fields: {\n ontologies:\n \"array — ontology definitions with id, ontologyKey, name, tier, status\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"showcase\",\n};\n\nexport const GET_ONTOLOGY: McpToolContract = {\n name: \"get_ontology\",\n description:\n \"Get a single ontology definition by ID or ontologyKey. \" +\n \"Like `git show` for an ontology — returns the definition metadata plus the latest \" +\n \"published version with entity types and edge types.\",\n parameters: {\n id: {\n type: \"string\",\n description: \"Ontology definition ID (Convex document ID)\",\n },\n ontologyKey: {\n type: \"string\",\n description:\n \"Ontology key (e.g., 'investment-ontology'). Alternative to id.\",\n },\n tenantId: {\n type: \"string\",\n description: \"Tenant scope for key lookup. Omit for platform-level.\",\n },\n },\n required: [\"id\"],\n response: {\n description: \"Ontology definition with latest published version\",\n fields: {\n id: \"string — definition ID\",\n ontologyKey: \"string — unique key\",\n name: \"string — display name\",\n publishedVersion:\n \"object|null — latest published version with entityTypes and edgeTypes\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"showcase\",\n};\n\nexport const APPLY_ONTOLOGY: McpToolContract = {\n name: \"apply_ontology\",\n description:\n \"Bind an ontology definition directly to a topic. \" +\n \"Like `git checkout` for a domain vocabulary — applies an ontology to a topic so the topic \" +\n \"and its descendants inherit the configured entity and edge schema.\",\n parameters: {\n ontologyId: {\n type: \"string\",\n description: \"Canonical ontology identifier to bind\",\n },\n topicId: {\n type: \"string\",\n description: \"Canonical topic identifier to receive the binding\",\n },\n },\n required: [\"ontologyId\", \"topicId\"],\n response: {\n description: \"Ontology binding summary\",\n fields: {\n applied: \"boolean — true when the binding was written\",\n source: \"string — always 'direct' for an explicit bind\",\n ontologyId: \"string — canonical ontology ID\",\n ontologyKey: \"string — ontology key\",\n topicId: \"string — canonical topic ID\",\n },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"ontology\",\n tier: \"showcase\",\n};\n\nexport const MATCH_ENTITY_TYPE: McpToolContract = {\n name: \"match_entity_type\",\n description:\n \"Classify free text against the effective ontology vocabulary. \" +\n \"Like `git grep` for ontology types — ranks the most likely entity types for the supplied text \" +\n \"using the topic-bound or explicitly selected ontology.\",\n parameters: {\n text: {\n type: \"string\",\n description: \"Free text to classify against ontology entity types\",\n },\n topicId: {\n type: \"string\",\n description:\n \"Canonical topic ID used to resolve the effective ontology when ontologyId is omitted\",\n },\n ontologyId: {\n type: \"string\",\n description:\n \"Optional ontology definition ID to match against instead of the topic-bound ontology\",\n },\n minScore: {\n type: \"number\",\n description: \"Optional lower similarity bound for returned matches\",\n },\n limit: {\n type: \"number\",\n description: \"Optional maximum number of ranked matches to return\",\n },\n },\n required: [\"text\", \"ontologyId\"],\n response: {\n description: \"Ranked ontology entity type matches\",\n fields: {\n matches:\n \"array — ranked entity type matches with score, entityType, label, and optional description\",\n ontologyId: \"string|null — ontology used for matching\",\n topicId: \"string|null — topic scope used for ontology resolution\",\n },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"ontology\",\n tier: \"showcase\",\n};\n\nexport const CREATE_ONTOLOGY: McpToolContract = {\n name: \"create_ontology\",\n description:\n \"Create a new ontology definition. \" +\n \"Like `git init` for a domain vocabulary — creates a named, versioned container for \" +\n \"entity types and edge types. Starts in 'draft' status.\",\n parameters: {\n ontologyKey: {\n type: \"string\",\n description:\n \"Unique key (lowercase, hyphens, e.g., 'investment-ontology')\",\n },\n name: { type: \"string\", description: \"Human-readable name\" },\n description: { type: \"string\", description: \"What this ontology covers\" },\n tenantId: {\n type: \"string\",\n description: \"Tenant scope. Omit for platform-level.\",\n },\n tier: {\n type: \"string\",\n description: \"Ontology tier\",\n enum: [\"platform\", \"pack\", \"tenant\"],\n },\n parentOntologyId: {\n type: \"string\",\n description: \"Parent ontology ID for layered composition\",\n },\n },\n required: [\"ontologyKey\", \"name\", \"tier\"],\n response: {\n description: \"Created ontology definition\",\n fields: {\n id: \"string — new definition ID\",\n ontologyKey: \"string — normalized key\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"showcase\",\n};\n\nexport const UPDATE_ONTOLOGY: McpToolContract = {\n name: \"update_ontology\",\n description:\n \"Update an ontology definition's metadata (name, description, status). \" +\n \"Like `git config` for an ontology — updates mutable fields on the definition. \" +\n \"Only allowed while the ontology is in draft or active status.\",\n parameters: {\n id: { type: \"string\", description: \"Ontology definition ID\" },\n name: { type: \"string\", description: \"New display name\" },\n description: { type: \"string\", description: \"New description\" },\n status: {\n type: \"string\",\n description: \"New status\",\n enum: [\"draft\", \"active\", \"deprecated\"],\n },\n },\n required: [\"id\"],\n response: {\n description: \"Update confirmation\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"workhorse\",\n};\n\nexport const ARCHIVE_ONTOLOGY: McpToolContract = {\n name: \"archive_ontology\",\n description:\n \"Archive an ontology definition. \" +\n \"Like `git rm` for an ontology — soft-deletes the definition. \" +\n \"Archived ontologies are preserved in history but no longer active.\",\n parameters: {\n id: { type: \"string\", description: \"Ontology definition ID to archive\" },\n },\n required: [\"id\"],\n response: {\n description: \"Archive confirmation\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"workhorse\",\n};\n\nexport const CREATE_ONTOLOGY_VERSION: McpToolContract = {\n name: \"create_ontology_version\",\n description:\n \"Create a new version snapshot for an ontology definition. \" +\n \"Like `git commit` for ontology content — captures entity types and edge types \" +\n \"in a versioned snapshot. Starts in 'draft' status. Publish to freeze.\",\n parameters: {\n ontologyId: {\n type: \"string\",\n description: \"Parent ontology definition ID\",\n },\n version: {\n type: \"string\",\n description: \"Semantic version string (X.Y.Z format)\",\n },\n entityTypes: {\n type: \"array\",\n description:\n \"Array of entity type definitions: [{ value, label, description?, schema?, subtypes? }]\",\n },\n edgeTypes: {\n type: \"array\",\n description:\n \"Array of edge type definitions: [{ value, label, description?, sourceTypes?, targetTypes?, constraintSeverity? }]\",\n },\n releaseNotes: {\n type: \"string\",\n description: \"Optional release notes for this version\",\n },\n },\n required: [\"ontologyId\", \"version\", \"entityTypes\", \"edgeTypes\"],\n response: {\n description: \"Created version\",\n fields: {\n id: \"string — new version ID\",\n version: \"string — version string\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"showcase\",\n};\n\nexport const PUBLISH_ONTOLOGY_VERSION: McpToolContract = {\n name: \"publish_ontology_version\",\n description:\n \"Publish a draft ontology version — freezes it permanently. \" +\n \"Like `git tag` for an ontology release — the version becomes immutable after publish. \" +\n \"If the parent definition is still in 'draft', promotes it to 'active'.\",\n parameters: {\n id: { type: \"string\", description: \"Ontology version ID to publish\" },\n },\n required: [\"id\"],\n response: {\n description: \"Publish confirmation\",\n fields: {\n success: \"boolean\",\n publishedAt: \"number — timestamp\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"showcase\",\n};\n\nexport const DEPRECATE_ONTOLOGY_VERSION: McpToolContract = {\n name: \"deprecate_ontology_version\",\n description:\n \"Deprecate a published ontology version. \" +\n \"Like `git tag -d` for an ontology release — marks the version as deprecated. \" +\n \"Only published versions can be deprecated.\",\n parameters: {\n id: { type: \"string\", description: \"Ontology version ID to deprecate\" },\n },\n required: [\"id\"],\n response: {\n description: \"Deprecation confirmation\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"workhorse\",\n};\n\nexport const RESOLVE_EFFECTIVE_ONTOLOGY: McpToolContract = {\n name: \"resolve_effective_ontology\",\n description:\n \"Resolve the effective ontology by composing the parent chain. \" +\n \"Like `git merge --squash` for ontology layers — walks parentOntologyId chain \" +\n \"(max depth 3) and merges entity/edge types additively from root (platform) to leaf (tenant).\",\n parameters: {\n ontologyId: {\n type: \"string\",\n description: \"Ontology definition ID to resolve from\",\n },\n },\n required: [\"ontologyId\"],\n response: {\n description: \"Merged ontology with composed entity and edge types\",\n fields: {\n entityTypes: \"array — merged entity types from all layers\",\n edgeTypes: \"array — merged edge types from all layers\",\n layers: \"array — ontology keys in composition order\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"ontology\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// FUNCTION SURFACE WORKFLOW TOOLS\n// =============================================================================\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { McpToolContract } from './tool-contracts.types.js';
|
|
2
|
+
|
|
3
|
+
declare const RECORD_SCOPE_LEARNING: McpToolContract;
|
|
4
|
+
declare const PIPELINE_SNAPSHOT: McpToolContract;
|
|
5
|
+
declare const DISCOVER: McpToolContract;
|
|
6
|
+
declare const ANALYZE_TOPIC_DENSITY: McpToolContract;
|
|
7
|
+
declare const APPLY_AUTO_BRANCHING: McpToolContract;
|
|
8
|
+
declare const SEED_BELIEF_LATTICE: McpToolContract;
|
|
9
|
+
declare const GET_LATTICE_COVERAGE: McpToolContract;
|
|
10
|
+
declare const DISCOVER_ENTITY_CONNECTIONS: McpToolContract;
|
|
11
|
+
declare const TRIGGER_BELIEF_REVIEW: McpToolContract;
|
|
12
|
+
declare const EVALUATE_CONTRACT: McpToolContract;
|
|
13
|
+
declare const GET_CONTRACT_STATUS: McpToolContract;
|
|
14
|
+
declare const REGISTER_SESSION: McpToolContract;
|
|
15
|
+
declare const HEARTBEAT_SESSION: McpToolContract;
|
|
16
|
+
declare const END_SESSION: McpToolContract;
|
|
17
|
+
declare const LIST_ACTIVE_SESSIONS: McpToolContract;
|
|
18
|
+
declare const SEND_AGENT_MESSAGE: McpToolContract;
|
|
19
|
+
declare const BROADCAST_MESSAGE: McpToolContract;
|
|
20
|
+
declare const GET_AGENT_INBOX: McpToolContract;
|
|
21
|
+
declare const CLAIM_FILES: McpToolContract;
|
|
22
|
+
declare const GENERATE_SESSION_HANDOFF: McpToolContract;
|
|
23
|
+
declare const BEGIN_BUILD_SESSION: McpToolContract;
|
|
24
|
+
|
|
25
|
+
export { ANALYZE_TOPIC_DENSITY, APPLY_AUTO_BRANCHING, BEGIN_BUILD_SESSION, BROADCAST_MESSAGE, CLAIM_FILES, DISCOVER, DISCOVER_ENTITY_CONNECTIONS, END_SESSION, EVALUATE_CONTRACT, GENERATE_SESSION_HANDOFF, GET_AGENT_INBOX, GET_CONTRACT_STATUS, GET_LATTICE_COVERAGE, HEARTBEAT_SESSION, LIST_ACTIVE_SESSIONS, PIPELINE_SNAPSHOT, RECORD_SCOPE_LEARNING, REGISTER_SESSION, SEED_BELIEF_LATTICE, SEND_AGENT_MESSAGE, TRIGGER_BELIEF_REVIEW };
|