@lucern/contracts 0.3.0-alpha.12 → 0.3.0-alpha.14

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.
Files changed (128) hide show
  1. package/dist/auth-context.contract.js +13 -1
  2. package/dist/auth-context.contract.js.map +1 -1
  3. package/dist/auth-session.contract.js +13 -1
  4. package/dist/auth-session.contract.js.map +1 -1
  5. package/dist/auth.contract.d.ts +1 -1
  6. package/dist/auth.contract.js +13 -1
  7. package/dist/auth.contract.js.map +1 -1
  8. package/dist/component-boundary.contract.js +1 -0
  9. package/dist/component-boundary.contract.js.map +1 -1
  10. package/dist/function-registry/beliefs.d.ts +10 -10
  11. package/dist/function-registry/beliefs.js +53 -2
  12. package/dist/function-registry/beliefs.js.map +1 -1
  13. package/dist/function-registry/coding.d.ts +6 -6
  14. package/dist/function-registry/coding.js +53 -2
  15. package/dist/function-registry/coding.js.map +1 -1
  16. package/dist/function-registry/context.d.ts +3 -3
  17. package/dist/function-registry/context.js +53 -2
  18. package/dist/function-registry/context.js.map +1 -1
  19. package/dist/function-registry/contracts.d.ts +3 -3
  20. package/dist/function-registry/contracts.js +53 -2
  21. package/dist/function-registry/contracts.js.map +1 -1
  22. package/dist/function-registry/coordination.d.ts +9 -9
  23. package/dist/function-registry/coordination.js +53 -2
  24. package/dist/function-registry/coordination.js.map +1 -1
  25. package/dist/function-registry/edges.d.ts +6 -6
  26. package/dist/function-registry/edges.js +53 -2
  27. package/dist/function-registry/edges.js.map +1 -1
  28. package/dist/function-registry/evidence.d.ts +8 -8
  29. package/dist/function-registry/evidence.js +53 -2
  30. package/dist/function-registry/evidence.js.map +1 -1
  31. package/dist/function-registry/graph.d.ts +15 -15
  32. package/dist/function-registry/graph.js +53 -2
  33. package/dist/function-registry/graph.js.map +1 -1
  34. package/dist/function-registry/helpers.d.ts +2 -2
  35. package/dist/function-registry/helpers.js +53 -2
  36. package/dist/function-registry/helpers.js.map +1 -1
  37. package/dist/function-registry/identity.d.ts +56 -16
  38. package/dist/function-registry/identity.js +75 -4
  39. package/dist/function-registry/identity.js.map +1 -1
  40. package/dist/function-registry/index.d.ts +1 -1
  41. package/dist/function-registry/index.js +53 -2
  42. package/dist/function-registry/index.js.map +1 -1
  43. package/dist/function-registry/judgments.d.ts +2 -2
  44. package/dist/function-registry/judgments.js +53 -2
  45. package/dist/function-registry/judgments.js.map +1 -1
  46. package/dist/function-registry/legacy.d.ts +1 -1
  47. package/dist/function-registry/legacy.js +53 -2
  48. package/dist/function-registry/legacy.js.map +1 -1
  49. package/dist/function-registry/lenses.d.ts +4 -4
  50. package/dist/function-registry/lenses.js +53 -2
  51. package/dist/function-registry/lenses.js.map +1 -1
  52. package/dist/function-registry/manifest.d.ts +3 -3
  53. package/dist/function-registry/manifest.js +1 -0
  54. package/dist/function-registry/manifest.js.map +1 -1
  55. package/dist/function-registry/nodes.d.ts +8 -8
  56. package/dist/function-registry/nodes.js +53 -2
  57. package/dist/function-registry/nodes.js.map +1 -1
  58. package/dist/function-registry/ontologies.d.ts +11 -11
  59. package/dist/function-registry/ontologies.js +53 -2
  60. package/dist/function-registry/ontologies.js.map +1 -1
  61. package/dist/function-registry/pipeline.d.ts +3 -3
  62. package/dist/function-registry/pipeline.js +53 -2
  63. package/dist/function-registry/pipeline.js.map +1 -1
  64. package/dist/function-registry/questions.d.ts +12 -12
  65. package/dist/function-registry/questions.js +53 -2
  66. package/dist/function-registry/questions.js.map +1 -1
  67. package/dist/function-registry/tasks.d.ts +4 -4
  68. package/dist/function-registry/tasks.js +53 -2
  69. package/dist/function-registry/tasks.js.map +1 -1
  70. package/dist/function-registry/topics.d.ts +7 -7
  71. package/dist/function-registry/topics.js +53 -2
  72. package/dist/function-registry/topics.js.map +1 -1
  73. package/dist/function-registry/types.d.ts +2 -2
  74. package/dist/function-registry/worktrees.d.ts +11 -11
  75. package/dist/function-registry/worktrees.js +53 -2
  76. package/dist/function-registry/worktrees.js.map +1 -1
  77. package/dist/generated/convexSchemas.js +2 -1
  78. package/dist/generated/convexSchemas.js.map +1 -1
  79. package/dist/generated/infisicalRuntimeEnv.js +111 -0
  80. package/dist/generated/infisicalRuntimeEnv.js.map +1 -1
  81. package/dist/generated/schema-manifest.json +88 -3
  82. package/dist/generated/tableOwnership.d.ts +2 -1
  83. package/dist/generated/tableOwnership.js +2 -0
  84. package/dist/generated/tableOwnership.js.map +1 -1
  85. package/dist/generated/tier-expectations.json +6 -3
  86. package/dist/index.d.ts +2 -2
  87. package/dist/index.js +290 -20
  88. package/dist/index.js.map +1 -1
  89. package/dist/infisical-runtime.contract.d.ts +18 -0
  90. package/dist/infisical-runtime.contract.js +21 -0
  91. package/dist/infisical-runtime.contract.js.map +1 -1
  92. package/dist/manifests/infisical-runtime-manifest.d.ts +18 -0
  93. package/dist/manifests/infisical-runtime-manifest.js +21 -0
  94. package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
  95. package/dist/manifests/tenant-client-manifest.d.ts +8 -3
  96. package/dist/manifests/tenant-client-manifest.js +18 -1
  97. package/dist/manifests/tenant-client-manifest.js.map +1 -1
  98. package/dist/permit-principal-projection.contract.js +2 -3
  99. package/dist/permit-principal-projection.contract.js.map +1 -1
  100. package/dist/proof-attestation.json +1 -1
  101. package/dist/schemas/index.js +33 -0
  102. package/dist/schemas/index.js.map +1 -1
  103. package/dist/schemas/manifest.d.ts +75 -0
  104. package/dist/schemas/manifest.js +33 -0
  105. package/dist/schemas/manifest.js.map +1 -1
  106. package/dist/schemas/tables/controlPlane/accessControl.js +3 -0
  107. package/dist/schemas/tables/controlPlane/accessControl.js.map +1 -1
  108. package/dist/schemas/tables/kernel/events.d.ts +21 -0
  109. package/dist/schemas/tables/kernel/events.js +43 -0
  110. package/dist/schemas/tables/kernel/events.js.map +1 -0
  111. package/dist/{sdk-tools.contract-BNklQDfB.d.ts → sdk-tools.contract-CKmSsrZ2.d.ts} +1 -1
  112. package/dist/sdk-tools.contract.d.ts +2 -2
  113. package/dist/sdk-tools.contract.js +45 -1
  114. package/dist/sdk-tools.contract.js.map +1 -1
  115. package/dist/tenant-bootstrap-seed.contract.d.ts +22 -2
  116. package/dist/tenant-bootstrap-seed.contract.js +15 -2
  117. package/dist/tenant-bootstrap-seed.contract.js.map +1 -1
  118. package/dist/tenant-bootstrap-seed.defaults.d.ts +1 -1
  119. package/dist/tenant-bootstrap-seed.defaults.js +30 -12
  120. package/dist/tenant-bootstrap-seed.defaults.js.map +1 -1
  121. package/dist/tenant-client.contract.d.ts +8 -3
  122. package/dist/tenant-client.contract.js +18 -1
  123. package/dist/tenant-client.contract.js.map +1 -1
  124. package/dist/{tool-contracts-BevD9Ho2.d.ts → tool-contracts-C_xvM9q2.d.ts} +4 -2
  125. package/dist/tool-contracts.d.ts +1 -1
  126. package/dist/tool-contracts.js +46 -2
  127. package/dist/tool-contracts.js.map +1 -1
  128. package/package.json +1 -1
