@lucern/events 0.3.0-alpha.15 → 0.3.0-alpha.17
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/README.md +14 -2
- package/dist/index.js +32 -42
- package/dist/index.js.map +1 -1
- package/dist/outbox.js +32 -42
- package/dist/outbox.js.map +1 -1
- package/dist/types.js +32 -42
- package/dist/types.js.map +1 -1
- package/dist/webhooks.js +32 -42
- package/dist/webhooks.js.map +1 -1
- package/package.json +2 -2
package/dist/outbox.js
CHANGED
|
@@ -829,6 +829,7 @@ defineTable({
|
|
|
829
829
|
shape: z.object({
|
|
830
830
|
"tenantId": idOf("tenants"),
|
|
831
831
|
"workspaceId": idOf("workspaces").optional(),
|
|
832
|
+
"environment": z.enum(["dev", "staging", "prod"]).optional(),
|
|
832
833
|
"keyPrefix": z.enum(["luc", "stk"]),
|
|
833
834
|
"keyHash": z.string(),
|
|
834
835
|
"keyHint": z.string(),
|
|
@@ -856,7 +857,7 @@ defineTable({
|
|
|
856
857
|
shape: z.object({
|
|
857
858
|
"tenantId": idOf("tenants").optional(),
|
|
858
859
|
"apiKeyId": idOf("apiKeys").optional(),
|
|
859
|
-
"action": z.enum(["key_created", "key_revoked", "key_expired", "key_used", "tenant_secret_created", "tenant_secret_rotated", "tenant_secret_revoked", "tenant_slot_binding_upserted", "tenant_slot_binding_revoked", "proxy_token_minted", "proxy_token_lease_issued", "proxy_token_lease_renewed", "proxy_token_lease_revoked", "proxy_request_recorded", "tenant_created", "tenant_updated", "tenant_suspended", "tenant_archived", "tenant_reactivated", "principal_created", "principal_updated", "principal_suspended", "principal_identity_alias_upserted", "principal_identity_alias_revoked", "membership_created", "membership_updated", "membership_revoked", "group_created", "group_updated", "group_deleted", "group_member_added", "group_member_removed", "workspace_created", "workspace_updated", "workspace_archived", "workspace_deployment_set", "workspace_deployment_removed", "deployment_host_registered", "deployment_host_revoked", "service_key_created", "service_key_rotated", "service_key_revoked", "service_key_used", "service_key_auth_failed", "session_created", "session_validated", "session_revoked", "session_cascade_revoked", "session_expired", "sandbox_created", "sandbox_secret_injected", "sandbox_execution_started", "sandbox_execution_completed", "sandbox_limit_violated", "policy_created", "policy_updated", "policy_enforced", "policy_archived", "permit_sync_enqueued", "permit_sync_succeeded", "permit_sync_failed", "permit_sync_skipped", "agent_registered", "agent_updated", "tool_registered", "tool_updated", "pack_entitled", "pack_installed", "pack_enabled", "pack_disabled", "pack_entitlement_revoked", "pack_upgraded", "pack_upgrade_committed", "pack_upgrade_rolled_back", "pack_group_assigned", "pack_group_unassigned", "methodology_pack_created", "methodology_pack_updated", "methodology_pack_assigned", "methodology_pack_removed", "pack_assigned_to_group", "pack_revoked_from_group", "pack_ontology_materialized", "pack_ontology_topic_bound", "cutover_flag_set", "cutover_flag_cleared"]),
|
|
860
|
+
"action": z.enum(["key_created", "key_revoked", "key_expired", "key_used", "tenant_secret_created", "tenant_secret_rotated", "tenant_secret_revoked", "tenant_slot_binding_upserted", "tenant_slot_binding_revoked", "proxy_token_minted", "proxy_token_lease_issued", "proxy_token_lease_renewed", "proxy_token_lease_revoked", "proxy_request_recorded", "tenant_created", "tenant_updated", "tenant_suspended", "tenant_archived", "tenant_reactivated", "tenant_clerk_organization_linked", "principal_created", "principal_updated", "principal_suspended", "principal_identity_alias_upserted", "principal_identity_alias_revoked", "membership_created", "membership_updated", "membership_revoked", "group_created", "group_updated", "group_deleted", "group_member_added", "group_member_removed", "workspace_created", "workspace_updated", "workspace_archived", "workspace_deployment_set", "workspace_deployment_removed", "deployment_host_registered", "deployment_host_revoked", "service_key_created", "service_key_rotated", "service_key_revoked", "service_key_used", "service_key_auth_failed", "session_created", "session_validated", "session_revoked", "session_cascade_revoked", "session_expired", "sandbox_created", "sandbox_secret_injected", "sandbox_execution_started", "sandbox_execution_completed", "sandbox_limit_violated", "policy_created", "policy_updated", "policy_enforced", "policy_archived", "permit_sync_enqueued", "permit_sync_succeeded", "permit_sync_failed", "permit_sync_skipped", "agent_registered", "agent_updated", "tool_registered", "tool_updated", "pack_entitled", "pack_installed", "pack_enabled", "pack_disabled", "pack_entitlement_revoked", "pack_upgraded", "pack_upgrade_committed", "pack_upgrade_rolled_back", "pack_group_assigned", "pack_group_unassigned", "methodology_pack_created", "methodology_pack_updated", "methodology_pack_assigned", "methodology_pack_removed", "pack_assigned_to_group", "pack_revoked_from_group", "pack_ontology_materialized", "pack_ontology_topic_bound", "cutover_flag_set", "cutover_flag_cleared"]),
|
|
860
861
|
"actorClerkId": z.string(),
|
|
861
862
|
"details": z.any().optional(),
|
|
862
863
|
"createdAt": z.number()
|
|
@@ -6985,7 +6986,7 @@ function compactRecord2(input) {
|
|
|
6985
6986
|
Object.entries(input).filter(([, value]) => value !== void 0)
|
|
6986
6987
|
);
|
|
6987
6988
|
}
|
|
6988
|
-
|
|
6989
|
+
defineProjection({
|
|
6989
6990
|
contractName: "list_beliefs",
|
|
6990
6991
|
inputSchema: listBeliefsInputSchema,
|
|
6991
6992
|
project: (input) => compactRecord2({
|
|
@@ -9494,7 +9495,7 @@ var IDENTITY_WHOAMI = {
|
|
|
9494
9495
|
response: {
|
|
9495
9496
|
description: "Canonical identity summary for the current session",
|
|
9496
9497
|
fields: {
|
|
9497
|
-
principalId: "string \u2014 canonical
|
|
9498
|
+
principalId: "string \u2014 canonical principal identifier; for humans this is the Clerk user_... ID",
|
|
9498
9499
|
principalType: "string \u2014 human, service, agent, group, or external_viewer",
|
|
9499
9500
|
tenantId: "string | undefined \u2014 resolved tenant scope",
|
|
9500
9501
|
workspaceId: "string | undefined \u2014 resolved workspace scope",
|
|
@@ -9508,7 +9509,7 @@ var IDENTITY_WHOAMI = {
|
|
|
9508
9509
|
};
|
|
9509
9510
|
var RESOLVE_INTERACTIVE_PRINCIPAL = {
|
|
9510
9511
|
name: "resolve_interactive_principal",
|
|
9511
|
-
description: "Read the Permit-backed Lucern principal context for an authenticated Clerk user. Like `git config --get user.email` plus the repository ACL \u2014 resolves the
|
|
9512
|
+
description: "Read the Permit-backed Lucern principal context for an authenticated Clerk user. Like `git config --get user.email` plus the repository ACL \u2014 resolves the Clerk subject into tenant/workspace authorization context.",
|
|
9512
9513
|
parameters: {
|
|
9513
9514
|
clerkId: {
|
|
9514
9515
|
type: "string",
|
|
@@ -9531,7 +9532,7 @@ var RESOLVE_INTERACTIVE_PRINCIPAL = {
|
|
|
9531
9532
|
response: {
|
|
9532
9533
|
description: "Permit-backed Lucern principal context for tenant SDK bootstrap",
|
|
9533
9534
|
fields: {
|
|
9534
|
-
principalId: "string \u2014 canonical
|
|
9535
|
+
principalId: "string \u2014 canonical Clerk user_... ID for human sessions",
|
|
9535
9536
|
principalType: "string \u2014 human, service, agent, group, or external_viewer",
|
|
9536
9537
|
clerkId: "string \u2014 authenticated Clerk subject alias",
|
|
9537
9538
|
tenantId: "string \u2014 resolved tenant scope",
|
|
@@ -10359,7 +10360,7 @@ var MANAGE_WRITE_POLICY = {
|
|
|
10359
10360
|
},
|
|
10360
10361
|
role: {
|
|
10361
10362
|
type: "string",
|
|
10362
|
-
description: "Role to set policy for (required for 'set'). E.g. 'agent:internal'
|
|
10363
|
+
description: "Role to set policy for (required for 'set'). E.g. 'agent:internal' or a Permit role key such as 'workspace_admin'."
|
|
10363
10364
|
},
|
|
10364
10365
|
permission: {
|
|
10365
10366
|
type: "string",
|
|
@@ -12289,11 +12290,8 @@ var identityContracts = [
|
|
|
12289
12290
|
sdkNamespace: "identity",
|
|
12290
12291
|
sdkMethod: "whoami",
|
|
12291
12292
|
summary: "Describe the current gateway principal.",
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
functionName: "whoami",
|
|
12295
|
-
kind: "query",
|
|
12296
|
-
inputProjection: withPrincipal
|
|
12293
|
+
gateway: {
|
|
12294
|
+
handler: "identity.whoami"
|
|
12297
12295
|
}
|
|
12298
12296
|
}),
|
|
12299
12297
|
surfaceContract({
|
|
@@ -12313,7 +12311,7 @@ var identityContracts = [
|
|
|
12313
12311
|
providerProjectId: z.string().min(1).optional()
|
|
12314
12312
|
}),
|
|
12315
12313
|
convex: {
|
|
12316
|
-
module: "
|
|
12314
|
+
module: "platform",
|
|
12317
12315
|
functionName: "resolveInteractivePrincipal",
|
|
12318
12316
|
kind: "query"
|
|
12319
12317
|
}
|
|
@@ -12397,15 +12395,6 @@ var beliefLookupInput = (input) => compactRecord4({
|
|
|
12397
12395
|
var beliefNodeInput = (input) => compactRecord4({
|
|
12398
12396
|
nodeId: input.nodeId ?? input.id ?? input.beliefId
|
|
12399
12397
|
});
|
|
12400
|
-
var beliefTopicInput = (input) => {
|
|
12401
|
-
const parsed = listBeliefsProjection.inputSchema.safeParse(input);
|
|
12402
|
-
if (!parsed.success) {
|
|
12403
|
-
throw new Error(
|
|
12404
|
-
`list_beliefs projection input rejected: ${parsed.error.message}`
|
|
12405
|
-
);
|
|
12406
|
-
}
|
|
12407
|
-
return compactRecord4(listBeliefsProjection.project(parsed.data));
|
|
12408
|
-
};
|
|
12409
12398
|
var createBeliefInput = (input, context) => {
|
|
12410
12399
|
return withUserId(
|
|
12411
12400
|
compactRecord4({
|
|
@@ -12494,11 +12483,8 @@ var beliefsContracts = [
|
|
|
12494
12483
|
sdkNamespace: "beliefs",
|
|
12495
12484
|
sdkMethod: "listBeliefs",
|
|
12496
12485
|
summary: "List beliefs for a topic.",
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
functionName: "getByTopic",
|
|
12500
|
-
kind: "query",
|
|
12501
|
-
inputProjection: beliefTopicInput
|
|
12486
|
+
gateway: {
|
|
12487
|
+
handler: "beliefs.list"
|
|
12502
12488
|
},
|
|
12503
12489
|
args: listBeliefsInputSchema
|
|
12504
12490
|
}),
|
|
@@ -12683,12 +12669,6 @@ var evidenceIdInput = (input) => compactRecord4({
|
|
|
12683
12669
|
insightId: input.insightId,
|
|
12684
12670
|
nodeId: input.nodeId ?? input.id ?? input.evidenceId
|
|
12685
12671
|
});
|
|
12686
|
-
var evidenceTopicInput = (input) => compactRecord4({
|
|
12687
|
-
topicId: input.topicId,
|
|
12688
|
-
status: input.status,
|
|
12689
|
-
userId: input.userId,
|
|
12690
|
-
limit: input.limit
|
|
12691
|
-
});
|
|
12692
12672
|
var createEvidenceInput = (input, context) => {
|
|
12693
12673
|
const parsed = createEvidenceProjection.inputSchema.safeParse(input);
|
|
12694
12674
|
if (!parsed.success) {
|
|
@@ -12819,11 +12799,8 @@ var evidenceContracts = [
|
|
|
12819
12799
|
sdkNamespace: "evidence",
|
|
12820
12800
|
sdkMethod: "listEvidence",
|
|
12821
12801
|
summary: "List evidence for a topic.",
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
functionName: "getByTopic",
|
|
12825
|
-
kind: "query",
|
|
12826
|
-
inputProjection: evidenceTopicInput
|
|
12802
|
+
gateway: {
|
|
12803
|
+
handler: "evidence.list"
|
|
12827
12804
|
}
|
|
12828
12805
|
}),
|
|
12829
12806
|
surfaceContract({
|
|
@@ -13058,11 +13035,8 @@ var questionsContracts = [
|
|
|
13058
13035
|
sdkNamespace: "questions",
|
|
13059
13036
|
sdkMethod: "listQuestions",
|
|
13060
13037
|
summary: "List questions for a topic.",
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
functionName: "getByTopic",
|
|
13064
|
-
kind: "query",
|
|
13065
|
-
inputProjection: questionTopicInput
|
|
13038
|
+
gateway: {
|
|
13039
|
+
handler: "questions.list"
|
|
13066
13040
|
}
|
|
13067
13041
|
}),
|
|
13068
13042
|
surfaceContract({
|
|
@@ -14167,6 +14141,19 @@ var worktreeEvidenceSignalInputSchema = z.object({
|
|
|
14167
14141
|
progress: z.string().optional().describe("Collection progress note for the signal."),
|
|
14168
14142
|
notes: z.string().optional().describe("Additional evidence collection notes.")
|
|
14169
14143
|
}).passthrough().describe("Evidence signal embedded in the worktree plan.");
|
|
14144
|
+
var worktreeDocCompanionTargetSchema = z.object({
|
|
14145
|
+
docPath: z.string().describe(
|
|
14146
|
+
"Repo-relative path to a documentation file the worktree promises to update."
|
|
14147
|
+
),
|
|
14148
|
+
sectionAnchor: z.string().optional().describe(
|
|
14149
|
+
"Markdown heading anchor (e.g. '## Function-surface manifest') that scopes the promised update."
|
|
14150
|
+
),
|
|
14151
|
+
reason: z.string().describe(
|
|
14152
|
+
"Why this doc section must be updated for the worktree to be complete."
|
|
14153
|
+
)
|
|
14154
|
+
}).passthrough().describe(
|
|
14155
|
+
"Intent-driven docs companion target. pr-gate-reviewer verifies that the PR actually touches each declared (docPath, sectionAnchor). Distinct from the touch-driven docs-loop. See docs/development/docs-sync-discipline.md Lock 3."
|
|
14156
|
+
);
|
|
14170
14157
|
var worktreeDecisionGateInputSchema = z.object({
|
|
14171
14158
|
goCriteria: z.array(z.string()).describe("Criteria that must hold for the worktree to proceed."),
|
|
14172
14159
|
noGoSignals: z.array(z.string()).describe("Signals that stop or redirect the worktree."),
|
|
@@ -14199,6 +14186,9 @@ var addWorktreeArgs = z.object({
|
|
|
14199
14186
|
keyQuestions: z.array(worktreeKeyQuestionInputSchema).optional().describe("Inline key questions captured as part of the worktree plan."),
|
|
14200
14187
|
evidenceSignals: z.array(worktreeEvidenceSignalInputSchema).optional().describe("Evidence signals the worktree needs to collect or validate."),
|
|
14201
14188
|
decisionGate: worktreeDecisionGateInputSchema.optional(),
|
|
14189
|
+
docCompanionTargets: z.array(worktreeDocCompanionTargetSchema).optional().describe(
|
|
14190
|
+
"Doc sections the worktree promises to update at PR time. Enforced by pr-gate-reviewer (Lock 3)."
|
|
14191
|
+
),
|
|
14202
14192
|
goCriteria: z.array(z.string()).optional().describe("Shorthand go criteria used to build decisionGate."),
|
|
14203
14193
|
noGoSignals: z.array(z.string()).optional().describe("Shorthand no-go signals used to build decisionGate."),
|
|
14204
14194
|
proofArtifacts: z.array(z.unknown()).optional().describe("Expected proof artifacts required to close the worktree."),
|