@lucern/events 0.3.0-alpha.5 → 0.3.0-alpha.7
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 +150 -23
- package/dist/index.js.map +1 -1
- package/dist/outbox.js +143 -21
- package/dist/outbox.js.map +1 -1
- package/dist/types.js +143 -21
- package/dist/types.js.map +1 -1
- package/dist/webhooks.js +150 -23
- package/dist/webhooks.js.map +1 -1
- package/package.json +2 -2
package/dist/types.js
CHANGED
|
@@ -4863,6 +4863,11 @@ var TENANT_CLIENT_INSTALLABLE_PACKAGES = [
|
|
|
4863
4863
|
role: "sdk_dependency",
|
|
4864
4864
|
directTenantImport: false
|
|
4865
4865
|
},
|
|
4866
|
+
{
|
|
4867
|
+
packageName: "@lucern/graph-sync",
|
|
4868
|
+
role: "host_addon_runtime",
|
|
4869
|
+
directTenantImport: true
|
|
4870
|
+
},
|
|
4866
4871
|
{
|
|
4867
4872
|
packageName: "@lucern/identity",
|
|
4868
4873
|
role: "component_runtime",
|
|
@@ -4982,8 +4987,11 @@ function compactRecord(input) {
|
|
|
4982
4987
|
Object.entries(input).filter(([, value]) => value !== void 0)
|
|
4983
4988
|
);
|
|
4984
4989
|
}
|
|
4990
|
+
function isRecord(value) {
|
|
4991
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
4992
|
+
}
|
|
4985
4993
|
function recordValue(value) {
|
|
4986
|
-
return
|
|
4994
|
+
return isRecord(value) ? value : {};
|
|
4987
4995
|
}
|
|
4988
4996
|
var createEvidenceProjection = defineProjection({
|
|
4989
4997
|
contractName: "create_evidence",
|
|
@@ -5689,9 +5697,16 @@ var ADD_WORKTREE = {
|
|
|
5689
5697
|
},
|
|
5690
5698
|
projectId: {
|
|
5691
5699
|
type: "string",
|
|
5692
|
-
description: "Legacy topicId alias"
|
|
5700
|
+
description: "Legacy topicId alias or resolver hint"
|
|
5701
|
+
},
|
|
5702
|
+
topicId: {
|
|
5703
|
+
type: "string",
|
|
5704
|
+
description: "Optional topic scope hint for resolver validation"
|
|
5705
|
+
},
|
|
5706
|
+
topicHint: {
|
|
5707
|
+
type: "string",
|
|
5708
|
+
description: "Natural-language topic hint for automatic topic resolution"
|
|
5693
5709
|
},
|
|
5694
|
-
topicId: { type: "string", description: "Optional topic scope hint" },
|
|
5695
5710
|
branchId: {
|
|
5696
5711
|
type: "string",
|
|
5697
5712
|
description: "The branch this worktree investigates"
|
|
@@ -5789,6 +5804,22 @@ var ADD_WORKTREE = {
|
|
|
5789
5804
|
type: "string",
|
|
5790
5805
|
description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
|
|
5791
5806
|
},
|
|
5807
|
+
tags: {
|
|
5808
|
+
type: "array",
|
|
5809
|
+
description: "Additional topic-resolution tags for the worktree"
|
|
5810
|
+
},
|
|
5811
|
+
touchedPaths: {
|
|
5812
|
+
type: "array",
|
|
5813
|
+
description: "File paths used as topic-resolution signals"
|
|
5814
|
+
},
|
|
5815
|
+
sourceRef: {
|
|
5816
|
+
type: "string",
|
|
5817
|
+
description: "Source reference used as a topic-resolution signal"
|
|
5818
|
+
},
|
|
5819
|
+
sourceKind: {
|
|
5820
|
+
type: "string",
|
|
5821
|
+
description: "Source kind used as a topic-resolution signal"
|
|
5822
|
+
},
|
|
5792
5823
|
campaign: {
|
|
5793
5824
|
type: "number",
|
|
5794
5825
|
description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
|
|
@@ -5826,7 +5857,7 @@ var ADD_WORKTREE = {
|
|
|
5826
5857
|
description: "Timestamp when worktree metadata was last reconciled"
|
|
5827
5858
|
}
|
|
5828
5859
|
},
|
|
5829
|
-
required: ["title"
|
|
5860
|
+
required: ["title"],
|
|
5830
5861
|
response: {
|
|
5831
5862
|
description: "The created worktree",
|
|
5832
5863
|
fields: {
|
|
@@ -7529,18 +7560,60 @@ var CREATE_TASK = {
|
|
|
7529
7560
|
name: "create_task",
|
|
7530
7561
|
description: "Create an execution task tied to the reasoning state. Like `git task` \u2014 tracks concrete work items (calls to make, data to gather, analyses to run) linked to questions, beliefs, or worktrees.",
|
|
7531
7562
|
parameters: {
|
|
7532
|
-
title: { type: "string", description: "Task
|
|
7563
|
+
title: { type: "string", description: "Task title" },
|
|
7533
7564
|
topicId: { type: "string", description: "Topic scope" },
|
|
7565
|
+
description: {
|
|
7566
|
+
type: "string",
|
|
7567
|
+
description: "Long-form task description"
|
|
7568
|
+
},
|
|
7534
7569
|
taskType: {
|
|
7535
7570
|
type: "string",
|
|
7536
|
-
description: "
|
|
7537
|
-
enum: [
|
|
7571
|
+
description: "Task taxonomy",
|
|
7572
|
+
enum: [
|
|
7573
|
+
"general",
|
|
7574
|
+
"find_evidence",
|
|
7575
|
+
"verify_claim",
|
|
7576
|
+
"research",
|
|
7577
|
+
"review",
|
|
7578
|
+
"interview",
|
|
7579
|
+
"analysis",
|
|
7580
|
+
"track_metrics"
|
|
7581
|
+
]
|
|
7582
|
+
},
|
|
7583
|
+
priority: {
|
|
7584
|
+
type: "string",
|
|
7585
|
+
description: "Priority",
|
|
7586
|
+
enum: ["urgent", "high", "medium", "low"]
|
|
7587
|
+
},
|
|
7588
|
+
status: {
|
|
7589
|
+
type: "string",
|
|
7590
|
+
description: "Initial status (defaults to todo)",
|
|
7591
|
+
enum: ["todo", "in_progress", "blocked", "done"]
|
|
7592
|
+
},
|
|
7593
|
+
linkedWorktreeId: {
|
|
7594
|
+
type: "string",
|
|
7595
|
+
description: "Worktree this task belongs to"
|
|
7596
|
+
},
|
|
7597
|
+
linkedBeliefId: {
|
|
7598
|
+
type: "string",
|
|
7599
|
+
description: "Belief this task supports"
|
|
7538
7600
|
},
|
|
7539
7601
|
linkedQuestionId: {
|
|
7540
7602
|
type: "string",
|
|
7541
7603
|
description: "Question this task addresses"
|
|
7542
7604
|
},
|
|
7543
|
-
|
|
7605
|
+
assigneeId: {
|
|
7606
|
+
type: "string",
|
|
7607
|
+
description: "Principal assigned to the task"
|
|
7608
|
+
},
|
|
7609
|
+
dueDate: {
|
|
7610
|
+
type: "number",
|
|
7611
|
+
description: "Due date as epoch milliseconds"
|
|
7612
|
+
},
|
|
7613
|
+
tags: {
|
|
7614
|
+
type: "array",
|
|
7615
|
+
description: "Free-form string tags"
|
|
7616
|
+
}
|
|
7544
7617
|
},
|
|
7545
7618
|
required: ["title"],
|
|
7546
7619
|
response: {
|
|
@@ -9623,9 +9696,7 @@ function mcpContractFromArgsSchema(base, args, contractName) {
|
|
|
9623
9696
|
required: converted.filter(([, field]) => field.required).map(([fieldName]) => fieldName)
|
|
9624
9697
|
};
|
|
9625
9698
|
}
|
|
9626
|
-
|
|
9627
|
-
return contract;
|
|
9628
|
-
}
|
|
9699
|
+
var defineFunctionContract = (contract) => contract;
|
|
9629
9700
|
function authUserId(context) {
|
|
9630
9701
|
return context.userId ?? context.principalId ?? "lucern-agent";
|
|
9631
9702
|
}
|
|
@@ -9779,6 +9850,9 @@ var observationContextArgs = z.object({
|
|
|
9779
9850
|
limit: z.number().optional().describe("Maximum observations to return."),
|
|
9780
9851
|
status: z.string().optional().describe("Observation status filter.")
|
|
9781
9852
|
});
|
|
9853
|
+
function isRecord2(value) {
|
|
9854
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
9855
|
+
}
|
|
9782
9856
|
var observationInput = (input, context) => withUserId(
|
|
9783
9857
|
compactRecord4({
|
|
9784
9858
|
projectId: input.projectId,
|
|
@@ -9833,8 +9907,8 @@ var contextContracts = [
|
|
|
9833
9907
|
kind: "mutation",
|
|
9834
9908
|
inputProjection: observationInput,
|
|
9835
9909
|
outputProjection: (output, input) => ({
|
|
9836
|
-
...output
|
|
9837
|
-
observationId: output
|
|
9910
|
+
...isRecord2(output) ? output : {},
|
|
9911
|
+
observationId: isRecord2(output) ? output.nodeId : void 0,
|
|
9838
9912
|
observationType: input.observationType
|
|
9839
9913
|
})
|
|
9840
9914
|
},
|
|
@@ -11315,10 +11389,11 @@ var worktreeDecisionGateInputSchema = z.object({
|
|
|
11315
11389
|
decidedBy: z.string().optional().describe("Actor that decided the gate verdict.")
|
|
11316
11390
|
}).passthrough().describe("Decision gate contract for worktree activation or exit.");
|
|
11317
11391
|
var addWorktreeArgs = z.object({
|
|
11318
|
-
title: z.string().
|
|
11392
|
+
title: z.string().describe("Human-readable worktree name or objective."),
|
|
11319
11393
|
name: z.string().optional().describe("Storage-name alias for callers that already use backend naming."),
|
|
11320
|
-
topicId: z.string().describe("
|
|
11321
|
-
projectId: z.string().optional().describe("Legacy topicId alias."),
|
|
11394
|
+
topicId: z.string().optional().describe("Optional primary topic scope hint for resolver validation."),
|
|
11395
|
+
projectId: z.string().optional().describe("Legacy topicId alias/hint."),
|
|
11396
|
+
topicHint: z.string().optional().describe("Natural-language topic hint for automatic topic resolution."),
|
|
11322
11397
|
branchId: z.string().optional().describe("Legacy branch identifier for compatibility with workflow callers."),
|
|
11323
11398
|
objective: z.string().optional().describe("Reasoning objective this worktree is intended to resolve."),
|
|
11324
11399
|
hypothesis: z.string().optional().describe("Testable claim this worktree investigates."),
|
|
@@ -11343,6 +11418,10 @@ var addWorktreeArgs = z.object({
|
|
|
11343
11418
|
autoShape: z.boolean().optional().describe("Whether to invoke inquiry auto-shaping during creation."),
|
|
11344
11419
|
autoFixPolicy: autoFixPolicyInputSchema.optional(),
|
|
11345
11420
|
domainPackId: z.string().optional().describe("Domain pack whose shaping hooks should influence the worktree."),
|
|
11421
|
+
tags: z.array(z.string()).optional().describe("Additional topic-resolution tags for the worktree."),
|
|
11422
|
+
touchedPaths: z.array(z.string()).optional().describe("File paths used as topic-resolution signals."),
|
|
11423
|
+
sourceRef: z.string().optional().describe("Source reference used as a topic-resolution signal."),
|
|
11424
|
+
sourceKind: z.string().optional().describe("Source kind used as a topic-resolution signal."),
|
|
11346
11425
|
campaign: z.number().optional().describe("Top-level pipeline campaign number."),
|
|
11347
11426
|
lane: z.string().optional().describe("Campaign lane for the worktree."),
|
|
11348
11427
|
laneOrderInCampaign: z.number().optional().describe("Ordering for this lane within its campaign."),
|
|
@@ -11672,8 +11751,46 @@ var worktreesContracts = [
|
|
|
11672
11751
|
args: openPullRequestArgs
|
|
11673
11752
|
})
|
|
11674
11753
|
];
|
|
11675
|
-
|
|
11676
|
-
|
|
11754
|
+
var taskPrioritySchema = z.enum(["urgent", "high", "medium", "low"]);
|
|
11755
|
+
var taskStatusSchema2 = z.enum(["todo", "in_progress", "blocked", "done"]);
|
|
11756
|
+
var taskTypeSchema = z.enum([
|
|
11757
|
+
"general",
|
|
11758
|
+
"find_evidence",
|
|
11759
|
+
"verify_claim",
|
|
11760
|
+
"research",
|
|
11761
|
+
"review",
|
|
11762
|
+
"interview",
|
|
11763
|
+
"analysis",
|
|
11764
|
+
"track_metrics"
|
|
11765
|
+
]);
|
|
11766
|
+
var createTaskArgs = z.object({
|
|
11767
|
+
title: z.string().describe("Task title."),
|
|
11768
|
+
topicId: z.string().optional().describe("Topic scope."),
|
|
11769
|
+
description: z.string().optional().describe("Long-form task description."),
|
|
11770
|
+
taskType: taskTypeSchema.optional().describe("Task taxonomy."),
|
|
11771
|
+
priority: taskPrioritySchema.optional().describe("Priority. Defaults to medium when omitted by the server."),
|
|
11772
|
+
status: taskStatusSchema2.optional().describe("Initial status. Defaults to todo."),
|
|
11773
|
+
linkedWorktreeId: z.string().optional().describe("Worktree this task belongs to."),
|
|
11774
|
+
linkedBeliefId: z.string().optional().describe("Belief this task supports."),
|
|
11775
|
+
linkedQuestionId: z.string().optional().describe("Question this task addresses."),
|
|
11776
|
+
assigneeId: z.string().optional().describe("Principal assigned to the task."),
|
|
11777
|
+
dueDate: z.number().optional().describe("Due date as epoch milliseconds."),
|
|
11778
|
+
tags: z.array(z.string()).optional().describe("Free-form tags.")
|
|
11779
|
+
});
|
|
11780
|
+
var createTaskInput = (input) => compactRecord4({
|
|
11781
|
+
title: input.title,
|
|
11782
|
+
topicId: input.topicId,
|
|
11783
|
+
description: input.description,
|
|
11784
|
+
taskType: input.taskType,
|
|
11785
|
+
priority: input.priority ?? "medium",
|
|
11786
|
+
status: input.status ?? "todo",
|
|
11787
|
+
linkedWorktreeId: input.linkedWorktreeId,
|
|
11788
|
+
linkedBeliefId: input.linkedBeliefId,
|
|
11789
|
+
linkedQuestionId: input.linkedQuestionId,
|
|
11790
|
+
assigneeId: input.assigneeId,
|
|
11791
|
+
dueDate: input.dueDate,
|
|
11792
|
+
tags: input.tags
|
|
11793
|
+
});
|
|
11677
11794
|
var taskInput = (input) => compactRecord4({
|
|
11678
11795
|
...input,
|
|
11679
11796
|
taskId: input.taskId ?? input.id
|
|
@@ -11705,8 +11822,10 @@ var tasksContracts = [
|
|
|
11705
11822
|
convex: {
|
|
11706
11823
|
module: "tasks",
|
|
11707
11824
|
functionName: "create",
|
|
11708
|
-
kind: "mutation"
|
|
11709
|
-
|
|
11825
|
+
kind: "mutation",
|
|
11826
|
+
inputProjection: createTaskInput
|
|
11827
|
+
},
|
|
11828
|
+
args: createTaskArgs
|
|
11710
11829
|
}),
|
|
11711
11830
|
surfaceContract({
|
|
11712
11831
|
name: "list_tasks",
|
|
@@ -12824,9 +12943,12 @@ var ALL_FUNCTION_CONTRACTS = [
|
|
|
12824
12943
|
...legacyContracts
|
|
12825
12944
|
];
|
|
12826
12945
|
assertSurfaceCoverage(ALL_FUNCTION_CONTRACTS);
|
|
12827
|
-
new Map(
|
|
12946
|
+
var FUNCTION_CONTRACTS_BY_NAME = new Map(
|
|
12828
12947
|
ALL_FUNCTION_CONTRACTS.map((contract) => [contract.name, contract])
|
|
12829
12948
|
);
|
|
12949
|
+
FUNCTION_CONTRACTS_BY_NAME.get.bind(
|
|
12950
|
+
FUNCTION_CONTRACTS_BY_NAME
|
|
12951
|
+
);
|
|
12830
12952
|
|
|
12831
12953
|
// ../contracts/src/tenant-bootstrap-seed.contract.ts
|
|
12832
12954
|
function isCopyableSeedRequirement(entry) {
|