@@ -115,7 +115,7 @@ declare const tasksContracts: readonly [{
115
115
  };
116
116
  auth: {
117
117
  scopes: string[];
118
- allowedPrincipalTypes: ("user" | "service" | "agent")[];
118
+ allowedPrincipalTypes: ("user" | "service" | "agent" | "group" | "external_viewer")[];
119
119
  };
120
120
  convex: FunctionConvexTarget | undefined;
121
121
  gateway: FunctionGatewayTarget | undefined;
@@ -155,7 +155,7 @@ declare const tasksContracts: readonly [{
155
155
  };
156
156
  auth: {
157
157
  scopes: string[];
158
- allowedPrincipalTypes: ("user" | "service" | "agent")[];
158
+ allowedPrincipalTypes: ("user" | "service" | "agent" | "group" | "external_viewer")[];
159
159
  };
160
160
  convex: FunctionConvexTarget | undefined;
161
161
  gateway: FunctionGatewayTarget | undefined;
@@ -195,7 +195,7 @@ declare const tasksContracts: readonly [{
195
195
  };
196
196
  auth: {
197
197
  scopes: string[];
198
- allowedPrincipalTypes: ("user" | "service" | "agent")[];
198
+ allowedPrincipalTypes: ("user" | "service" | "agent" | "group" | "external_viewer")[];
199
199
  };
200
200
  convex: FunctionConvexTarget | undefined;
201
201
  gateway: FunctionGatewayTarget | undefined;
@@ -235,7 +235,7 @@ declare const tasksContracts: readonly [{
235
235
  };
236
236
  auth: {
237
237
  scopes: string[];
238
- allowedPrincipalTypes: ("user" | "service" | "agent")[];
238
+ allowedPrincipalTypes: ("user" | "service" | "agent" | "group" | "external_viewer")[];
239
239
  };
240
240
  convex: FunctionConvexTarget | undefined;
241
241
  gateway: FunctionGatewayTarget | undefined;
@@ -2329,7 +2329,7 @@ var IDENTITY_WHOAMI = {
2329
2329
  description: "Canonical identity summary for the current session",
2330
2330
  fields: {
2331
2331
  principalId: "string \u2014 canonical federated principal identifier",
2332
- principalType: "string \u2014 human, service, or agent",
2332
+ principalType: "string \u2014 human, service, agent, group, or external_viewer",
2333
2333
  tenantId: "string | undefined \u2014 resolved tenant scope",
2334
2334
  workspaceId: "string | undefined \u2014 resolved workspace scope",
2335
2335
  scopes: "string[] | undefined \u2014 granted scopes for this session",
@@ -2340,6 +2340,49 @@ var IDENTITY_WHOAMI = {
2340
2340
  ontologyPrimitive: "identity",
2341
2341
  tier: "workhorse"
2342
2342
  };
2343
+ var RESOLVE_INTERACTIVE_PRINCIPAL = {
2344
+ name: "resolve_interactive_principal",
2345
+ 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 identity alias into the canonical authorization subject.",
2346
+ parameters: {
2347
+ clerkId: {
2348
+ type: "string",
2349
+ description: "Authenticated Clerk subject (`sub`). Clerk proves identity only; it is not the authorization record."
2350
+ },
2351
+ tenantId: {
2352
+ type: "string",
2353
+ description: "Optional tenant scope. Omit only when the Clerk alias is globally unambiguous."
2354
+ },
2355
+ workspaceId: {
2356
+ type: "string",
2357
+ description: "Optional workspace scope. Required when the principal has access to multiple workspaces and no default can be inferred."
2358
+ },
2359
+ providerProjectId: {
2360
+ type: "string",
2361
+ description: "Optional Clerk project or provider instance id for tenants with multiple identity providers."
2362
+ }
2363
+ },
2364
+ required: ["clerkId"],
2365
+ response: {
2366
+ description: "Permit-backed Lucern principal context for tenant SDK bootstrap",
2367
+ fields: {
2368
+ principalId: "string \u2014 canonical Lucern principal identifier",
2369
+ principalType: "string \u2014 human, service, agent, group, or external_viewer",
2370
+ clerkId: "string \u2014 authenticated Clerk subject alias",
2371
+ tenantId: "string \u2014 resolved tenant scope",
2372
+ workspaceId: "string | null \u2014 resolved workspace scope",
2373
+ roles: "string[] \u2014 effective Permit roles",
2374
+ scopes: "string[] \u2014 effective scopes derived from Permit/control-plane projection",
2375
+ groupIds: "string[] \u2014 active Permit group memberships",
2376
+ principalStatus: "string \u2014 active, invited, suspended, disabled, revoked, or missing",
2377
+ tenantStatus: "string \u2014 projected tenant resource status",
2378
+ workspaceStatus: "string \u2014 projected workspace resource status",
2379
+ permit: "object \u2014 Permit subject, tenant, and optional workspace tuple"
2380
+ }
2381
+ },
2382
+ ownerModule: "control-plane",
2383
+ ontologyPrimitive: "identity",
2384
+ tier: "workhorse"
2385
+ };
2343
2386
  var COMPILE_CONTEXT = {
2344
2387
  name: "compile_context",
2345
2388
  description: "Compile a focused reasoning context. If topicId is omitted, Lucern resolves the best topic from the query. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
@@ -4242,6 +4285,7 @@ var MCP_TOOL_CONTRACTS = {
4242
4285
  update_worktree_targets: UPDATE_WORKTREE_TARGETS,
4243
4286
  update_worktree_metadata: UPDATE_WORKTREE_METADATA,
4244
4287
  identity_whoami: IDENTITY_WHOAMI,
4288
+ resolve_interactive_principal: RESOLVE_INTERACTIVE_PRINCIPAL,
4245
4289
  compile_context: COMPILE_CONTEXT,
4246
4290
  record_scope_learning: RECORD_SCOPE_LEARNING,
4247
4291
  pipeline_snapshot: PIPELINE_SNAPSHOT,
@@ -4359,6 +4403,7 @@ function entries(names, surfaceClass, surfaceIntent, surfaces, rationale) {
4359
4403
  var MCP_CORE_OPERATION_NAMES = [
4360
4404
  "compile_context",
4361
4405
  "identity_whoami",
4406
+ "resolve_interactive_principal",
4362
4407
  "check_permission",
4363
4408
  "filter_by_permission",
4364
4409
  "create_belief",
@@ -4901,7 +4946,13 @@ function surfaceContract(args) {
4901
4946
  scopes: args.scopes ?? [
4902
4947
  args.kind === "query" ? `${args.domain}.read` : `${args.domain}.write`
4903
4948
  ],
4904
- allowedPrincipalTypes: ["user", "service", "agent"]
4949
+ allowedPrincipalTypes: [
4950
+ "user",
4951
+ "service",
4952
+ "agent",
4953
+ "group",
4954
+ "external_viewer"
4955
+ ]
4905
4956
  },
4906
4957
  convex: args.convex,
4907
4958
  gateway: args.gateway,