@lucern/events 0.3.0-alpha.6 → 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/outbox.js
CHANGED
|
@@ -4915,6 +4915,11 @@ var TENANT_CLIENT_INSTALLABLE_PACKAGES = [
|
|
|
4915
4915
|
role: "sdk_dependency",
|
|
4916
4916
|
directTenantImport: false
|
|
4917
4917
|
},
|
|
4918
|
+
{
|
|
4919
|
+
packageName: "@lucern/graph-sync",
|
|
4920
|
+
role: "host_addon_runtime",
|
|
4921
|
+
directTenantImport: true
|
|
4922
|
+
},
|
|
4918
4923
|
{
|
|
4919
4924
|
packageName: "@lucern/identity",
|
|
4920
4925
|
role: "component_runtime",
|
|
@@ -5034,8 +5039,11 @@ function compactRecord(input) {
|
|
|
5034
5039
|
Object.entries(input).filter(([, value]) => value !== void 0)
|
|
5035
5040
|
);
|
|
5036
5041
|
}
|
|
5042
|
+
function isRecord(value) {
|
|
5043
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5044
|
+
}
|
|
5037
5045
|
function recordValue(value) {
|
|
5038
|
-
return
|
|
5046
|
+
return isRecord(value) ? value : {};
|
|
5039
5047
|
}
|
|
5040
5048
|
var createEvidenceProjection = defineProjection({
|
|
5041
5049
|
contractName: "create_evidence",
|
|
@@ -5741,9 +5749,16 @@ var ADD_WORKTREE = {
|
|
|
5741
5749
|
},
|
|
5742
5750
|
projectId: {
|
|
5743
5751
|
type: "string",
|
|
5744
|
-
description: "Legacy topicId alias"
|
|
5752
|
+
description: "Legacy topicId alias or resolver hint"
|
|
5753
|
+
},
|
|
5754
|
+
topicId: {
|
|
5755
|
+
type: "string",
|
|
5756
|
+
description: "Optional topic scope hint for resolver validation"
|
|
5757
|
+
},
|
|
5758
|
+
topicHint: {
|
|
5759
|
+
type: "string",
|
|
5760
|
+
description: "Natural-language topic hint for automatic topic resolution"
|
|
5745
5761
|
},
|
|
5746
|
-
topicId: { type: "string", description: "Optional topic scope hint" },
|
|
5747
5762
|
branchId: {
|
|
5748
5763
|
type: "string",
|
|
5749
5764
|
description: "The branch this worktree investigates"
|
|
@@ -5841,6 +5856,22 @@ var ADD_WORKTREE = {
|
|
|
5841
5856
|
type: "string",
|
|
5842
5857
|
description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
|
|
5843
5858
|
},
|
|
5859
|
+
tags: {
|
|
5860
|
+
type: "array",
|
|
5861
|
+
description: "Additional topic-resolution tags for the worktree"
|
|
5862
|
+
},
|
|
5863
|
+
touchedPaths: {
|
|
5864
|
+
type: "array",
|
|
5865
|
+
description: "File paths used as topic-resolution signals"
|
|
5866
|
+
},
|
|
5867
|
+
sourceRef: {
|
|
5868
|
+
type: "string",
|
|
5869
|
+
description: "Source reference used as a topic-resolution signal"
|
|
5870
|
+
},
|
|
5871
|
+
sourceKind: {
|
|
5872
|
+
type: "string",
|
|
5873
|
+
description: "Source kind used as a topic-resolution signal"
|
|
5874
|
+
},
|
|
5844
5875
|
campaign: {
|
|
5845
5876
|
type: "number",
|
|
5846
5877
|
description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
|
|
@@ -5878,7 +5909,7 @@ var ADD_WORKTREE = {
|
|
|
5878
5909
|
description: "Timestamp when worktree metadata was last reconciled"
|
|
5879
5910
|
}
|
|
5880
5911
|
},
|
|
5881
|
-
required: ["title"
|
|
5912
|
+
required: ["title"],
|
|
5882
5913
|
response: {
|
|
5883
5914
|
description: "The created worktree",
|
|
5884
5915
|
fields: {
|
|
@@ -7581,18 +7612,60 @@ var CREATE_TASK = {
|
|
|
7581
7612
|
name: "create_task",
|
|
7582
7613
|
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.",
|
|
7583
7614
|
parameters: {
|
|
7584
|
-
title: { type: "string", description: "Task
|
|
7615
|
+
title: { type: "string", description: "Task title" },
|
|
7585
7616
|
topicId: { type: "string", description: "Topic scope" },
|
|
7617
|
+
description: {
|
|
7618
|
+
type: "string",
|
|
7619
|
+
description: "Long-form task description"
|
|
7620
|
+
},
|
|
7586
7621
|
taskType: {
|
|
7587
7622
|
type: "string",
|
|
7588
|
-
description: "
|
|
7589
|
-
enum: [
|
|
7623
|
+
description: "Task taxonomy",
|
|
7624
|
+
enum: [
|
|
7625
|
+
"general",
|
|
7626
|
+
"find_evidence",
|
|
7627
|
+
"verify_claim",
|
|
7628
|
+
"research",
|
|
7629
|
+
"review",
|
|
7630
|
+
"interview",
|
|
7631
|
+
"analysis",
|
|
7632
|
+
"track_metrics"
|
|
7633
|
+
]
|
|
7634
|
+
},
|
|
7635
|
+
priority: {
|
|
7636
|
+
type: "string",
|
|
7637
|
+
description: "Priority",
|
|
7638
|
+
enum: ["urgent", "high", "medium", "low"]
|
|
7639
|
+
},
|
|
7640
|
+
status: {
|
|
7641
|
+
type: "string",
|
|
7642
|
+
description: "Initial status (defaults to todo)",
|
|
7643
|
+
enum: ["todo", "in_progress", "blocked", "done"]
|
|
7644
|
+
},
|
|
7645
|
+
linkedWorktreeId: {
|
|
7646
|
+
type: "string",
|
|
7647
|
+
description: "Worktree this task belongs to"
|
|
7648
|
+
},
|
|
7649
|
+
linkedBeliefId: {
|
|
7650
|
+
type: "string",
|
|
7651
|
+
description: "Belief this task supports"
|
|
7590
7652
|
},
|
|
7591
7653
|
linkedQuestionId: {
|
|
7592
7654
|
type: "string",
|
|
7593
7655
|
description: "Question this task addresses"
|
|
7594
7656
|
},
|
|
7595
|
-
|
|
7657
|
+
assigneeId: {
|
|
7658
|
+
type: "string",
|
|
7659
|
+
description: "Principal assigned to the task"
|
|
7660
|
+
},
|
|
7661
|
+
dueDate: {
|
|
7662
|
+
type: "number",
|
|
7663
|
+
description: "Due date as epoch milliseconds"
|
|
7664
|
+
},
|
|
7665
|
+
tags: {
|
|
7666
|
+
type: "array",
|
|
7667
|
+
description: "Free-form string tags"
|
|
7668
|
+
}
|
|
7596
7669
|
},
|
|
7597
7670
|
required: ["title"],
|
|
7598
7671
|
response: {
|
|
@@ -9675,9 +9748,7 @@ function mcpContractFromArgsSchema(base, args, contractName) {
|
|
|
9675
9748
|
required: converted.filter(([, field]) => field.required).map(([fieldName]) => fieldName)
|
|
9676
9749
|
};
|
|
9677
9750
|
}
|
|
9678
|
-
|
|
9679
|
-
return contract;
|
|
9680
|
-
}
|
|
9751
|
+
var defineFunctionContract = (contract) => contract;
|
|
9681
9752
|
function authUserId(context) {
|
|
9682
9753
|
return context.userId ?? context.principalId ?? "lucern-agent";
|
|
9683
9754
|
}
|
|
@@ -9831,6 +9902,9 @@ var observationContextArgs = z.object({
|
|
|
9831
9902
|
limit: z.number().optional().describe("Maximum observations to return."),
|
|
9832
9903
|
status: z.string().optional().describe("Observation status filter.")
|
|
9833
9904
|
});
|
|
9905
|
+
function isRecord2(value) {
|
|
9906
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
9907
|
+
}
|
|
9834
9908
|
var observationInput = (input, context) => withUserId(
|
|
9835
9909
|
compactRecord4({
|
|
9836
9910
|
projectId: input.projectId,
|
|
@@ -9885,8 +9959,8 @@ var contextContracts = [
|
|
|
9885
9959
|
kind: "mutation",
|
|
9886
9960
|
inputProjection: observationInput,
|
|
9887
9961
|
outputProjection: (output, input) => ({
|
|
9888
|
-
...output
|
|
9889
|
-
observationId: output
|
|
9962
|
+
...isRecord2(output) ? output : {},
|
|
9963
|
+
observationId: isRecord2(output) ? output.nodeId : void 0,
|
|
9890
9964
|
observationType: input.observationType
|
|
9891
9965
|
})
|
|
9892
9966
|
},
|
|
@@ -11367,10 +11441,11 @@ var worktreeDecisionGateInputSchema = z.object({
|
|
|
11367
11441
|
decidedBy: z.string().optional().describe("Actor that decided the gate verdict.")
|
|
11368
11442
|
}).passthrough().describe("Decision gate contract for worktree activation or exit.");
|
|
11369
11443
|
var addWorktreeArgs = z.object({
|
|
11370
|
-
title: z.string().
|
|
11444
|
+
title: z.string().describe("Human-readable worktree name or objective."),
|
|
11371
11445
|
name: z.string().optional().describe("Storage-name alias for callers that already use backend naming."),
|
|
11372
|
-
topicId: z.string().describe("
|
|
11373
|
-
projectId: z.string().optional().describe("Legacy topicId alias."),
|
|
11446
|
+
topicId: z.string().optional().describe("Optional primary topic scope hint for resolver validation."),
|
|
11447
|
+
projectId: z.string().optional().describe("Legacy topicId alias/hint."),
|
|
11448
|
+
topicHint: z.string().optional().describe("Natural-language topic hint for automatic topic resolution."),
|
|
11374
11449
|
branchId: z.string().optional().describe("Legacy branch identifier for compatibility with workflow callers."),
|
|
11375
11450
|
objective: z.string().optional().describe("Reasoning objective this worktree is intended to resolve."),
|
|
11376
11451
|
hypothesis: z.string().optional().describe("Testable claim this worktree investigates."),
|
|
@@ -11395,6 +11470,10 @@ var addWorktreeArgs = z.object({
|
|
|
11395
11470
|
autoShape: z.boolean().optional().describe("Whether to invoke inquiry auto-shaping during creation."),
|
|
11396
11471
|
autoFixPolicy: autoFixPolicyInputSchema.optional(),
|
|
11397
11472
|
domainPackId: z.string().optional().describe("Domain pack whose shaping hooks should influence the worktree."),
|
|
11473
|
+
tags: z.array(z.string()).optional().describe("Additional topic-resolution tags for the worktree."),
|
|
11474
|
+
touchedPaths: z.array(z.string()).optional().describe("File paths used as topic-resolution signals."),
|
|
11475
|
+
sourceRef: z.string().optional().describe("Source reference used as a topic-resolution signal."),
|
|
11476
|
+
sourceKind: z.string().optional().describe("Source kind used as a topic-resolution signal."),
|
|
11398
11477
|
campaign: z.number().optional().describe("Top-level pipeline campaign number."),
|
|
11399
11478
|
lane: z.string().optional().describe("Campaign lane for the worktree."),
|
|
11400
11479
|
laneOrderInCampaign: z.number().optional().describe("Ordering for this lane within its campaign."),
|
|
@@ -11724,8 +11803,46 @@ var worktreesContracts = [
|
|
|
11724
11803
|
args: openPullRequestArgs
|
|
11725
11804
|
})
|
|
11726
11805
|
];
|
|
11727
|
-
|
|
11728
|
-
|
|
11806
|
+
var taskPrioritySchema = z.enum(["urgent", "high", "medium", "low"]);
|
|
11807
|
+
var taskStatusSchema2 = z.enum(["todo", "in_progress", "blocked", "done"]);
|
|
11808
|
+
var taskTypeSchema = z.enum([
|
|
11809
|
+
"general",
|
|
11810
|
+
"find_evidence",
|
|
11811
|
+
"verify_claim",
|
|
11812
|
+
"research",
|
|
11813
|
+
"review",
|
|
11814
|
+
"interview",
|
|
11815
|
+
"analysis",
|
|
11816
|
+
"track_metrics"
|
|
11817
|
+
]);
|
|
11818
|
+
var createTaskArgs = z.object({
|
|
11819
|
+
title: z.string().describe("Task title."),
|
|
11820
|
+
topicId: z.string().optional().describe("Topic scope."),
|
|
11821
|
+
description: z.string().optional().describe("Long-form task description."),
|
|
11822
|
+
taskType: taskTypeSchema.optional().describe("Task taxonomy."),
|
|
11823
|
+
priority: taskPrioritySchema.optional().describe("Priority. Defaults to medium when omitted by the server."),
|
|
11824
|
+
status: taskStatusSchema2.optional().describe("Initial status. Defaults to todo."),
|
|
11825
|
+
linkedWorktreeId: z.string().optional().describe("Worktree this task belongs to."),
|
|
11826
|
+
linkedBeliefId: z.string().optional().describe("Belief this task supports."),
|
|
11827
|
+
linkedQuestionId: z.string().optional().describe("Question this task addresses."),
|
|
11828
|
+
assigneeId: z.string().optional().describe("Principal assigned to the task."),
|
|
11829
|
+
dueDate: z.number().optional().describe("Due date as epoch milliseconds."),
|
|
11830
|
+
tags: z.array(z.string()).optional().describe("Free-form tags.")
|
|
11831
|
+
});
|
|
11832
|
+
var createTaskInput = (input) => compactRecord4({
|
|
11833
|
+
title: input.title,
|
|
11834
|
+
topicId: input.topicId,
|
|
11835
|
+
description: input.description,
|
|
11836
|
+
taskType: input.taskType,
|
|
11837
|
+
priority: input.priority ?? "medium",
|
|
11838
|
+
status: input.status ?? "todo",
|
|
11839
|
+
linkedWorktreeId: input.linkedWorktreeId,
|
|
11840
|
+
linkedBeliefId: input.linkedBeliefId,
|
|
11841
|
+
linkedQuestionId: input.linkedQuestionId,
|
|
11842
|
+
assigneeId: input.assigneeId,
|
|
11843
|
+
dueDate: input.dueDate,
|
|
11844
|
+
tags: input.tags
|
|
11845
|
+
});
|
|
11729
11846
|
var taskInput = (input) => compactRecord4({
|
|
11730
11847
|
...input,
|
|
11731
11848
|
taskId: input.taskId ?? input.id
|
|
@@ -11757,8 +11874,10 @@ var tasksContracts = [
|
|
|
11757
11874
|
convex: {
|
|
11758
11875
|
module: "tasks",
|
|
11759
11876
|
functionName: "create",
|
|
11760
|
-
kind: "mutation"
|
|
11761
|
-
|
|
11877
|
+
kind: "mutation",
|
|
11878
|
+
inputProjection: createTaskInput
|
|
11879
|
+
},
|
|
11880
|
+
args: createTaskArgs
|
|
11762
11881
|
}),
|
|
11763
11882
|
surfaceContract({
|
|
11764
11883
|
name: "list_tasks",
|
|
@@ -12876,9 +12995,12 @@ var ALL_FUNCTION_CONTRACTS = [
|
|
|
12876
12995
|
...legacyContracts
|
|
12877
12996
|
];
|
|
12878
12997
|
assertSurfaceCoverage(ALL_FUNCTION_CONTRACTS);
|
|
12879
|
-
new Map(
|
|
12998
|
+
var FUNCTION_CONTRACTS_BY_NAME = new Map(
|
|
12880
12999
|
ALL_FUNCTION_CONTRACTS.map((contract) => [contract.name, contract])
|
|
12881
13000
|
);
|
|
13001
|
+
FUNCTION_CONTRACTS_BY_NAME.get.bind(
|
|
13002
|
+
FUNCTION_CONTRACTS_BY_NAME
|
|
13003
|
+
);
|
|
12882
13004
|
|
|
12883
13005
|
// ../contracts/src/tenant-bootstrap-seed.contract.ts
|
|
12884
13006
|
function isCopyableSeedRequirement(entry) {
|