@lucern/events 0.3.0-alpha.3 → 0.3.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1281 -67
- package/dist/index.js.map +1 -1
- package/dist/outbox.js +1281 -67
- package/dist/outbox.js.map +1 -1
- package/dist/types.js +1281 -67
- package/dist/types.js.map +1 -1
- package/dist/webhooks.js +1281 -67
- package/dist/webhooks.js.map +1 -1
- package/package.json +2 -2
package/dist/types.js
CHANGED
|
@@ -3878,7 +3878,9 @@ defineTable({
|
|
|
3878
3878
|
"defaultProjectVisibility": z.enum(["private", "team", "firm", "external", "public"]).optional(),
|
|
3879
3879
|
"deployments": z.record(z.object({
|
|
3880
3880
|
"url": z.string(),
|
|
3881
|
-
"
|
|
3881
|
+
"target": z.enum(["kernelDeployment", "appDeployment"]).optional(),
|
|
3882
|
+
"encryptedDeployKey": z.string().optional(),
|
|
3883
|
+
"credentialRef": z.string().optional()
|
|
3882
3884
|
})).optional(),
|
|
3883
3885
|
"metadata": z.record(z.any()).optional(),
|
|
3884
3886
|
"createdBy": z.string().optional(),
|
|
@@ -5075,6 +5077,14 @@ var ADD_WORKTREE = {
|
|
|
5075
5077
|
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.",
|
|
5076
5078
|
parameters: {
|
|
5077
5079
|
title: { type: "string", description: "Worktree name/objective" },
|
|
5080
|
+
name: {
|
|
5081
|
+
type: "string",
|
|
5082
|
+
description: "Optional storage-name alias for callers that already use backend naming"
|
|
5083
|
+
},
|
|
5084
|
+
projectId: {
|
|
5085
|
+
type: "string",
|
|
5086
|
+
description: "Legacy topicId alias"
|
|
5087
|
+
},
|
|
5078
5088
|
topicId: { type: "string", description: "Optional topic scope hint" },
|
|
5079
5089
|
branchId: {
|
|
5080
5090
|
type: "string",
|
|
@@ -5088,14 +5098,87 @@ var ADD_WORKTREE = {
|
|
|
5088
5098
|
type: "string",
|
|
5089
5099
|
description: "The testable claim this worktree investigates"
|
|
5090
5100
|
},
|
|
5101
|
+
rationale: {
|
|
5102
|
+
type: "string",
|
|
5103
|
+
description: "Why this worktree exists and why it belongs in the campaign"
|
|
5104
|
+
},
|
|
5105
|
+
worktreeType: {
|
|
5106
|
+
type: "string",
|
|
5107
|
+
description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
|
|
5108
|
+
},
|
|
5109
|
+
gate: {
|
|
5110
|
+
type: "string",
|
|
5111
|
+
description: "Exit gate name for this worktree"
|
|
5112
|
+
},
|
|
5113
|
+
startDate: {
|
|
5114
|
+
type: "number",
|
|
5115
|
+
description: "Planned start timestamp in milliseconds since epoch"
|
|
5116
|
+
},
|
|
5117
|
+
endDate: {
|
|
5118
|
+
type: "number",
|
|
5119
|
+
description: "Planned end timestamp in milliseconds since epoch"
|
|
5120
|
+
},
|
|
5121
|
+
durationWeeks: {
|
|
5122
|
+
type: "number",
|
|
5123
|
+
description: "Planned duration in weeks"
|
|
5124
|
+
},
|
|
5125
|
+
confidenceImpact: {
|
|
5126
|
+
type: "string",
|
|
5127
|
+
description: "Expected confidence impact if the worktree succeeds",
|
|
5128
|
+
enum: ["high", "medium", "low"]
|
|
5129
|
+
},
|
|
5130
|
+
beliefFocus: {
|
|
5131
|
+
type: "string",
|
|
5132
|
+
description: "Natural-language focus spanning the target belief neighborhood"
|
|
5133
|
+
},
|
|
5091
5134
|
beliefIds: {
|
|
5092
5135
|
type: "array",
|
|
5093
|
-
description: "
|
|
5136
|
+
description: "Legacy alias for targetBeliefIds"
|
|
5137
|
+
},
|
|
5138
|
+
beliefs: {
|
|
5139
|
+
type: "array",
|
|
5140
|
+
description: "Legacy alias for targetBeliefIds"
|
|
5141
|
+
},
|
|
5142
|
+
targetBeliefIds: {
|
|
5143
|
+
type: "array",
|
|
5144
|
+
description: "Belief node IDs this worktree is expected to test or update"
|
|
5145
|
+
},
|
|
5146
|
+
targetQuestionIds: {
|
|
5147
|
+
type: "array",
|
|
5148
|
+
description: "Question node IDs this worktree is expected to answer"
|
|
5149
|
+
},
|
|
5150
|
+
keyQuestions: {
|
|
5151
|
+
type: "array",
|
|
5152
|
+
description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
|
|
5153
|
+
},
|
|
5154
|
+
evidenceSignals: {
|
|
5155
|
+
type: "array",
|
|
5156
|
+
description: "Evidence signal objects with signal, optional collected state, progress, and notes"
|
|
5157
|
+
},
|
|
5158
|
+
decisionGate: {
|
|
5159
|
+
type: "object",
|
|
5160
|
+
description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
|
|
5161
|
+
},
|
|
5162
|
+
goCriteria: {
|
|
5163
|
+
type: "array",
|
|
5164
|
+
description: "Shorthand go criteria used to build decisionGate"
|
|
5165
|
+
},
|
|
5166
|
+
noGoSignals: {
|
|
5167
|
+
type: "array",
|
|
5168
|
+
description: "Shorthand no-go signals used to build decisionGate"
|
|
5169
|
+
},
|
|
5170
|
+
proofArtifacts: {
|
|
5171
|
+
type: "array",
|
|
5172
|
+
description: "Expected proof artifacts required to close the worktree"
|
|
5094
5173
|
},
|
|
5095
5174
|
autoShape: {
|
|
5096
5175
|
type: "boolean",
|
|
5097
5176
|
description: "Whether to invoke inquiry auto-shaping during worktree creation"
|
|
5098
5177
|
},
|
|
5178
|
+
autoFixPolicy: {
|
|
5179
|
+
type: "object",
|
|
5180
|
+
description: "Policy for permitted automatic remediation inside the worktree"
|
|
5181
|
+
},
|
|
5099
5182
|
domainPackId: {
|
|
5100
5183
|
type: "string",
|
|
5101
5184
|
description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
|
|
@@ -5124,9 +5207,17 @@ var ADD_WORKTREE = {
|
|
|
5124
5207
|
type: "array",
|
|
5125
5208
|
description: "Worktree IDs blocked by this worktree"
|
|
5126
5209
|
},
|
|
5127
|
-
|
|
5210
|
+
staffingHint: {
|
|
5128
5211
|
type: "string",
|
|
5129
|
-
description: "
|
|
5212
|
+
description: "Suggested staffing or agent allocation note"
|
|
5213
|
+
},
|
|
5214
|
+
lensId: {
|
|
5215
|
+
type: "string",
|
|
5216
|
+
description: "Lens that scopes this worktree when applicable"
|
|
5217
|
+
},
|
|
5218
|
+
lastReconciledAt: {
|
|
5219
|
+
type: "number",
|
|
5220
|
+
description: "Timestamp when worktree metadata was last reconciled"
|
|
5130
5221
|
}
|
|
5131
5222
|
},
|
|
5132
5223
|
required: ["title", "topicId"],
|
|
@@ -5156,7 +5247,7 @@ var MERGE = {
|
|
|
5156
5247
|
worktreeId: { type: "string", description: "The worktree to merge" },
|
|
5157
5248
|
outcomes: {
|
|
5158
5249
|
type: "array",
|
|
5159
|
-
description: "
|
|
5250
|
+
description: "Merge outcomes as key-finding strings, or scoring outcomes for beliefs: { beliefId, confidence, rationale }"
|
|
5160
5251
|
},
|
|
5161
5252
|
summary: { type: "string", description: "Overall findings summary" }
|
|
5162
5253
|
},
|
|
@@ -8175,6 +8266,69 @@ var GENERATE_SESSION_HANDOFF = {
|
|
|
8175
8266
|
tier: "showcase",
|
|
8176
8267
|
internal: true
|
|
8177
8268
|
};
|
|
8269
|
+
var BEGIN_BUILD_SESSION = {
|
|
8270
|
+
name: "begin_build_session",
|
|
8271
|
+
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.",
|
|
8272
|
+
parameters: {
|
|
8273
|
+
worktreeId: {
|
|
8274
|
+
type: "string",
|
|
8275
|
+
description: "The Lucern worktree ID to bootstrap."
|
|
8276
|
+
},
|
|
8277
|
+
branch: {
|
|
8278
|
+
type: "string",
|
|
8279
|
+
description: "Optional git branch name. Auto-generated from the worktree name when omitted."
|
|
8280
|
+
},
|
|
8281
|
+
branchBase: {
|
|
8282
|
+
type: "string",
|
|
8283
|
+
description: 'Base branch for the feature branch. Default: "staging".'
|
|
8284
|
+
},
|
|
8285
|
+
prBase: {
|
|
8286
|
+
type: "string",
|
|
8287
|
+
description: 'Target branch for the PR. Default: "staging".'
|
|
8288
|
+
},
|
|
8289
|
+
sessionMode: {
|
|
8290
|
+
type: "string",
|
|
8291
|
+
description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
|
|
8292
|
+
enum: ["async", "interactive"]
|
|
8293
|
+
},
|
|
8294
|
+
activateIfPlanning: {
|
|
8295
|
+
type: "boolean",
|
|
8296
|
+
description: "When true, automatically activate a planning worktree during bootstrap."
|
|
8297
|
+
}
|
|
8298
|
+
},
|
|
8299
|
+
required: ["worktreeId"],
|
|
8300
|
+
response: {
|
|
8301
|
+
description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
|
|
8302
|
+
fields: {
|
|
8303
|
+
topicId: "string \u2014 canonical topic scope",
|
|
8304
|
+
topicName: "string \u2014 human-readable topic name",
|
|
8305
|
+
worktreeId: "string \u2014 worktree ID",
|
|
8306
|
+
worktreeName: "string \u2014 human-readable worktree name",
|
|
8307
|
+
branch: "string \u2014 git branch name",
|
|
8308
|
+
branchBase: "string \u2014 base branch",
|
|
8309
|
+
prBase: "string \u2014 PR target branch",
|
|
8310
|
+
campaign: "number | null \u2014 top-level pipeline campaign",
|
|
8311
|
+
lane: "string \u2014 campaign lane",
|
|
8312
|
+
gate: "string \u2014 exit gate",
|
|
8313
|
+
hypothesis: "string \u2014 worktree hypothesis",
|
|
8314
|
+
focus: "string \u2014 session focus",
|
|
8315
|
+
status: "string \u2014 worktree status after optional activation",
|
|
8316
|
+
sessionMode: "string \u2014 async | interactive",
|
|
8317
|
+
targetBeliefIds: "array \u2014 scoped belief IDs",
|
|
8318
|
+
targetQuestionIds: "array \u2014 scoped question IDs",
|
|
8319
|
+
topBeliefs: "array \u2014 highest-confidence scoped beliefs",
|
|
8320
|
+
openQuestions: "array \u2014 open scoped questions",
|
|
8321
|
+
resolvedDecisions: "array \u2014 answered questions summarized for the session",
|
|
8322
|
+
dependencies: "array \u2014 upstream worktrees",
|
|
8323
|
+
unblocks: "array \u2014 downstream worktrees",
|
|
8324
|
+
mergeOrderNotes: "string \u2014 merge ordering advisory"
|
|
8325
|
+
}
|
|
8326
|
+
},
|
|
8327
|
+
ownerModule: "bootstrap",
|
|
8328
|
+
ontologyPrimitive: "worktree",
|
|
8329
|
+
tier: "showcase",
|
|
8330
|
+
internal: true
|
|
8331
|
+
};
|
|
8178
8332
|
var MCP_TOOL_CONTRACTS = {
|
|
8179
8333
|
// Belief lifecycle (commit, amend, fork, archive)
|
|
8180
8334
|
create_belief: CREATE_BELIEF,
|
|
@@ -8268,6 +8422,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
8268
8422
|
get_agent_inbox: GET_AGENT_INBOX,
|
|
8269
8423
|
claim_files: CLAIM_FILES,
|
|
8270
8424
|
generate_session_handoff: GENERATE_SESSION_HANDOFF,
|
|
8425
|
+
begin_build_session: BEGIN_BUILD_SESSION,
|
|
8271
8426
|
// Policy / ACL (workhorse)
|
|
8272
8427
|
check_permission: CHECK_PERMISSION,
|
|
8273
8428
|
filter_by_permission: FILTER_BY_PERMISSION,
|
|
@@ -8481,6 +8636,7 @@ var PLATFORM_INTERNAL_OPERATION_NAMES = [
|
|
|
8481
8636
|
"get_change_history",
|
|
8482
8637
|
"get_failure_log",
|
|
8483
8638
|
"record_attempt",
|
|
8639
|
+
"begin_build_session",
|
|
8484
8640
|
"push",
|
|
8485
8641
|
"open_pull_request",
|
|
8486
8642
|
"record_judgment",
|
|
@@ -8535,7 +8691,6 @@ var SDK_ONLY_OPERATION_NAMES = [
|
|
|
8535
8691
|
"find_semantic_orphans"
|
|
8536
8692
|
];
|
|
8537
8693
|
var MCP_ONLY_INTERNAL_OPERATION_NAMES = [
|
|
8538
|
-
"begin_build_session",
|
|
8539
8694
|
"evaluate_engineering_contract",
|
|
8540
8695
|
"evaluate_research_contract"
|
|
8541
8696
|
];
|
|
@@ -8921,8 +9076,31 @@ function assertSurfaceCoverage(contracts) {
|
|
|
8921
9076
|
}
|
|
8922
9077
|
}
|
|
8923
9078
|
}
|
|
8924
|
-
|
|
8925
|
-
|
|
9079
|
+
var jsonRecordSchema2 = z.record(z.unknown());
|
|
9080
|
+
var observationArgs = z.object({
|
|
9081
|
+
topicId: z.string().optional().describe("Topic scope for the observation."),
|
|
9082
|
+
summary: z.string().describe("Short observation summary."),
|
|
9083
|
+
text: z.string().optional().describe("Canonical observation text alias."),
|
|
9084
|
+
title: z.string().optional().describe("Optional observation title."),
|
|
9085
|
+
content: z.string().optional().describe("Optional rich observation content."),
|
|
9086
|
+
contentType: z.string().optional().describe("Observation content type."),
|
|
9087
|
+
kind: z.string().optional().describe("Evidence kind to store."),
|
|
9088
|
+
observationType: z.string().optional().describe("Observation type."),
|
|
9089
|
+
tags: z.array(z.string()).optional().describe("Observation tags."),
|
|
9090
|
+
source: z.string().optional().describe("Observation source label."),
|
|
9091
|
+
sourceType: z.string().optional().describe("Evidence source type."),
|
|
9092
|
+
externalSourceType: z.string().optional().describe("External source type for imported observations."),
|
|
9093
|
+
sourceUrl: z.string().optional().describe("Canonical source URL."),
|
|
9094
|
+
confidence: z.number().optional().describe("Observation confidence."),
|
|
9095
|
+
metadata: jsonRecordSchema2.optional().describe("Observation metadata."),
|
|
9096
|
+
rationale: z.string().optional().describe("Why this observation should be recorded.")
|
|
9097
|
+
});
|
|
9098
|
+
var observationContextArgs = z.object({
|
|
9099
|
+
topicId: z.string().describe("Topic scope."),
|
|
9100
|
+
query: z.string().optional().describe("Optional context query."),
|
|
9101
|
+
limit: z.number().optional().describe("Maximum observations to return."),
|
|
9102
|
+
status: z.string().optional().describe("Observation status filter.")
|
|
9103
|
+
});
|
|
8926
9104
|
var observationInput = (input, context) => withUserId(
|
|
8927
9105
|
compactRecord4({
|
|
8928
9106
|
projectId: input.projectId,
|
|
@@ -8981,7 +9159,8 @@ var contextContracts = [
|
|
|
8981
9159
|
observationId: output && typeof output === "object" ? output.nodeId : void 0,
|
|
8982
9160
|
observationType: input.observationType
|
|
8983
9161
|
})
|
|
8984
|
-
}
|
|
9162
|
+
},
|
|
9163
|
+
args: observationArgs
|
|
8985
9164
|
}),
|
|
8986
9165
|
surfaceContract({
|
|
8987
9166
|
name: "get_observation_context",
|
|
@@ -9002,7 +9181,8 @@ var contextContracts = [
|
|
|
9002
9181
|
status: input.status,
|
|
9003
9182
|
userId: input.userId
|
|
9004
9183
|
})
|
|
9005
|
-
}
|
|
9184
|
+
},
|
|
9185
|
+
args: observationContextArgs
|
|
9006
9186
|
})
|
|
9007
9187
|
];
|
|
9008
9188
|
|
|
@@ -9065,8 +9245,45 @@ var identityContracts = [
|
|
|
9065
9245
|
}
|
|
9066
9246
|
})
|
|
9067
9247
|
];
|
|
9068
|
-
|
|
9069
|
-
|
|
9248
|
+
var jsonRecordSchema3 = z.record(z.unknown());
|
|
9249
|
+
var sourceTypeSchema = z.enum(["human", "ai_extracted", "ai_generated"]);
|
|
9250
|
+
var reversibilitySchema = z.enum([
|
|
9251
|
+
"irreversible",
|
|
9252
|
+
"hard_to_reverse",
|
|
9253
|
+
"reversible",
|
|
9254
|
+
"trivial"
|
|
9255
|
+
]);
|
|
9256
|
+
var predictionMetaSchema = z.object({
|
|
9257
|
+
isPrediction: z.boolean().describe("Whether this belief is a prediction."),
|
|
9258
|
+
registeredAt: z.number().describe("Timestamp when the prediction was registered."),
|
|
9259
|
+
expectedBy: z.number().optional().describe("Timestamp when the prediction should be evaluated.")
|
|
9260
|
+
});
|
|
9261
|
+
var createBeliefArgs = z.object({
|
|
9262
|
+
canonicalText: z.string().describe("The belief statement the agent holds to be true."),
|
|
9263
|
+
topicId: z.string().optional().describe("Topic scope hint for the belief."),
|
|
9264
|
+
baseRate: z.number().optional().describe("Prior base rate used to seed the vacuous opinion."),
|
|
9265
|
+
beliefType: z.string().optional().describe("Schema belief type."),
|
|
9266
|
+
metadata: jsonRecordSchema3.optional().describe("Extra metadata merged into the belief node."),
|
|
9267
|
+
rationale: z.string().optional().describe("Why this belief should enter the reasoning graph."),
|
|
9268
|
+
pillar: z.string().optional().describe("Innovation pillar or product pillar associated with the belief."),
|
|
9269
|
+
worktreeId: z.string().optional().describe("Worktree responsible for creating or testing this belief."),
|
|
9270
|
+
sourceBeliefIds: z.array(z.string()).optional().describe("Source belief IDs this belief derives from."),
|
|
9271
|
+
sourceType: sourceTypeSchema.optional().describe("Actor/source class that produced the belief."),
|
|
9272
|
+
reversibility: reversibilitySchema.optional().describe("How reversible the belief's implied decision is."),
|
|
9273
|
+
predictionMeta: predictionMetaSchema.optional().describe("Prediction lifecycle metadata when this belief is a forecast.")
|
|
9274
|
+
});
|
|
9275
|
+
var forkBeliefArgs = z.object({
|
|
9276
|
+
nodeId: z.string().describe("The scored belief to fork from."),
|
|
9277
|
+
newFormulation: z.string().describe("The evolved belief statement."),
|
|
9278
|
+
forkReason: z.enum([
|
|
9279
|
+
"refinement",
|
|
9280
|
+
"contradiction_response",
|
|
9281
|
+
"scope_change",
|
|
9282
|
+
"confidence_collapse",
|
|
9283
|
+
"manual"
|
|
9284
|
+
]).describe("Why this fork was created."),
|
|
9285
|
+
rationale: z.string().optional().describe("Why the fork is warranted.")
|
|
9286
|
+
});
|
|
9070
9287
|
var beliefLookupInput = (input) => compactRecord4({
|
|
9071
9288
|
nodeId: input.nodeId ?? input.id ?? input.beliefId,
|
|
9072
9289
|
beliefId: input.beliefId
|
|
@@ -9141,7 +9358,8 @@ var beliefsContracts = [
|
|
|
9141
9358
|
functionName: "create",
|
|
9142
9359
|
kind: "mutation",
|
|
9143
9360
|
inputProjection: createBeliefInput
|
|
9144
|
-
}
|
|
9361
|
+
},
|
|
9362
|
+
args: createBeliefArgs
|
|
9145
9363
|
}),
|
|
9146
9364
|
surfaceContract({
|
|
9147
9365
|
name: "get_belief",
|
|
@@ -9232,7 +9450,8 @@ var beliefsContracts = [
|
|
|
9232
9450
|
functionName: "forkBelief",
|
|
9233
9451
|
kind: "mutation",
|
|
9234
9452
|
inputProjection: forkBeliefInput
|
|
9235
|
-
}
|
|
9453
|
+
},
|
|
9454
|
+
args: forkBeliefArgs
|
|
9236
9455
|
}),
|
|
9237
9456
|
surfaceContract({
|
|
9238
9457
|
name: "archive_belief",
|
|
@@ -9313,8 +9532,46 @@ var beliefsContracts = [
|
|
|
9313
9532
|
}
|
|
9314
9533
|
})
|
|
9315
9534
|
];
|
|
9316
|
-
|
|
9317
|
-
|
|
9535
|
+
var jsonRecordSchema4 = z.record(z.unknown());
|
|
9536
|
+
var evidenceRelationSchema = z.enum(["supports", "contradicts", "neutral"]);
|
|
9537
|
+
var createEvidenceArgs = z.object({
|
|
9538
|
+
topicId: z.string().optional().describe("Topic scope for the evidence."),
|
|
9539
|
+
text: z.string().describe("Canonical evidence text."),
|
|
9540
|
+
source: z.string().optional().describe("Source URL or source label."),
|
|
9541
|
+
sourceUrl: z.string().optional().describe("Canonical source URL."),
|
|
9542
|
+
targetId: z.string().optional().describe("Belief or question identifier to link immediately."),
|
|
9543
|
+
linkedBeliefNodeId: z.string().optional().describe("Belief node this evidence bears on."),
|
|
9544
|
+
evidenceRelation: evidenceRelationSchema.optional().describe("How the evidence relates to the linked belief."),
|
|
9545
|
+
confidence: z.number().optional().describe("Confidence in the evidence relation."),
|
|
9546
|
+
weight: z.number().optional().describe("Support weight from -1.0 to +1.0."),
|
|
9547
|
+
metadata: jsonRecordSchema4.optional().describe("Metadata merged into the canonical evidence node."),
|
|
9548
|
+
rationale: z.string().describe("Why this evidence should enter the reasoning graph."),
|
|
9549
|
+
reasoning: z.string().optional().describe("Reasoning note preserved in evidence metadata."),
|
|
9550
|
+
title: z.string().optional().describe("Optional short title."),
|
|
9551
|
+
content: z.string().optional().describe("Optional long-form content."),
|
|
9552
|
+
contentType: z.string().optional().describe("Content format or MIME hint."),
|
|
9553
|
+
kind: z.string().optional().describe("Evidence kind."),
|
|
9554
|
+
tags: z.array(z.string()).optional().describe("Evidence tags."),
|
|
9555
|
+
sourceType: z.string().optional().describe("Evidence source type."),
|
|
9556
|
+
externalSourceType: z.string().optional().describe("External source type for imported evidence."),
|
|
9557
|
+
sourceQuestionId: z.string().optional().describe("Question that sourced this evidence."),
|
|
9558
|
+
methodology: z.string().optional().describe("Collection methodology."),
|
|
9559
|
+
informationAsymmetry: z.string().optional().describe("Information asymmetry class."),
|
|
9560
|
+
sourceDescription: z.string().optional().describe("Human-readable source description.")
|
|
9561
|
+
});
|
|
9562
|
+
var addEvidenceArgs = z.object({
|
|
9563
|
+
canonicalText: z.string().describe("The evidence statement."),
|
|
9564
|
+
text: z.string().optional().describe("Canonical evidence text alias used by newer callers."),
|
|
9565
|
+
topicId: z.string().optional().describe("Topic scope hint."),
|
|
9566
|
+
sourceUrl: z.string().optional().describe("URL of the source material."),
|
|
9567
|
+
targetNodeId: z.string().describe("The belief this evidence bears on."),
|
|
9568
|
+
weight: z.number().optional().describe("Support weight from -1.0 to +1.0."),
|
|
9569
|
+
reasoning: z.string().describe("Why this evidence is relevant to the target belief."),
|
|
9570
|
+
title: z.string().optional().describe("Optional short title."),
|
|
9571
|
+
content: z.string().optional().describe("Optional long-form evidence content."),
|
|
9572
|
+
contentType: z.string().optional().describe("Content format or MIME hint."),
|
|
9573
|
+
metadata: jsonRecordSchema4.optional().describe("Optional metadata merged into the evidence node.")
|
|
9574
|
+
});
|
|
9318
9575
|
var evidenceIdInput = (input) => compactRecord4({
|
|
9319
9576
|
evidenceId: input.evidenceId,
|
|
9320
9577
|
insightId: input.insightId,
|
|
@@ -9389,7 +9646,8 @@ var evidenceContracts = [
|
|
|
9389
9646
|
functionName: "create",
|
|
9390
9647
|
kind: "mutation",
|
|
9391
9648
|
inputProjection: createEvidenceInput
|
|
9392
|
-
}
|
|
9649
|
+
},
|
|
9650
|
+
args: createEvidenceArgs
|
|
9393
9651
|
}),
|
|
9394
9652
|
surfaceContract({
|
|
9395
9653
|
name: "add_evidence",
|
|
@@ -9425,7 +9683,8 @@ var evidenceContracts = [
|
|
|
9425
9683
|
context
|
|
9426
9684
|
);
|
|
9427
9685
|
}
|
|
9428
|
-
}
|
|
9686
|
+
},
|
|
9687
|
+
args: addEvidenceArgs
|
|
9429
9688
|
}),
|
|
9430
9689
|
surfaceContract({
|
|
9431
9690
|
name: "get_evidence",
|
|
@@ -9532,8 +9791,91 @@ var evidenceContracts = [
|
|
|
9532
9791
|
}
|
|
9533
9792
|
})
|
|
9534
9793
|
];
|
|
9535
|
-
|
|
9536
|
-
|
|
9794
|
+
var jsonRecordSchema5 = z.record(z.unknown());
|
|
9795
|
+
var questionPrioritySchema = z.enum(["urgent", "high", "medium", "low"]);
|
|
9796
|
+
var kernelQuestionPrioritySchema = z.enum([
|
|
9797
|
+
"critical",
|
|
9798
|
+
"high",
|
|
9799
|
+
"medium",
|
|
9800
|
+
"low"
|
|
9801
|
+
]);
|
|
9802
|
+
var questionTypeSchema = z.enum([
|
|
9803
|
+
"validation",
|
|
9804
|
+
"falsification",
|
|
9805
|
+
"assumption_probe",
|
|
9806
|
+
"prediction_test",
|
|
9807
|
+
"counterfactual",
|
|
9808
|
+
"discovery",
|
|
9809
|
+
"clarification",
|
|
9810
|
+
"comparison",
|
|
9811
|
+
"causal",
|
|
9812
|
+
"mechanism",
|
|
9813
|
+
"general"
|
|
9814
|
+
]);
|
|
9815
|
+
var createQuestionArgs = z.object({
|
|
9816
|
+
text: z.string().describe("The question text."),
|
|
9817
|
+
question: z.string().optional().describe("Backend question text alias for kernel-native callers."),
|
|
9818
|
+
topicId: z.string().optional().describe("Topic scope hint."),
|
|
9819
|
+
priority: questionPrioritySchema.optional().describe("Human-facing question priority."),
|
|
9820
|
+
linkedBeliefId: z.string().optional().describe("Belief this question tests."),
|
|
9821
|
+
linkedBeliefNodeId: z.string().optional().describe("Belief node this question tests."),
|
|
9822
|
+
metadata: jsonRecordSchema5.optional().describe("Optional metadata merged into the question record."),
|
|
9823
|
+
category: z.string().optional().describe("Question category."),
|
|
9824
|
+
source: z.string().optional().describe("Question source."),
|
|
9825
|
+
testType: z.enum(["validates", "invalidates", "clarifies"]).optional().describe("How this question tests its linked belief."),
|
|
9826
|
+
importance: z.number().optional().describe("Numeric importance score."),
|
|
9827
|
+
epistemicUnlock: z.string().optional().describe("What this question unlocks if answered."),
|
|
9828
|
+
sourceQuestionIds: z.array(z.string()).optional().describe("Question IDs this question derives from."),
|
|
9829
|
+
linkedWorktreeId: z.string().optional().describe("Worktree this question belongs to."),
|
|
9830
|
+
questionType: questionTypeSchema.optional().describe("Question type."),
|
|
9831
|
+
questionPriority: kernelQuestionPrioritySchema.optional().describe("Kernel-native question priority.")
|
|
9832
|
+
});
|
|
9833
|
+
var refineQuestionArgs = z.object({
|
|
9834
|
+
id: z.string().describe("The question to refine."),
|
|
9835
|
+
text: z.string().describe("Updated question text."),
|
|
9836
|
+
question: z.string().optional().describe("Backend question text alias for kernel-native callers."),
|
|
9837
|
+
rationale: z.string().optional().describe("Why the question is refined."),
|
|
9838
|
+
category: z.string().optional().describe("Updated question category."),
|
|
9839
|
+
priority: questionPrioritySchema.optional().describe("Updated human-facing priority.")
|
|
9840
|
+
});
|
|
9841
|
+
var createAnswerArgs = z.object({
|
|
9842
|
+
questionNodeId: z.string().describe("The question node ID this answer responds to."),
|
|
9843
|
+
questionId: z.string().optional().describe("Question ID alias accepted by the projection."),
|
|
9844
|
+
answerText: z.string().describe("The answer content."),
|
|
9845
|
+
topicId: z.string().optional().describe("Topic scope for the answer."),
|
|
9846
|
+
confidence: z.string().optional().describe("Answer confidence."),
|
|
9847
|
+
evidenceNodeIds: z.array(z.string()).optional().describe("Evidence node IDs supporting the answer."),
|
|
9848
|
+
answerSource: z.string().optional().describe("How the answer was produced."),
|
|
9849
|
+
worktreeId: z.string().optional().describe("Worktree whose outcome produced this answer."),
|
|
9850
|
+
sprintId: z.string().optional().describe("Legacy sprint identifier.")
|
|
9851
|
+
});
|
|
9852
|
+
var answerQuestionArgs = z.object({
|
|
9853
|
+
id: z.string().describe("Canonical question ID."),
|
|
9854
|
+
topicId: z.string().describe("Topic scope for the answer."),
|
|
9855
|
+
text: z.string().describe("Answer text."),
|
|
9856
|
+
confidence: z.enum(["weak", "medium", "strong"]).optional().describe("Optional answer confidence."),
|
|
9857
|
+
evidenceIds: z.array(z.string()).optional().describe("Canonical evidence IDs supporting the answer."),
|
|
9858
|
+
rationale: z.string().optional().describe("Why this answer is credible."),
|
|
9859
|
+
questionId: z.string().optional().describe("Question ID alias accepted by the projection."),
|
|
9860
|
+
questionNodeId: z.string().optional().describe("Question node ID alias accepted by the projection."),
|
|
9861
|
+
answerText: z.string().optional().describe("Canonical answer text alias accepted by newer callers."),
|
|
9862
|
+
evidenceNodeIds: z.array(z.string()).optional().describe("Evidence node ID alias accepted by newer callers."),
|
|
9863
|
+
answerSource: z.string().optional().describe("How the answer was produced."),
|
|
9864
|
+
worktreeId: z.string().optional().describe("Worktree whose outcome produced this answer."),
|
|
9865
|
+
sprintId: z.string().optional().describe("Legacy sprint identifier.")
|
|
9866
|
+
});
|
|
9867
|
+
var missingQuestionsArgs = z.object({
|
|
9868
|
+
topicId: z.string().describe("Topic scope."),
|
|
9869
|
+
minConfidence: z.number().optional().describe("Minimum confidence threshold for missing-question checks."),
|
|
9870
|
+
status: z.string().optional().describe("Question status filter."),
|
|
9871
|
+
limit: z.number().optional().describe("Maximum questions to inspect.")
|
|
9872
|
+
});
|
|
9873
|
+
var falsificationQuestionsArgs = z.object({
|
|
9874
|
+
topicId: z.string().describe("Topic scope."),
|
|
9875
|
+
beliefIds: z.array(z.string()).optional().describe("Beliefs to generate falsification questions for."),
|
|
9876
|
+
status: z.string().optional().describe("Question status filter."),
|
|
9877
|
+
limit: z.number().optional().describe("Maximum questions to inspect.")
|
|
9878
|
+
});
|
|
9537
9879
|
var questionNodeInput = (input) => compactRecord4({
|
|
9538
9880
|
nodeId: input.nodeId ?? input.id ?? input.questionId,
|
|
9539
9881
|
questionId: input.questionId
|
|
@@ -9580,7 +9922,8 @@ var questionsContracts = [
|
|
|
9580
9922
|
functionName: "create",
|
|
9581
9923
|
kind: "mutation",
|
|
9582
9924
|
inputProjection: createQuestionInput
|
|
9583
|
-
}
|
|
9925
|
+
},
|
|
9926
|
+
args: createQuestionArgs
|
|
9584
9927
|
}),
|
|
9585
9928
|
surfaceContract({
|
|
9586
9929
|
name: "get_question",
|
|
@@ -9636,7 +9979,8 @@ var questionsContracts = [
|
|
|
9636
9979
|
category: input.category,
|
|
9637
9980
|
priority: input.priority
|
|
9638
9981
|
})
|
|
9639
|
-
}
|
|
9982
|
+
},
|
|
9983
|
+
args: refineQuestionArgs
|
|
9640
9984
|
}),
|
|
9641
9985
|
surfaceContract({
|
|
9642
9986
|
name: "update_question_status",
|
|
@@ -9712,7 +10056,8 @@ var questionsContracts = [
|
|
|
9712
10056
|
}),
|
|
9713
10057
|
context
|
|
9714
10058
|
)
|
|
9715
|
-
}
|
|
10059
|
+
},
|
|
10060
|
+
args: createAnswerArgs
|
|
9716
10061
|
}),
|
|
9717
10062
|
surfaceContract({
|
|
9718
10063
|
name: "answer_question",
|
|
@@ -9741,7 +10086,8 @@ var questionsContracts = [
|
|
|
9741
10086
|
}),
|
|
9742
10087
|
context
|
|
9743
10088
|
)
|
|
9744
|
-
}
|
|
10089
|
+
},
|
|
10090
|
+
args: answerQuestionArgs
|
|
9745
10091
|
}),
|
|
9746
10092
|
surfaceContract({
|
|
9747
10093
|
name: "get_answer",
|
|
@@ -9773,7 +10119,8 @@ var questionsContracts = [
|
|
|
9773
10119
|
functionName: "getByTopic",
|
|
9774
10120
|
kind: "query",
|
|
9775
10121
|
inputProjection: questionTopicInput
|
|
9776
|
-
}
|
|
10122
|
+
},
|
|
10123
|
+
args: missingQuestionsArgs
|
|
9777
10124
|
}),
|
|
9778
10125
|
surfaceContract({
|
|
9779
10126
|
name: "get_high_priority_questions",
|
|
@@ -9808,11 +10155,22 @@ var questionsContracts = [
|
|
|
9808
10155
|
functionName: "getByTopic",
|
|
9809
10156
|
kind: "query",
|
|
9810
10157
|
inputProjection: questionTopicInput
|
|
9811
|
-
}
|
|
10158
|
+
},
|
|
10159
|
+
args: falsificationQuestionsArgs
|
|
9812
10160
|
})
|
|
9813
10161
|
];
|
|
9814
|
-
|
|
9815
|
-
|
|
10162
|
+
var updateTopicArgs = z.object({
|
|
10163
|
+
id: z.string().describe("Topic ID."),
|
|
10164
|
+
topicId: z.string().optional().describe("Topic ID alias."),
|
|
10165
|
+
name: z.string().optional().describe("Topic name."),
|
|
10166
|
+
description: z.string().optional().describe("Topic description."),
|
|
10167
|
+
type: z.string().optional().describe("Topic type."),
|
|
10168
|
+
status: z.string().optional().describe("Topic status."),
|
|
10169
|
+
visibility: z.string().optional().describe("Topic visibility."),
|
|
10170
|
+
ontologyId: z.string().optional().describe("Ontology to bind."),
|
|
10171
|
+
clearOntologyId: z.boolean().optional().describe("Whether to clear the ontology binding."),
|
|
10172
|
+
metadata: z.record(z.unknown()).optional().describe("Topic metadata.")
|
|
10173
|
+
});
|
|
9816
10174
|
var topicIdInput = (input) => compactRecord4({
|
|
9817
10175
|
id: input.id ?? input.topicId
|
|
9818
10176
|
});
|
|
@@ -9893,7 +10251,8 @@ var topicsContracts = [
|
|
|
9893
10251
|
functionName: "update",
|
|
9894
10252
|
kind: "mutation",
|
|
9895
10253
|
inputProjection: updateTopicInput
|
|
9896
|
-
}
|
|
10254
|
+
},
|
|
10255
|
+
args: updateTopicArgs
|
|
9897
10256
|
}),
|
|
9898
10257
|
surfaceContract({
|
|
9899
10258
|
name: "get_topic_tree",
|
|
@@ -9912,8 +10271,27 @@ var topicsContracts = [
|
|
|
9912
10271
|
}
|
|
9913
10272
|
})
|
|
9914
10273
|
];
|
|
9915
|
-
|
|
9916
|
-
|
|
10274
|
+
var lensPerspectiveSchema = z.enum([
|
|
10275
|
+
"investigation",
|
|
10276
|
+
"monitoring",
|
|
10277
|
+
"analysis",
|
|
10278
|
+
"comparison",
|
|
10279
|
+
"taxonomy"
|
|
10280
|
+
]);
|
|
10281
|
+
var jsonRecordSchema6 = z.record(z.unknown());
|
|
10282
|
+
var createLensArgs = z.object({
|
|
10283
|
+
name: z.string().describe("Lens name."),
|
|
10284
|
+
workspaceId: z.string().optional().describe("Workspace scope for the lens."),
|
|
10285
|
+
topicId: z.string().optional().describe("Originating topic scope."),
|
|
10286
|
+
description: z.string().optional().describe("What this lens investigates or monitors."),
|
|
10287
|
+
perspectiveType: lensPerspectiveSchema.describe("Perspective type."),
|
|
10288
|
+
promptTemplates: z.array(jsonRecordSchema6).optional().describe("Prompt templates used through this lens."),
|
|
10289
|
+
workflowTemplates: z.array(jsonRecordSchema6).optional().describe("Guided workflow templates."),
|
|
10290
|
+
taskTemplates: z.array(jsonRecordSchema6).optional().describe("Default task templates."),
|
|
10291
|
+
questionTemplates: z.array(jsonRecordSchema6).optional().describe("Default question templates."),
|
|
10292
|
+
filterCriteria: jsonRecordSchema6.optional().describe("Belief/evidence filtering criteria."),
|
|
10293
|
+
metadata: jsonRecordSchema6.optional().describe("Additional lens metadata.")
|
|
10294
|
+
});
|
|
9917
10295
|
var createLensInput = (input, context) => compactRecord4({
|
|
9918
10296
|
name: input.name,
|
|
9919
10297
|
description: input.description,
|
|
@@ -9950,7 +10328,8 @@ var lensesContracts = [
|
|
|
9950
10328
|
functionName: "create",
|
|
9951
10329
|
kind: "mutation",
|
|
9952
10330
|
inputProjection: createLensInput
|
|
9953
|
-
}
|
|
10331
|
+
},
|
|
10332
|
+
args: createLensArgs
|
|
9954
10333
|
}),
|
|
9955
10334
|
surfaceContract({
|
|
9956
10335
|
name: "list_lenses",
|
|
@@ -10012,8 +10391,18 @@ var lensesContracts = [
|
|
|
10012
10391
|
}
|
|
10013
10392
|
})
|
|
10014
10393
|
];
|
|
10015
|
-
|
|
10016
|
-
|
|
10394
|
+
var updateOntologyArgs = z.object({
|
|
10395
|
+
id: z.string().describe("Ontology definition ID."),
|
|
10396
|
+
ontologyId: z.string().optional().describe("Ontology ID alias."),
|
|
10397
|
+
name: z.string().optional().describe("Ontology display name."),
|
|
10398
|
+
description: z.string().optional().describe("Ontology description."),
|
|
10399
|
+
status: z.string().optional().describe("Ontology lifecycle status.")
|
|
10400
|
+
});
|
|
10401
|
+
var ontologyVersionLifecycleArgs = z.object({
|
|
10402
|
+
id: z.string().describe("Ontology version ID."),
|
|
10403
|
+
versionId: z.string().optional().describe("Ontology version ID alias."),
|
|
10404
|
+
ontologyId: z.string().optional().describe("Ontology definition ID.")
|
|
10405
|
+
});
|
|
10017
10406
|
var ontologyIdInput = (input) => compactRecord4({
|
|
10018
10407
|
id: input.id ?? input.ontologyId
|
|
10019
10408
|
});
|
|
@@ -10092,11 +10481,11 @@ var ontologiesContracts = [
|
|
|
10092
10481
|
id: input.id ?? input.ontologyId,
|
|
10093
10482
|
name: input.name,
|
|
10094
10483
|
description: input.description,
|
|
10095
|
-
parentOntologyId: input.parentOntologyId,
|
|
10096
10484
|
status: input.status,
|
|
10097
10485
|
actorId: input.actorId
|
|
10098
10486
|
})
|
|
10099
|
-
}
|
|
10487
|
+
},
|
|
10488
|
+
args: updateOntologyArgs
|
|
10100
10489
|
}),
|
|
10101
10490
|
surfaceContract({
|
|
10102
10491
|
name: "archive_ontology",
|
|
@@ -10179,7 +10568,8 @@ var ontologiesContracts = [
|
|
|
10179
10568
|
functionName: "publishOntologyVersion",
|
|
10180
10569
|
kind: "mutation",
|
|
10181
10570
|
inputProjection: ontologyVersionIdInput
|
|
10182
|
-
}
|
|
10571
|
+
},
|
|
10572
|
+
args: ontologyVersionLifecycleArgs
|
|
10183
10573
|
}),
|
|
10184
10574
|
surfaceContract({
|
|
10185
10575
|
name: "deprecate_ontology_version",
|
|
@@ -10195,7 +10585,8 @@ var ontologiesContracts = [
|
|
|
10195
10585
|
functionName: "deprecateOntologyVersion",
|
|
10196
10586
|
kind: "mutation",
|
|
10197
10587
|
inputProjection: ontologyVersionIdInput
|
|
10198
|
-
}
|
|
10588
|
+
},
|
|
10589
|
+
args: ontologyVersionLifecycleArgs
|
|
10199
10590
|
}),
|
|
10200
10591
|
surfaceContract({
|
|
10201
10592
|
name: "resolve_effective_ontology",
|
|
@@ -10214,8 +10605,76 @@ var ontologiesContracts = [
|
|
|
10214
10605
|
}
|
|
10215
10606
|
})
|
|
10216
10607
|
];
|
|
10217
|
-
|
|
10218
|
-
|
|
10608
|
+
var autoFixPolicyInputSchema = z.object({
|
|
10609
|
+
enabled: z.boolean().optional().describe("Whether automatic remediation is enabled."),
|
|
10610
|
+
mode: z.string().optional().describe("Automation mode for worktree auto-fixes."),
|
|
10611
|
+
maxAttempts: z.number().optional().describe("Maximum number of auto-fix attempts."),
|
|
10612
|
+
reviewer: z.string().optional().describe("Reviewer responsible for auto-fix oversight."),
|
|
10613
|
+
maxActionsPerRun: z.number().optional().describe("Maximum number of auto-fix actions per run."),
|
|
10614
|
+
permittedMutationTiers: z.array(z.enum(["read_only", "low_risk_write", "high_risk_write"])).optional().describe("Mutation tiers the auto-fix worker may execute."),
|
|
10615
|
+
requireAuditTrail: z.boolean().optional().describe("Whether auto-fix actions must write an audit trail."),
|
|
10616
|
+
escalationGate: z.string().optional().describe("Gate to trigger when auto-fix policy requires escalation.")
|
|
10617
|
+
}).passthrough().describe("Policy for permitted automatic remediation inside the worktree.");
|
|
10618
|
+
var worktreeKeyQuestionInputSchema = z.object({
|
|
10619
|
+
question: z.string().describe("Question the worktree must resolve."),
|
|
10620
|
+
status: z.enum(["open", "answered", "forked"]).optional().describe("Current disposition of the key question."),
|
|
10621
|
+
answer: z.string().optional().describe("Captured answer when the key question is resolved."),
|
|
10622
|
+
answerConfidence: z.enum(["high", "medium", "low"]).optional().describe("Confidence in the captured answer."),
|
|
10623
|
+
linkedQuestionId: z.string().optional().describe("Canonical question node linked to this key question.")
|
|
10624
|
+
}).passthrough().describe("Question contract embedded in the worktree plan.");
|
|
10625
|
+
var worktreeEvidenceSignalInputSchema = z.object({
|
|
10626
|
+
signal: z.string().describe("Evidence signal the worktree should collect."),
|
|
10627
|
+
collected: z.boolean().optional().describe("Whether the signal has already been collected."),
|
|
10628
|
+
progress: z.string().optional().describe("Collection progress note for the signal."),
|
|
10629
|
+
notes: z.string().optional().describe("Additional evidence collection notes.")
|
|
10630
|
+
}).passthrough().describe("Evidence signal embedded in the worktree plan.");
|
|
10631
|
+
var worktreeDecisionGateInputSchema = z.object({
|
|
10632
|
+
goCriteria: z.array(z.string()).describe("Criteria that must hold for the worktree to proceed."),
|
|
10633
|
+
noGoSignals: z.array(z.string()).describe("Signals that stop or redirect the worktree."),
|
|
10634
|
+
verdict: z.enum(["go", "no_go", "pivot", "pending"]).optional().describe("Current decision verdict for the worktree gate."),
|
|
10635
|
+
verdictRationale: z.string().optional().describe("Rationale supporting the current gate verdict."),
|
|
10636
|
+
decidedAt: z.number().optional().describe("Timestamp when the gate verdict was decided."),
|
|
10637
|
+
decidedBy: z.string().optional().describe("Actor that decided the gate verdict.")
|
|
10638
|
+
}).passthrough().describe("Decision gate contract for worktree activation or exit.");
|
|
10639
|
+
var addWorktreeArgs = z.object({
|
|
10640
|
+
title: z.string().optional().describe("Human-readable worktree name or objective."),
|
|
10641
|
+
name: z.string().optional().describe("Storage-name alias for callers that already use backend naming."),
|
|
10642
|
+
topicId: z.string().describe("Primary topic scope for the worktree."),
|
|
10643
|
+
projectId: z.string().optional().describe("Legacy topicId alias."),
|
|
10644
|
+
branchId: z.string().optional().describe("Legacy branch identifier for compatibility with workflow callers."),
|
|
10645
|
+
objective: z.string().optional().describe("Reasoning objective this worktree is intended to resolve."),
|
|
10646
|
+
hypothesis: z.string().optional().describe("Testable claim this worktree investigates."),
|
|
10647
|
+
rationale: z.string().optional().describe("Why this worktree exists and why it belongs in the campaign."),
|
|
10648
|
+
worktreeType: z.string().optional().describe("Schema-enum worktree type used for kernel lifecycle behavior."),
|
|
10649
|
+
gate: z.string().optional().describe("Exit gate for this worktree."),
|
|
10650
|
+
startDate: z.number().optional().describe("Planned start timestamp in milliseconds since epoch."),
|
|
10651
|
+
endDate: z.number().optional().describe("Planned end timestamp in milliseconds since epoch."),
|
|
10652
|
+
durationWeeks: z.number().optional().describe("Planned duration in weeks."),
|
|
10653
|
+
confidenceImpact: z.enum(["high", "medium", "low"]).optional().describe("Expected confidence impact if this worktree succeeds."),
|
|
10654
|
+
beliefFocus: z.string().optional().describe("Natural-language focus spanning the target belief neighborhood."),
|
|
10655
|
+
beliefIds: z.array(z.string()).optional().describe("Legacy alias for targetBeliefIds."),
|
|
10656
|
+
beliefs: z.array(z.string()).optional().describe("Legacy alias for targetBeliefIds."),
|
|
10657
|
+
targetBeliefIds: z.array(z.string()).optional().describe("Belief node IDs this worktree is expected to test or update."),
|
|
10658
|
+
targetQuestionIds: z.array(z.string()).optional().describe("Question node IDs this worktree is expected to answer."),
|
|
10659
|
+
keyQuestions: z.array(worktreeKeyQuestionInputSchema).optional().describe("Inline key questions captured as part of the worktree plan."),
|
|
10660
|
+
evidenceSignals: z.array(worktreeEvidenceSignalInputSchema).optional().describe("Evidence signals the worktree needs to collect or validate."),
|
|
10661
|
+
decisionGate: worktreeDecisionGateInputSchema.optional(),
|
|
10662
|
+
goCriteria: z.array(z.string()).optional().describe("Shorthand go criteria used to build decisionGate."),
|
|
10663
|
+
noGoSignals: z.array(z.string()).optional().describe("Shorthand no-go signals used to build decisionGate."),
|
|
10664
|
+
proofArtifacts: z.array(z.unknown()).optional().describe("Expected proof artifacts required to close the worktree."),
|
|
10665
|
+
autoShape: z.boolean().optional().describe("Whether to invoke inquiry auto-shaping during creation."),
|
|
10666
|
+
autoFixPolicy: autoFixPolicyInputSchema.optional(),
|
|
10667
|
+
domainPackId: z.string().optional().describe("Domain pack whose shaping hooks should influence the worktree."),
|
|
10668
|
+
campaign: z.number().optional().describe("Top-level pipeline campaign number."),
|
|
10669
|
+
lane: z.string().optional().describe("Campaign lane for the worktree."),
|
|
10670
|
+
laneOrderInCampaign: z.number().optional().describe("Ordering for this lane within its campaign."),
|
|
10671
|
+
orderInLane: z.number().optional().describe("Position of this worktree inside its lane."),
|
|
10672
|
+
dependsOn: z.array(z.string()).optional().describe("Worktree IDs that must complete before this worktree."),
|
|
10673
|
+
blocks: z.array(z.string()).optional().describe("Worktree IDs blocked by this worktree."),
|
|
10674
|
+
staffingHint: z.string().optional().describe("Suggested staffing or agent allocation note."),
|
|
10675
|
+
lensId: z.string().optional().describe("Lens that scopes this worktree when applicable."),
|
|
10676
|
+
lastReconciledAt: z.number().optional().describe("Timestamp when worktree metadata was last reconciled.")
|
|
10677
|
+
});
|
|
10219
10678
|
var worktreeIdInput = (input) => compactRecord4({
|
|
10220
10679
|
worktreeId: input.worktreeId ?? input.id
|
|
10221
10680
|
});
|
|
@@ -10248,6 +10707,50 @@ var worktreeMetadataInput = (input) => compactRecord4({
|
|
|
10248
10707
|
autoFixPolicy: input.autoFixPolicy,
|
|
10249
10708
|
lastReconciledAt: input.lastReconciledAt
|
|
10250
10709
|
});
|
|
10710
|
+
var worktreeMetadataArgs = z.object({
|
|
10711
|
+
worktreeId: z.string().describe("The worktree to update."),
|
|
10712
|
+
id: z.string().optional().describe("Worktree ID alias."),
|
|
10713
|
+
topicId: z.string().optional().describe("Primary topic scope."),
|
|
10714
|
+
additionalTopicIds: z.array(z.string()).optional().describe("Additional topic scopes associated with this worktree."),
|
|
10715
|
+
status: z.string().optional().describe("Worktree lifecycle status."),
|
|
10716
|
+
campaign: z.number().optional().describe("Top-level pipeline campaign."),
|
|
10717
|
+
lane: z.string().optional().describe("Campaign lane."),
|
|
10718
|
+
laneOrderInCampaign: z.number().optional().describe("Ordering for this lane within its campaign."),
|
|
10719
|
+
orderInLane: z.number().optional().describe("Position of this worktree inside its lane."),
|
|
10720
|
+
gate: z.string().optional().describe("Exit gate for this worktree."),
|
|
10721
|
+
hypothesis: z.string().optional().describe("Testable claim this worktree investigates."),
|
|
10722
|
+
objective: z.string().optional().describe("Reasoning objective for the worktree."),
|
|
10723
|
+
rationale: z.string().optional().describe("Why this worktree is sequenced here."),
|
|
10724
|
+
proofArtifacts: z.array(z.unknown()).optional().describe("Proof artifacts required to close the worktree."),
|
|
10725
|
+
staffingHint: z.string().optional().describe("Suggested staffing or agent allocation note."),
|
|
10726
|
+
blocks: z.array(z.string()).optional().describe("Worktree IDs blocked by this worktree."),
|
|
10727
|
+
dependsOn: z.array(z.string()).optional().describe("Worktree IDs this worktree depends on."),
|
|
10728
|
+
lensId: z.string().optional().describe("Lens that scopes this worktree."),
|
|
10729
|
+
autoFixPolicy: autoFixPolicyInputSchema.optional(),
|
|
10730
|
+
lastReconciledAt: z.number().optional().describe("Timestamp of the last deterministic reconciliation pass.")
|
|
10731
|
+
});
|
|
10732
|
+
var pushArgs = worktreeMetadataArgs.extend({
|
|
10733
|
+
targetContext: z.string().describe("Where to push merged findings."),
|
|
10734
|
+
beliefIds: z.array(z.string()).optional().describe("Optional subset of beliefs to push.")
|
|
10735
|
+
});
|
|
10736
|
+
var openPullRequestArgs = worktreeMetadataArgs.extend({
|
|
10737
|
+
reviewers: z.array(z.string()).optional().describe("User IDs of requested reviewers."),
|
|
10738
|
+
summary: z.string().describe("Summary of findings and why they are ready for review.")
|
|
10739
|
+
});
|
|
10740
|
+
var mergeKeyFindingsInput = (input) => {
|
|
10741
|
+
if (Array.isArray(input.keyFindings)) {
|
|
10742
|
+
return input.keyFindings;
|
|
10743
|
+
}
|
|
10744
|
+
if (Array.isArray(input.outcomes)) {
|
|
10745
|
+
const findings = input.outcomes.filter(
|
|
10746
|
+
(outcome) => typeof outcome === "string" && outcome.trim().length > 0
|
|
10747
|
+
);
|
|
10748
|
+
if (findings.length > 0) {
|
|
10749
|
+
return findings;
|
|
10750
|
+
}
|
|
10751
|
+
}
|
|
10752
|
+
return [input.summary ?? "Merged worktree"];
|
|
10753
|
+
};
|
|
10251
10754
|
var listAllWorktreesInput = (input) => compactRecord4({
|
|
10252
10755
|
status: input.status,
|
|
10253
10756
|
lane: input.lane,
|
|
@@ -10255,6 +10758,16 @@ var listAllWorktreesInput = (input) => compactRecord4({
|
|
|
10255
10758
|
limit: input.limit
|
|
10256
10759
|
});
|
|
10257
10760
|
var worktreesContracts = [
|
|
10761
|
+
surfaceContract({
|
|
10762
|
+
name: "begin_build_session",
|
|
10763
|
+
kind: "mutation",
|
|
10764
|
+
domain: "worktrees",
|
|
10765
|
+
surfaceClass: "platform_internal",
|
|
10766
|
+
path: "/mcp/build-session/begin",
|
|
10767
|
+
sdkNamespace: "worktrees",
|
|
10768
|
+
sdkMethod: "beginBuildSession",
|
|
10769
|
+
summary: "Begin a coding build session for a worktree."
|
|
10770
|
+
}),
|
|
10258
10771
|
surfaceContract({
|
|
10259
10772
|
name: "add_worktree",
|
|
10260
10773
|
kind: "mutation",
|
|
@@ -10271,13 +10784,12 @@ var worktreesContracts = [
|
|
|
10271
10784
|
inputProjection: (input, context) => withCreatedBy(
|
|
10272
10785
|
compactRecord4({
|
|
10273
10786
|
name: input.name ?? input.title,
|
|
10274
|
-
topicId: input.topicId,
|
|
10787
|
+
topicId: input.topicId ?? input.projectId,
|
|
10275
10788
|
worktreeType: input.worktreeType,
|
|
10276
10789
|
objective: input.objective,
|
|
10277
10790
|
gate: input.gate,
|
|
10278
10791
|
hypothesis: input.hypothesis,
|
|
10279
10792
|
rationale: input.rationale,
|
|
10280
|
-
signal: input.signal,
|
|
10281
10793
|
startDate: input.startDate,
|
|
10282
10794
|
endDate: input.endDate,
|
|
10283
10795
|
durationWeeks: input.durationWeeks,
|
|
@@ -10303,12 +10815,12 @@ var worktreesContracts = [
|
|
|
10303
10815
|
staffingHint: input.staffingHint,
|
|
10304
10816
|
domainPackId: input.domainPackId,
|
|
10305
10817
|
lensId: input.lensId,
|
|
10306
|
-
linkedQuestionId: input.linkedQuestionId,
|
|
10307
10818
|
lastReconciledAt: input.lastReconciledAt
|
|
10308
10819
|
}),
|
|
10309
10820
|
context
|
|
10310
10821
|
)
|
|
10311
|
-
}
|
|
10822
|
+
},
|
|
10823
|
+
args: addWorktreeArgs
|
|
10312
10824
|
}),
|
|
10313
10825
|
surfaceContract({
|
|
10314
10826
|
name: "activate_worktree",
|
|
@@ -10420,7 +10932,8 @@ var worktreesContracts = [
|
|
|
10420
10932
|
functionName: "updateMetadata",
|
|
10421
10933
|
kind: "mutation",
|
|
10422
10934
|
inputProjection: worktreeMetadataInput
|
|
10423
|
-
}
|
|
10935
|
+
},
|
|
10936
|
+
args: worktreeMetadataArgs
|
|
10424
10937
|
}),
|
|
10425
10938
|
surfaceContract({
|
|
10426
10939
|
name: "merge",
|
|
@@ -10438,9 +10951,7 @@ var worktreesContracts = [
|
|
|
10438
10951
|
inputProjection: (input, context) => withUserId(
|
|
10439
10952
|
{
|
|
10440
10953
|
...worktreeIdInput(input),
|
|
10441
|
-
keyFindings: input
|
|
10442
|
-
input.summary ?? "Merged worktree"
|
|
10443
|
-
],
|
|
10954
|
+
keyFindings: mergeKeyFindingsInput(input),
|
|
10444
10955
|
decisionsReached: input.decisionsReached ?? [],
|
|
10445
10956
|
nextSteps: input.nextSteps ?? []
|
|
10446
10957
|
},
|
|
@@ -10462,7 +10973,8 @@ var worktreesContracts = [
|
|
|
10462
10973
|
functionName: "updateMetadata",
|
|
10463
10974
|
kind: "mutation",
|
|
10464
10975
|
inputProjection: worktreeMetadataInput
|
|
10465
|
-
}
|
|
10976
|
+
},
|
|
10977
|
+
args: pushArgs
|
|
10466
10978
|
}),
|
|
10467
10979
|
surfaceContract({
|
|
10468
10980
|
name: "open_pull_request",
|
|
@@ -10478,7 +10990,8 @@ var worktreesContracts = [
|
|
|
10478
10990
|
functionName: "updateMetadata",
|
|
10479
10991
|
kind: "mutation",
|
|
10480
10992
|
inputProjection: worktreeMetadataInput
|
|
10481
|
-
}
|
|
10993
|
+
},
|
|
10994
|
+
args: openPullRequestArgs
|
|
10482
10995
|
})
|
|
10483
10996
|
];
|
|
10484
10997
|
|
|
@@ -10582,6 +11095,15 @@ var createEdgeArgs = z.object({
|
|
|
10582
11095
|
topicId: z.string().optional(),
|
|
10583
11096
|
trustedBypassAccessCheck: z.boolean().optional()
|
|
10584
11097
|
});
|
|
11098
|
+
var queryLineageArgs = z.object({
|
|
11099
|
+
nodeId: z.string().describe("Starting node to trace from."),
|
|
11100
|
+
startNode: z.string().optional().describe("Starting node alias accepted by traversal callers."),
|
|
11101
|
+
depth: z.number().optional().describe("Traversal depth alias."),
|
|
11102
|
+
maxDepth: z.number().optional().describe("Maximum traversal depth."),
|
|
11103
|
+
mode: z.string().optional().describe("Traversal mode."),
|
|
11104
|
+
minLayer: z.string().optional().describe("Minimum epistemic layer."),
|
|
11105
|
+
maxLayer: z.string().optional().describe("Maximum epistemic layer.")
|
|
11106
|
+
});
|
|
10585
11107
|
function graphRefNodeId(ref) {
|
|
10586
11108
|
if (ref.kind === "epistemic_node") {
|
|
10587
11109
|
return ref.nodeId;
|
|
@@ -10652,11 +11174,59 @@ var edgesContracts = [
|
|
|
10652
11174
|
minLayer: input.minLayer,
|
|
10653
11175
|
maxLayer: input.maxLayer
|
|
10654
11176
|
})
|
|
10655
|
-
}
|
|
11177
|
+
},
|
|
11178
|
+
args: queryLineageArgs
|
|
10656
11179
|
})
|
|
10657
11180
|
];
|
|
10658
|
-
|
|
10659
|
-
|
|
11181
|
+
var traversalLayerSchema = z.enum([
|
|
11182
|
+
"L4",
|
|
11183
|
+
"L3",
|
|
11184
|
+
"L2",
|
|
11185
|
+
"L1",
|
|
11186
|
+
"ontological",
|
|
11187
|
+
"organizational"
|
|
11188
|
+
]);
|
|
11189
|
+
var traversalModeSchema = z.enum(["low", "medium", "high", "extra_high"]);
|
|
11190
|
+
var lineageAliasArgs = z.object({
|
|
11191
|
+
nodeId: z.string().optional().describe("Starting node to traverse from."),
|
|
11192
|
+
startNode: z.string().optional().describe("Starting node alias for traversal callers."),
|
|
11193
|
+
entityId: z.string().optional().describe("Entity identifier alias for impact tracing."),
|
|
11194
|
+
depth: z.number().optional().describe("Traversal depth alias."),
|
|
11195
|
+
maxDepth: z.number().optional().describe("Maximum traversal depth."),
|
|
11196
|
+
mode: traversalModeSchema.optional().describe("Traversal mode."),
|
|
11197
|
+
minLayer: traversalLayerSchema.optional().describe("Minimum epistemic layer to include."),
|
|
11198
|
+
maxLayer: traversalLayerSchema.optional().describe("Maximum epistemic layer to include.")
|
|
11199
|
+
});
|
|
11200
|
+
var lineageArgs = lineageAliasArgs.extend({
|
|
11201
|
+
nodeId: z.string().describe("Starting node to traverse from.")
|
|
11202
|
+
});
|
|
11203
|
+
var traverseGraphArgs = lineageAliasArgs.extend({
|
|
11204
|
+
startNode: z.string().describe("Node to start traversal from."),
|
|
11205
|
+
direction: z.enum(["up", "down", "both"]).optional().describe("Traversal direction.")
|
|
11206
|
+
});
|
|
11207
|
+
var graphNeighborhoodArgs = z.object({
|
|
11208
|
+
globalId: z.string().optional().describe("Single root global ID."),
|
|
11209
|
+
globalIds: z.array(z.string()).optional().describe("Root global IDs for the neighborhood."),
|
|
11210
|
+
maxDepth: z.number().optional().describe("Maximum traversal depth."),
|
|
11211
|
+
topicId: z.string().optional().describe("Topic scope for edge lookup."),
|
|
11212
|
+
limit: z.number().optional().describe("Maximum edges to return.")
|
|
11213
|
+
});
|
|
11214
|
+
var flagContradictionArgs = z.object({
|
|
11215
|
+
beliefA: z.string().describe("First belief in tension."),
|
|
11216
|
+
beliefB: z.string().describe("Second belief in tension."),
|
|
11217
|
+
topicId: z.string().optional().describe("Topic scope for the contradiction."),
|
|
11218
|
+
description: z.string().optional().describe("Human-readable contradiction."),
|
|
11219
|
+
severity: z.enum(["critical", "high", "medium", "low"]).optional().describe("Contradiction severity."),
|
|
11220
|
+
defeatType: z.string().optional().describe("Defeat type annotation."),
|
|
11221
|
+
supportingInsightIds: z.array(z.string()).optional().describe("Evidence supporting the primary belief."),
|
|
11222
|
+
contradictingInsightIds: z.array(z.string()).optional().describe("Evidence or beliefs contradicting the primary belief.")
|
|
11223
|
+
});
|
|
11224
|
+
var discoverEntityConnectionsArgs = lineageAliasArgs.extend({
|
|
11225
|
+
nodeId: z.string().describe("Epistemic node ID to find entity connections for."),
|
|
11226
|
+
topicId: z.string().optional().describe("Topic scope override."),
|
|
11227
|
+
minScore: z.number().optional().describe("Minimum match score."),
|
|
11228
|
+
limit: z.number().optional().describe("Maximum candidates to return.")
|
|
11229
|
+
});
|
|
10660
11230
|
var contradictionSeverity = (value) => {
|
|
10661
11231
|
switch (value) {
|
|
10662
11232
|
case "critical":
|
|
@@ -10711,7 +11281,8 @@ var graphContracts = [
|
|
|
10711
11281
|
functionName: "getLineage",
|
|
10712
11282
|
kind: "query",
|
|
10713
11283
|
inputProjection: lineageInput
|
|
10714
|
-
}
|
|
11284
|
+
},
|
|
11285
|
+
args: traverseGraphArgs
|
|
10715
11286
|
}),
|
|
10716
11287
|
surfaceContract({
|
|
10717
11288
|
name: "get_graph_neighborhood",
|
|
@@ -10727,7 +11298,8 @@ var graphContracts = [
|
|
|
10727
11298
|
functionName: "getByTopic",
|
|
10728
11299
|
kind: "query",
|
|
10729
11300
|
inputProjection: topicEdgesInput
|
|
10730
|
-
}
|
|
11301
|
+
},
|
|
11302
|
+
args: graphNeighborhoodArgs
|
|
10731
11303
|
}),
|
|
10732
11304
|
surfaceContract({
|
|
10733
11305
|
name: "get_graph_structure_analysis",
|
|
@@ -10776,7 +11348,8 @@ var graphContracts = [
|
|
|
10776
11348
|
functionName: "create",
|
|
10777
11349
|
kind: "mutation",
|
|
10778
11350
|
inputProjection: flagContradictionInput
|
|
10779
|
-
}
|
|
11351
|
+
},
|
|
11352
|
+
args: flagContradictionArgs
|
|
10780
11353
|
}),
|
|
10781
11354
|
surfaceContract({
|
|
10782
11355
|
name: "detect_confirmation_bias",
|
|
@@ -10867,7 +11440,8 @@ var graphContracts = [
|
|
|
10867
11440
|
functionName: "getLineage",
|
|
10868
11441
|
kind: "query",
|
|
10869
11442
|
inputProjection: lineageInput
|
|
10870
|
-
}
|
|
11443
|
+
},
|
|
11444
|
+
args: discoverEntityConnectionsArgs
|
|
10871
11445
|
}),
|
|
10872
11446
|
surfaceContract({
|
|
10873
11447
|
name: "trigger_belief_review",
|
|
@@ -10898,7 +11472,8 @@ var graphContracts = [
|
|
|
10898
11472
|
functionName: "getLineage",
|
|
10899
11473
|
kind: "query",
|
|
10900
11474
|
inputProjection: lineageInput
|
|
10901
|
-
}
|
|
11475
|
+
},
|
|
11476
|
+
args: lineageArgs
|
|
10902
11477
|
})
|
|
10903
11478
|
];
|
|
10904
11479
|
|
|
@@ -10950,8 +11525,16 @@ var contractsContracts = [
|
|
|
10950
11525
|
}
|
|
10951
11526
|
})
|
|
10952
11527
|
];
|
|
10953
|
-
|
|
10954
|
-
|
|
11528
|
+
var auditTrailArgs = z.object({
|
|
11529
|
+
nodeId: z.string().describe("The node to audit."),
|
|
11530
|
+
id: z.string().optional().describe("Node ID alias."),
|
|
11531
|
+
limit: z.number().optional().describe("Maximum entries to return."),
|
|
11532
|
+
depth: z.number().optional().describe("Traversal depth alias."),
|
|
11533
|
+
maxDepth: z.number().optional().describe("Maximum lineage depth."),
|
|
11534
|
+
mode: z.string().optional().describe("Traversal mode."),
|
|
11535
|
+
minLayer: z.string().optional().describe("Minimum epistemic layer."),
|
|
11536
|
+
maxLayer: z.string().optional().describe("Maximum epistemic layer.")
|
|
11537
|
+
});
|
|
10955
11538
|
var judgmentsContracts = [
|
|
10956
11539
|
surfaceContract({
|
|
10957
11540
|
name: "record_judgment",
|
|
@@ -11006,7 +11589,8 @@ var judgmentsContracts = [
|
|
|
11006
11589
|
minLayer: input.minLayer,
|
|
11007
11590
|
maxLayer: input.maxLayer
|
|
11008
11591
|
})
|
|
11009
|
-
}
|
|
11592
|
+
},
|
|
11593
|
+
args: auditTrailArgs
|
|
11010
11594
|
})
|
|
11011
11595
|
];
|
|
11012
11596
|
|
|
@@ -11174,8 +11758,13 @@ var coordinationContracts = [
|
|
|
11174
11758
|
}
|
|
11175
11759
|
})
|
|
11176
11760
|
];
|
|
11177
|
-
|
|
11178
|
-
|
|
11761
|
+
var pipelineSnapshotArgs = z.object({
|
|
11762
|
+
topicId: z.string().describe("Topic scope ID."),
|
|
11763
|
+
status: z.string().optional().describe("Worktree status filter."),
|
|
11764
|
+
lane: z.string().optional().describe("Campaign lane filter."),
|
|
11765
|
+
campaign: z.number().optional().describe("Campaign number filter."),
|
|
11766
|
+
limit: z.number().optional().describe("Maximum worktrees to inspect.")
|
|
11767
|
+
});
|
|
11179
11768
|
var pipelineContracts = [
|
|
11180
11769
|
surfaceContract({
|
|
11181
11770
|
name: "pipeline_snapshot",
|
|
@@ -11196,7 +11785,8 @@ var pipelineContracts = [
|
|
|
11196
11785
|
campaign: input.campaign,
|
|
11197
11786
|
limit: input.limit
|
|
11198
11787
|
})
|
|
11199
|
-
}
|
|
11788
|
+
},
|
|
11789
|
+
args: pipelineSnapshotArgs
|
|
11200
11790
|
}),
|
|
11201
11791
|
surfaceContract({
|
|
11202
11792
|
name: "seed_belief_lattice",
|
|
@@ -11248,7 +11838,31 @@ var recordScopeLearningArgs = z.object({
|
|
|
11248
11838
|
rationale: z.string().optional().describe("Why this learning should enter the reasoning graph"),
|
|
11249
11839
|
createQuestionText: z.string().optional().describe("Optional follow-up question text"),
|
|
11250
11840
|
createBeliefText: z.string().optional().describe("Optional new belief text"),
|
|
11251
|
-
beliefType: z.string().optional().describe("Optional belief type for createBeliefText")
|
|
11841
|
+
beliefType: z.string().optional().describe("Optional belief type for createBeliefText"),
|
|
11842
|
+
text: z.string().optional().describe("Canonical learning text alias."),
|
|
11843
|
+
content: z.string().optional().describe("Canonical learning content alias."),
|
|
11844
|
+
kind: z.string().optional().describe("Evidence kind to store."),
|
|
11845
|
+
sourceType: z.string().optional().describe("Evidence source type."),
|
|
11846
|
+
externalSourceType: z.string().optional().describe("External source type alias."),
|
|
11847
|
+
metadata: z.record(z.unknown()).optional().describe("Learning metadata.")
|
|
11848
|
+
});
|
|
11849
|
+
var codeContextArgs = z.object({
|
|
11850
|
+
topicId: z.string().optional().describe("Topic scope."),
|
|
11851
|
+
filePath: z.string().optional().describe("File path anchor."),
|
|
11852
|
+
includeFailures: z.boolean().optional().describe("Whether to include failed attempts."),
|
|
11853
|
+
limit: z.number().optional().describe("Maximum records to return."),
|
|
11854
|
+
status: z.string().optional().describe("Evidence status filter.")
|
|
11855
|
+
});
|
|
11856
|
+
var recordAttemptArgs = z.object({
|
|
11857
|
+
topicId: z.string().optional().describe("Topic scope."),
|
|
11858
|
+
description: z.string().describe("Attempt description."),
|
|
11859
|
+
errorMessage: z.string().optional().describe("Failure or error message."),
|
|
11860
|
+
filePaths: z.array(z.string()).optional().describe("Files involved in the attempt."),
|
|
11861
|
+
filePath: z.string().optional().describe("Single file path alias."),
|
|
11862
|
+
linkedBeliefId: z.string().optional().describe("Linked belief ID."),
|
|
11863
|
+
metadata: z.record(z.unknown()).optional().describe("Attempt metadata."),
|
|
11864
|
+
rationale: z.string().optional().describe("Why this attempt should be recorded."),
|
|
11865
|
+
title: z.string().optional().describe("Attempt evidence title.")
|
|
11252
11866
|
});
|
|
11253
11867
|
var learningInput = (input, context) => {
|
|
11254
11868
|
const sourceKind = input.sourceKind ?? input.externalSourceType;
|
|
@@ -11365,7 +11979,8 @@ var codingContracts = [
|
|
|
11365
11979
|
status: input.status,
|
|
11366
11980
|
userId: input.userId
|
|
11367
11981
|
})
|
|
11368
|
-
}
|
|
11982
|
+
},
|
|
11983
|
+
args: codeContextArgs
|
|
11369
11984
|
}),
|
|
11370
11985
|
surfaceContract({
|
|
11371
11986
|
name: "get_change_history",
|
|
@@ -11402,7 +12017,8 @@ var codingContracts = [
|
|
|
11402
12017
|
functionName: "create",
|
|
11403
12018
|
kind: "mutation",
|
|
11404
12019
|
inputProjection: attemptInput
|
|
11405
|
-
}
|
|
12020
|
+
},
|
|
12021
|
+
args: recordAttemptArgs
|
|
11406
12022
|
}),
|
|
11407
12023
|
surfaceContract({
|
|
11408
12024
|
name: "get_failure_log",
|
|
@@ -11477,6 +12093,604 @@ new Map(
|
|
|
11477
12093
|
ALL_FUNCTION_CONTRACTS.map((contract) => [contract.name, contract])
|
|
11478
12094
|
);
|
|
11479
12095
|
|
|
12096
|
+
// ../contracts/src/tenant-bootstrap-seed.contract.ts
|
|
12097
|
+
function isCopyableSeedRequirement(entry) {
|
|
12098
|
+
return (entry.copyMode === "template_global" || entry.copyMode === "template_tenant_rewrite" || entry.copyMode === "template_reference_remap") && Boolean(entry.scope) && Array.isArray(entry.uniqueKey) && entry.uniqueKey.length > 0;
|
|
12099
|
+
}
|
|
12100
|
+
var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
|
|
12101
|
+
{
|
|
12102
|
+
component: "kernel",
|
|
12103
|
+
table: "agentMessages",
|
|
12104
|
+
prepopulation: "runtime_data",
|
|
12105
|
+
copyMode: "none",
|
|
12106
|
+
description: "Agent coordination messages are session data, not template data."
|
|
12107
|
+
},
|
|
12108
|
+
{
|
|
12109
|
+
component: "kernel",
|
|
12110
|
+
table: "agentSessions",
|
|
12111
|
+
prepopulation: "runtime_data",
|
|
12112
|
+
copyMode: "none",
|
|
12113
|
+
description: "Agent coordination sessions are created by active clients."
|
|
12114
|
+
},
|
|
12115
|
+
{
|
|
12116
|
+
component: "kernel",
|
|
12117
|
+
table: "autofixJobs",
|
|
12118
|
+
prepopulation: "runtime_queue",
|
|
12119
|
+
copyMode: "none",
|
|
12120
|
+
description: "Autofix work items are runtime queue rows."
|
|
12121
|
+
},
|
|
12122
|
+
{
|
|
12123
|
+
component: "kernel",
|
|
12124
|
+
table: "backgroundJobRuns",
|
|
12125
|
+
prepopulation: "runtime_log",
|
|
12126
|
+
copyMode: "none",
|
|
12127
|
+
description: "Background job executions are runtime logs."
|
|
12128
|
+
},
|
|
12129
|
+
{
|
|
12130
|
+
component: "kernel",
|
|
12131
|
+
table: "backgroundJobSettings",
|
|
12132
|
+
prepopulation: "required_template",
|
|
12133
|
+
copyMode: "template_global",
|
|
12134
|
+
scope: "global",
|
|
12135
|
+
uniqueKey: ["jobKey"],
|
|
12136
|
+
description: "Default job enablement settings must come from the K template."
|
|
12137
|
+
},
|
|
12138
|
+
{
|
|
12139
|
+
component: "kernel",
|
|
12140
|
+
table: "beliefConfidence",
|
|
12141
|
+
prepopulation: "runtime_data",
|
|
12142
|
+
copyMode: "none",
|
|
12143
|
+
description: "Belief confidence rows are created with tenant graph facts."
|
|
12144
|
+
},
|
|
12145
|
+
{
|
|
12146
|
+
component: "kernel",
|
|
12147
|
+
table: "beliefEvidenceLinks",
|
|
12148
|
+
prepopulation: "runtime_data",
|
|
12149
|
+
copyMode: "none",
|
|
12150
|
+
description: "Belief-to-evidence links are tenant graph data."
|
|
12151
|
+
},
|
|
12152
|
+
{
|
|
12153
|
+
component: "kernel",
|
|
12154
|
+
table: "beliefHistory",
|
|
12155
|
+
prepopulation: "runtime_data",
|
|
12156
|
+
copyMode: "none",
|
|
12157
|
+
description: "Belief history is append-only tenant graph data."
|
|
12158
|
+
},
|
|
12159
|
+
{
|
|
12160
|
+
component: "kernel",
|
|
12161
|
+
table: "beliefScenarios",
|
|
12162
|
+
prepopulation: "runtime_data",
|
|
12163
|
+
copyMode: "none",
|
|
12164
|
+
description: "Scenario rows are tenant-authored reasoning data."
|
|
12165
|
+
},
|
|
12166
|
+
{
|
|
12167
|
+
component: "kernel",
|
|
12168
|
+
table: "beliefVotes",
|
|
12169
|
+
prepopulation: "runtime_data",
|
|
12170
|
+
copyMode: "none",
|
|
12171
|
+
description: "Decision belief votes are tenant-authored data."
|
|
12172
|
+
},
|
|
12173
|
+
{
|
|
12174
|
+
component: "kernel",
|
|
12175
|
+
table: "calibrationScores",
|
|
12176
|
+
prepopulation: "runtime_derived",
|
|
12177
|
+
copyMode: "none",
|
|
12178
|
+
description: "Calibration scores are computed from tenant outcomes."
|
|
12179
|
+
},
|
|
12180
|
+
{
|
|
12181
|
+
component: "kernel",
|
|
12182
|
+
table: "contractEvaluations",
|
|
12183
|
+
prepopulation: "runtime_log",
|
|
12184
|
+
copyMode: "none",
|
|
12185
|
+
description: "Contract evaluation rows are runtime computation logs."
|
|
12186
|
+
},
|
|
12187
|
+
{
|
|
12188
|
+
component: "kernel",
|
|
12189
|
+
table: "contradictions",
|
|
12190
|
+
prepopulation: "runtime_data",
|
|
12191
|
+
copyMode: "none",
|
|
12192
|
+
description: "Contradictions are tenant graph facts."
|
|
12193
|
+
},
|
|
12194
|
+
{
|
|
12195
|
+
component: "kernel",
|
|
12196
|
+
table: "crossProjectConnections",
|
|
12197
|
+
prepopulation: "runtime_data",
|
|
12198
|
+
copyMode: "none",
|
|
12199
|
+
description: "Cross-topic connections are tenant graph facts."
|
|
12200
|
+
},
|
|
12201
|
+
{
|
|
12202
|
+
component: "kernel",
|
|
12203
|
+
table: "decisionComputedSummaries",
|
|
12204
|
+
prepopulation: "runtime_derived",
|
|
12205
|
+
copyMode: "none",
|
|
12206
|
+
description: "Decision summaries are derived tenant outputs."
|
|
12207
|
+
},
|
|
12208
|
+
{
|
|
12209
|
+
component: "kernel",
|
|
12210
|
+
table: "decisionEvents",
|
|
12211
|
+
prepopulation: "runtime_data",
|
|
12212
|
+
copyMode: "none",
|
|
12213
|
+
description: "Decision events are lifecycle data."
|
|
12214
|
+
},
|
|
12215
|
+
{
|
|
12216
|
+
component: "kernel",
|
|
12217
|
+
table: "decisionParticipants",
|
|
12218
|
+
prepopulation: "runtime_data",
|
|
12219
|
+
copyMode: "none",
|
|
12220
|
+
description: "Decision participants are tenant-selected actors."
|
|
12221
|
+
},
|
|
12222
|
+
{
|
|
12223
|
+
component: "kernel",
|
|
12224
|
+
table: "decisionRiskLedger",
|
|
12225
|
+
prepopulation: "runtime_data",
|
|
12226
|
+
copyMode: "none",
|
|
12227
|
+
description: "Decision risk rows are tenant decision data."
|
|
12228
|
+
},
|
|
12229
|
+
{
|
|
12230
|
+
component: "kernel",
|
|
12231
|
+
table: "decisionSnapshots",
|
|
12232
|
+
prepopulation: "runtime_derived",
|
|
12233
|
+
copyMode: "none",
|
|
12234
|
+
description: "Decision snapshots are derived from tenant state."
|
|
12235
|
+
},
|
|
12236
|
+
{
|
|
12237
|
+
component: "kernel",
|
|
12238
|
+
table: "deliberationContributions",
|
|
12239
|
+
prepopulation: "runtime_data",
|
|
12240
|
+
copyMode: "none",
|
|
12241
|
+
description: "Deliberation contributions are tenant-authored data."
|
|
12242
|
+
},
|
|
12243
|
+
{
|
|
12244
|
+
component: "kernel",
|
|
12245
|
+
table: "deliberationSessions",
|
|
12246
|
+
prepopulation: "runtime_data",
|
|
12247
|
+
copyMode: "none",
|
|
12248
|
+
description: "Deliberation sessions are created by tenant workflows."
|
|
12249
|
+
},
|
|
12250
|
+
{
|
|
12251
|
+
component: "kernel",
|
|
12252
|
+
table: "epistemicAudit",
|
|
12253
|
+
prepopulation: "runtime_log",
|
|
12254
|
+
copyMode: "none",
|
|
12255
|
+
description: "Epistemic audit rows are append-only runtime audit data."
|
|
12256
|
+
},
|
|
12257
|
+
{
|
|
12258
|
+
component: "kernel",
|
|
12259
|
+
table: "epistemicContracts",
|
|
12260
|
+
prepopulation: "runtime_data",
|
|
12261
|
+
copyMode: "none",
|
|
12262
|
+
description: "Epistemic contracts are tenant-authored governance data."
|
|
12263
|
+
},
|
|
12264
|
+
{
|
|
12265
|
+
component: "kernel",
|
|
12266
|
+
table: "epistemicEdges",
|
|
12267
|
+
prepopulation: "runtime_data",
|
|
12268
|
+
copyMode: "none",
|
|
12269
|
+
description: "Edges are tenant reasoning graph data."
|
|
12270
|
+
},
|
|
12271
|
+
{
|
|
12272
|
+
component: "kernel",
|
|
12273
|
+
table: "epistemicNodeEmbeddings",
|
|
12274
|
+
prepopulation: "runtime_derived",
|
|
12275
|
+
copyMode: "none",
|
|
12276
|
+
description: "Embeddings are derived from tenant graph nodes."
|
|
12277
|
+
},
|
|
12278
|
+
{
|
|
12279
|
+
component: "kernel",
|
|
12280
|
+
table: "epistemicNodes",
|
|
12281
|
+
prepopulation: "runtime_data",
|
|
12282
|
+
copyMode: "none",
|
|
12283
|
+
description: "Nodes are tenant reasoning graph data."
|
|
12284
|
+
},
|
|
12285
|
+
{
|
|
12286
|
+
component: "kernel",
|
|
12287
|
+
table: "graphAnalysisCache",
|
|
12288
|
+
prepopulation: "runtime_derived",
|
|
12289
|
+
copyMode: "none",
|
|
12290
|
+
description: "Graph analysis cache rows are derived from tenant graph state."
|
|
12291
|
+
},
|
|
12292
|
+
{
|
|
12293
|
+
component: "kernel",
|
|
12294
|
+
table: "graphAnalysisResults",
|
|
12295
|
+
prepopulation: "runtime_derived",
|
|
12296
|
+
copyMode: "none",
|
|
12297
|
+
description: "Graph analysis result rows are derived tenant outputs."
|
|
12298
|
+
},
|
|
12299
|
+
{
|
|
12300
|
+
component: "kernel",
|
|
12301
|
+
table: "graphSuggestions",
|
|
12302
|
+
prepopulation: "runtime_derived",
|
|
12303
|
+
copyMode: "none",
|
|
12304
|
+
description: "Graph suggestions are derived recommendations."
|
|
12305
|
+
},
|
|
12306
|
+
{
|
|
12307
|
+
component: "kernel",
|
|
12308
|
+
table: "harnessReplays",
|
|
12309
|
+
prepopulation: "runtime_log",
|
|
12310
|
+
copyMode: "none",
|
|
12311
|
+
description: "Harness replay rows are runtime verification logs."
|
|
12312
|
+
},
|
|
12313
|
+
{
|
|
12314
|
+
component: "kernel",
|
|
12315
|
+
table: "harnessRuns",
|
|
12316
|
+
prepopulation: "runtime_log",
|
|
12317
|
+
copyMode: "none",
|
|
12318
|
+
description: "Harness run rows are runtime verification logs."
|
|
12319
|
+
},
|
|
12320
|
+
{
|
|
12321
|
+
component: "kernel",
|
|
12322
|
+
table: "idempotencyTokens",
|
|
12323
|
+
prepopulation: "runtime_log",
|
|
12324
|
+
copyMode: "none",
|
|
12325
|
+
description: "Idempotency tokens are request-scoped runtime guards."
|
|
12326
|
+
},
|
|
12327
|
+
{
|
|
12328
|
+
component: "kernel",
|
|
12329
|
+
table: "lenses",
|
|
12330
|
+
prepopulation: "optional_template",
|
|
12331
|
+
copyMode: "none",
|
|
12332
|
+
description: "Reusable lens templates may live in K templates, but workspace-specific copies are not required for core SDK boot."
|
|
12333
|
+
},
|
|
12334
|
+
{
|
|
12335
|
+
component: "kernel",
|
|
12336
|
+
table: "lensTopicBindings",
|
|
12337
|
+
prepopulation: "runtime_data",
|
|
12338
|
+
copyMode: "none",
|
|
12339
|
+
description: "Lens bindings attach runtime topics to runtime/workspace lenses."
|
|
12340
|
+
},
|
|
12341
|
+
{
|
|
12342
|
+
component: "kernel",
|
|
12343
|
+
table: "neo4jSyncQueue",
|
|
12344
|
+
prepopulation: "runtime_queue",
|
|
12345
|
+
copyMode: "none",
|
|
12346
|
+
description: "Neo4j sync queue rows are runtime work items."
|
|
12347
|
+
},
|
|
12348
|
+
{
|
|
12349
|
+
component: "kernel",
|
|
12350
|
+
table: "ontologyDefinitions",
|
|
12351
|
+
prepopulation: "required_template",
|
|
12352
|
+
copyMode: "template_global",
|
|
12353
|
+
scope: "global",
|
|
12354
|
+
uniqueKey: ["ontologyKey"],
|
|
12355
|
+
description: "Platform ontology definitions power taxonomy reads and effective ontology resolution."
|
|
12356
|
+
},
|
|
12357
|
+
{
|
|
12358
|
+
component: "kernel",
|
|
12359
|
+
table: "ontologyVersions",
|
|
12360
|
+
prepopulation: "required_template",
|
|
12361
|
+
copyMode: "template_reference_remap",
|
|
12362
|
+
scope: "global",
|
|
12363
|
+
uniqueKey: ["ontologyKey", "version"],
|
|
12364
|
+
dependsOn: ["ontologyDefinitions"],
|
|
12365
|
+
description: "Ontology versions must be copied with ontologyDefinition ID remapping."
|
|
12366
|
+
},
|
|
12367
|
+
{
|
|
12368
|
+
component: "kernel",
|
|
12369
|
+
table: "platformAgentRunPolicyDecisions",
|
|
12370
|
+
prepopulation: "runtime_log",
|
|
12371
|
+
copyMode: "none",
|
|
12372
|
+
description: "Agent-run policy decisions are audit logs."
|
|
12373
|
+
},
|
|
12374
|
+
{
|
|
12375
|
+
component: "kernel",
|
|
12376
|
+
table: "platformAgentRunPromptResolutions",
|
|
12377
|
+
prepopulation: "runtime_log",
|
|
12378
|
+
copyMode: "none",
|
|
12379
|
+
description: "Agent-run prompt resolution rows are runtime logs."
|
|
12380
|
+
},
|
|
12381
|
+
{
|
|
12382
|
+
component: "kernel",
|
|
12383
|
+
table: "platformAgentRuns",
|
|
12384
|
+
prepopulation: "runtime_log",
|
|
12385
|
+
copyMode: "none",
|
|
12386
|
+
description: "Agent runs are runtime execution records."
|
|
12387
|
+
},
|
|
12388
|
+
{
|
|
12389
|
+
component: "kernel",
|
|
12390
|
+
table: "platformAgentRunToolCalls",
|
|
12391
|
+
prepopulation: "runtime_log",
|
|
12392
|
+
copyMode: "none",
|
|
12393
|
+
description: "Agent-run tool calls are runtime execution records."
|
|
12394
|
+
},
|
|
12395
|
+
{
|
|
12396
|
+
component: "kernel",
|
|
12397
|
+
table: "platformHarnessShadowAudit",
|
|
12398
|
+
prepopulation: "runtime_log",
|
|
12399
|
+
copyMode: "none",
|
|
12400
|
+
description: "Harness shadow audit rows are runtime audit records."
|
|
12401
|
+
},
|
|
12402
|
+
{
|
|
12403
|
+
component: "kernel",
|
|
12404
|
+
table: "publicationRules",
|
|
12405
|
+
prepopulation: "required_template",
|
|
12406
|
+
copyMode: "template_tenant_rewrite",
|
|
12407
|
+
scope: "tenant",
|
|
12408
|
+
uniqueKey: ["tenantId", "workspaceId", "name"],
|
|
12409
|
+
description: "Default publication policy rules are rewritten into each tenant."
|
|
12410
|
+
},
|
|
12411
|
+
{
|
|
12412
|
+
component: "kernel",
|
|
12413
|
+
table: "questionEvidenceLinks",
|
|
12414
|
+
prepopulation: "runtime_data",
|
|
12415
|
+
copyMode: "none",
|
|
12416
|
+
description: "Question-to-evidence links are tenant graph data."
|
|
12417
|
+
},
|
|
12418
|
+
{
|
|
12419
|
+
component: "kernel",
|
|
12420
|
+
table: "researchJobs",
|
|
12421
|
+
prepopulation: "runtime_queue",
|
|
12422
|
+
copyMode: "none",
|
|
12423
|
+
description: "Research job rows are runtime queue items."
|
|
12424
|
+
},
|
|
12425
|
+
{
|
|
12426
|
+
component: "kernel",
|
|
12427
|
+
table: "schemaEnumConfig",
|
|
12428
|
+
prepopulation: "required_template",
|
|
12429
|
+
copyMode: "template_global",
|
|
12430
|
+
scope: "global",
|
|
12431
|
+
uniqueKey: ["category", "value"],
|
|
12432
|
+
description: "Runtime-extensible enum defaults required by SDK graph APIs."
|
|
12433
|
+
},
|
|
12434
|
+
{
|
|
12435
|
+
component: "kernel",
|
|
12436
|
+
table: "stakeholderGroups",
|
|
12437
|
+
prepopulation: "runtime_data",
|
|
12438
|
+
copyMode: "none",
|
|
12439
|
+
description: "Stakeholder groups are tenant decision data."
|
|
12440
|
+
},
|
|
12441
|
+
{
|
|
12442
|
+
component: "kernel",
|
|
12443
|
+
table: "systemLogs",
|
|
12444
|
+
prepopulation: "runtime_log",
|
|
12445
|
+
copyMode: "none",
|
|
12446
|
+
description: "System logs are runtime telemetry."
|
|
12447
|
+
},
|
|
12448
|
+
{
|
|
12449
|
+
component: "kernel",
|
|
12450
|
+
table: "tasks",
|
|
12451
|
+
prepopulation: "runtime_data",
|
|
12452
|
+
copyMode: "none",
|
|
12453
|
+
description: "Tasks are tenant-authored work items."
|
|
12454
|
+
},
|
|
12455
|
+
{
|
|
12456
|
+
component: "kernel",
|
|
12457
|
+
table: "topics",
|
|
12458
|
+
prepopulation: "runtime_bootstrap",
|
|
12459
|
+
copyMode: "none",
|
|
12460
|
+
description: "Default topics are created by tenant provisioning, not copied from templates."
|
|
12461
|
+
},
|
|
12462
|
+
{
|
|
12463
|
+
component: "kernel",
|
|
12464
|
+
table: "workflowDefinitions",
|
|
12465
|
+
prepopulation: "optional_template",
|
|
12466
|
+
copyMode: "none",
|
|
12467
|
+
description: "Table-driven workflow definitions can be template data after the workflow engine leaves legacy mode."
|
|
12468
|
+
},
|
|
12469
|
+
{
|
|
12470
|
+
component: "kernel",
|
|
12471
|
+
table: "workflowPullRequests",
|
|
12472
|
+
prepopulation: "runtime_data",
|
|
12473
|
+
copyMode: "none",
|
|
12474
|
+
description: "Workflow pull requests are tenant workflow data."
|
|
12475
|
+
},
|
|
12476
|
+
{
|
|
12477
|
+
component: "kernel",
|
|
12478
|
+
table: "workflowStages",
|
|
12479
|
+
prepopulation: "optional_template",
|
|
12480
|
+
copyMode: "none",
|
|
12481
|
+
dependsOn: ["workflowDefinitions"],
|
|
12482
|
+
description: "Workflow stages can be template data after workflowDefinitions are enabled for bootstrap copying."
|
|
12483
|
+
},
|
|
12484
|
+
{
|
|
12485
|
+
component: "kernel",
|
|
12486
|
+
table: "worktreeBeliefCluster",
|
|
12487
|
+
prepopulation: "runtime_data",
|
|
12488
|
+
copyMode: "none",
|
|
12489
|
+
description: "Worktree cluster rows link runtime worktrees to runtime beliefs."
|
|
12490
|
+
},
|
|
12491
|
+
{
|
|
12492
|
+
component: "kernel",
|
|
12493
|
+
table: "worktrees",
|
|
12494
|
+
prepopulation: "runtime_data",
|
|
12495
|
+
copyMode: "none",
|
|
12496
|
+
description: "Worktrees are tenant/runtime planning data."
|
|
12497
|
+
},
|
|
12498
|
+
{
|
|
12499
|
+
component: "identity",
|
|
12500
|
+
table: "agents",
|
|
12501
|
+
prepopulation: "runtime_bootstrap",
|
|
12502
|
+
copyMode: "none",
|
|
12503
|
+
description: "Service agents are provisioned per tenant or service, not copied."
|
|
12504
|
+
},
|
|
12505
|
+
{
|
|
12506
|
+
component: "identity",
|
|
12507
|
+
table: "mcpWritePolicy",
|
|
12508
|
+
prepopulation: "required_template",
|
|
12509
|
+
copyMode: "template_global",
|
|
12510
|
+
scope: "global",
|
|
12511
|
+
uniqueKey: ["topicId", "role", "toolCategory"],
|
|
12512
|
+
description: "Global write policy defaults govern service and interactive MCP writes."
|
|
12513
|
+
},
|
|
12514
|
+
{
|
|
12515
|
+
component: "identity",
|
|
12516
|
+
table: "modelCallLogs",
|
|
12517
|
+
prepopulation: "runtime_log",
|
|
12518
|
+
copyMode: "none",
|
|
12519
|
+
description: "Model call logs are runtime telemetry."
|
|
12520
|
+
},
|
|
12521
|
+
{
|
|
12522
|
+
component: "identity",
|
|
12523
|
+
table: "modelFunctionSlots",
|
|
12524
|
+
prepopulation: "required_template",
|
|
12525
|
+
copyMode: "template_global",
|
|
12526
|
+
scope: "global",
|
|
12527
|
+
uniqueKey: ["slot"],
|
|
12528
|
+
description: "Function-to-model slots are required by model runtime resolution."
|
|
12529
|
+
},
|
|
12530
|
+
{
|
|
12531
|
+
component: "identity",
|
|
12532
|
+
table: "modelRegistry",
|
|
12533
|
+
prepopulation: "required_template",
|
|
12534
|
+
copyMode: "template_global",
|
|
12535
|
+
scope: "global",
|
|
12536
|
+
uniqueKey: ["key"],
|
|
12537
|
+
description: "Model catalog defaults are required by model runtime clients."
|
|
12538
|
+
},
|
|
12539
|
+
{
|
|
12540
|
+
component: "identity",
|
|
12541
|
+
table: "modelSlotConfigs",
|
|
12542
|
+
prepopulation: "required_template",
|
|
12543
|
+
copyMode: "template_global",
|
|
12544
|
+
scope: "global",
|
|
12545
|
+
uniqueKey: ["slot"],
|
|
12546
|
+
description: "Slot-level defaults are required before tenant overrides exist."
|
|
12547
|
+
},
|
|
12548
|
+
{
|
|
12549
|
+
component: "identity",
|
|
12550
|
+
table: "platformAudienceGrants",
|
|
12551
|
+
prepopulation: "runtime_data",
|
|
12552
|
+
copyMode: "none",
|
|
12553
|
+
description: "Audience grants are principal/group-specific access rows."
|
|
12554
|
+
},
|
|
12555
|
+
{
|
|
12556
|
+
component: "identity",
|
|
12557
|
+
table: "platformAudiences",
|
|
12558
|
+
prepopulation: "required_template",
|
|
12559
|
+
copyMode: "template_tenant_rewrite",
|
|
12560
|
+
scope: "tenant",
|
|
12561
|
+
uniqueKey: ["tenantId", "workspaceId", "audienceKey"],
|
|
12562
|
+
description: "Default tenant audience taxonomy rows are rewritten into each tenant."
|
|
12563
|
+
},
|
|
12564
|
+
{
|
|
12565
|
+
component: "identity",
|
|
12566
|
+
table: "platformPolicyDecisionLogs",
|
|
12567
|
+
prepopulation: "runtime_log",
|
|
12568
|
+
copyMode: "none",
|
|
12569
|
+
description: "Policy decisions are runtime audit logs."
|
|
12570
|
+
},
|
|
12571
|
+
{
|
|
12572
|
+
component: "identity",
|
|
12573
|
+
table: "projectGrants",
|
|
12574
|
+
prepopulation: "runtime_data",
|
|
12575
|
+
copyMode: "none",
|
|
12576
|
+
description: "Project/topic grants are principal or group-specific access rows."
|
|
12577
|
+
},
|
|
12578
|
+
{
|
|
12579
|
+
component: "identity",
|
|
12580
|
+
table: "reasoningPermissions",
|
|
12581
|
+
prepopulation: "runtime_data",
|
|
12582
|
+
copyMode: "none",
|
|
12583
|
+
description: "Reasoning permissions are principal-specific policy rows."
|
|
12584
|
+
},
|
|
12585
|
+
{
|
|
12586
|
+
component: "identity",
|
|
12587
|
+
table: "tenantApiKeys",
|
|
12588
|
+
prepopulation: "runtime_secret",
|
|
12589
|
+
copyMode: "none",
|
|
12590
|
+
description: "API keys are tenant credentials and must never be copied."
|
|
12591
|
+
},
|
|
12592
|
+
{
|
|
12593
|
+
component: "identity",
|
|
12594
|
+
table: "tenantConfig",
|
|
12595
|
+
prepopulation: "required_template",
|
|
12596
|
+
copyMode: "template_tenant_rewrite",
|
|
12597
|
+
scope: "tenant",
|
|
12598
|
+
uniqueKey: ["tenantId"],
|
|
12599
|
+
description: "Tenant-local config defaults are rewritten during bootstrap."
|
|
12600
|
+
},
|
|
12601
|
+
{
|
|
12602
|
+
component: "identity",
|
|
12603
|
+
table: "tenantIntegrations",
|
|
12604
|
+
prepopulation: "required_template",
|
|
12605
|
+
copyMode: "template_tenant_rewrite",
|
|
12606
|
+
scope: "tenant",
|
|
12607
|
+
uniqueKey: ["tenantId", "integrationKey"],
|
|
12608
|
+
description: "Non-secret integration descriptors are rewritten into each tenant."
|
|
12609
|
+
},
|
|
12610
|
+
{
|
|
12611
|
+
component: "identity",
|
|
12612
|
+
table: "tenantModelSlotBindings",
|
|
12613
|
+
prepopulation: "runtime_secret",
|
|
12614
|
+
copyMode: "none",
|
|
12615
|
+
description: "Tenant model slot bindings reference provider secrets and are runtime-only."
|
|
12616
|
+
},
|
|
12617
|
+
{
|
|
12618
|
+
component: "identity",
|
|
12619
|
+
table: "tenantPolicies",
|
|
12620
|
+
prepopulation: "required_template",
|
|
12621
|
+
copyMode: "template_tenant_rewrite",
|
|
12622
|
+
scope: "tenant",
|
|
12623
|
+
uniqueKey: ["tenantId", "workspaceId", "roleName"],
|
|
12624
|
+
description: "Default tenant policy roles are rewritten during bootstrap."
|
|
12625
|
+
},
|
|
12626
|
+
{
|
|
12627
|
+
component: "identity",
|
|
12628
|
+
table: "tenantProviderSecrets",
|
|
12629
|
+
prepopulation: "runtime_secret",
|
|
12630
|
+
copyMode: "none",
|
|
12631
|
+
description: "Provider secrets are credentials and must never be copied."
|
|
12632
|
+
},
|
|
12633
|
+
{
|
|
12634
|
+
component: "identity",
|
|
12635
|
+
table: "tenantProxyGatewayUsage",
|
|
12636
|
+
prepopulation: "runtime_log",
|
|
12637
|
+
copyMode: "none",
|
|
12638
|
+
description: "Proxy gateway usage rows are runtime telemetry."
|
|
12639
|
+
},
|
|
12640
|
+
{
|
|
12641
|
+
component: "identity",
|
|
12642
|
+
table: "tenantProxyTokenMints",
|
|
12643
|
+
prepopulation: "runtime_secret",
|
|
12644
|
+
copyMode: "none",
|
|
12645
|
+
description: "Proxy token mints are ephemeral secret-bearing runtime rows."
|
|
12646
|
+
},
|
|
12647
|
+
{
|
|
12648
|
+
component: "identity",
|
|
12649
|
+
table: "tenantSandboxAuditEvents",
|
|
12650
|
+
prepopulation: "runtime_log",
|
|
12651
|
+
copyMode: "none",
|
|
12652
|
+
description: "Sandbox audit rows are runtime security logs."
|
|
12653
|
+
},
|
|
12654
|
+
{
|
|
12655
|
+
component: "identity",
|
|
12656
|
+
table: "tenantSecrets",
|
|
12657
|
+
prepopulation: "runtime_secret",
|
|
12658
|
+
copyMode: "none",
|
|
12659
|
+
description: "Tenant secrets are credentials and must never be copied."
|
|
12660
|
+
},
|
|
12661
|
+
{
|
|
12662
|
+
component: "identity",
|
|
12663
|
+
table: "toolAcls",
|
|
12664
|
+
prepopulation: "required_template",
|
|
12665
|
+
copyMode: "template_global",
|
|
12666
|
+
scope: "global",
|
|
12667
|
+
uniqueKey: ["role", "toolName"],
|
|
12668
|
+
description: "Default role-to-tool grants are required for SDK/MCP tool access."
|
|
12669
|
+
},
|
|
12670
|
+
{
|
|
12671
|
+
component: "identity",
|
|
12672
|
+
table: "toolRegistry",
|
|
12673
|
+
prepopulation: "required_template",
|
|
12674
|
+
copyMode: "template_global",
|
|
12675
|
+
scope: "global",
|
|
12676
|
+
uniqueKey: ["toolName"],
|
|
12677
|
+
description: "Core tool catalog rows are required before pack or tenant tools exist."
|
|
12678
|
+
},
|
|
12679
|
+
{
|
|
12680
|
+
component: "identity",
|
|
12681
|
+
table: "users",
|
|
12682
|
+
prepopulation: "runtime_bootstrap",
|
|
12683
|
+
copyMode: "none",
|
|
12684
|
+
description: "Users are created from Clerk/MC principal resolution, not copied."
|
|
12685
|
+
}
|
|
12686
|
+
];
|
|
12687
|
+
TENANT_BOOTSTRAP_TABLE_REQUIREMENTS.filter(
|
|
12688
|
+
isCopyableSeedRequirement
|
|
12689
|
+
);
|
|
12690
|
+
TENANT_BOOTSTRAP_TABLE_REQUIREMENTS.filter(
|
|
12691
|
+
(entry) => !isCopyableSeedRequirement(entry)
|
|
12692
|
+
).map((entry) => entry.table);
|
|
12693
|
+
|
|
11480
12694
|
export { DOMAIN_EVENT_TYPES, DOMAIN_EVENT_VERSION, EVENT_RETENTION_DEFAULT_DAYS, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_MS };
|
|
11481
12695
|
//# sourceMappingURL=types.js.map
|
|
11482
12696
|
//# sourceMappingURL=types.js.map
|