@memberjunction/core-entities 6.2.0-edge.3 → 6.2.0-edge.5

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 (66) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/custom/ConversationForkAccess.d.ts +15 -0
  3. package/dist/custom/ConversationForkAccess.d.ts.map +1 -0
  4. package/dist/custom/ConversationForkAccess.js +28 -0
  5. package/dist/custom/ConversationForkAccess.js.map +1 -0
  6. package/dist/custom/ConversationWriteAccess.d.ts +21 -0
  7. package/dist/custom/ConversationWriteAccess.d.ts.map +1 -0
  8. package/dist/custom/ConversationWriteAccess.js +34 -0
  9. package/dist/custom/ConversationWriteAccess.js.map +1 -0
  10. package/dist/custom/MJConversationBranchEntityExtended.d.ts +30 -0
  11. package/dist/custom/MJConversationBranchEntityExtended.d.ts.map +1 -0
  12. package/dist/custom/MJConversationBranchEntityExtended.js +120 -0
  13. package/dist/custom/MJConversationBranchEntityExtended.js.map +1 -0
  14. package/dist/custom/MJConversationDetailEntityExtended.d.ts +46 -4
  15. package/dist/custom/MJConversationDetailEntityExtended.d.ts.map +1 -1
  16. package/dist/custom/MJConversationDetailEntityExtended.js +194 -47
  17. package/dist/custom/MJConversationDetailEntityExtended.js.map +1 -1
  18. package/dist/custom/MJDashboardEntityExtended.d.ts.map +1 -1
  19. package/dist/custom/MJDashboardEntityExtended.js +3 -0
  20. package/dist/custom/MJDashboardEntityExtended.js.map +1 -1
  21. package/dist/custom/MJThemeEntityExtended.d.ts +13 -0
  22. package/dist/custom/MJThemeEntityExtended.d.ts.map +1 -0
  23. package/dist/custom/MJThemeEntityExtended.js +37 -0
  24. package/dist/custom/MJThemeEntityExtended.js.map +1 -0
  25. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.d.ts.map +1 -1
  26. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.js +14 -13
  27. package/dist/custom/ResourcePermissions/ResourcePermissionEngine.js.map +1 -1
  28. package/dist/engines/FileStorageEngine.d.ts +40 -0
  29. package/dist/engines/FileStorageEngine.d.ts.map +1 -1
  30. package/dist/engines/FileStorageEngine.js +49 -0
  31. package/dist/engines/FileStorageEngine.js.map +1 -1
  32. package/dist/engines/InstanceConfigEngine.d.ts.map +1 -1
  33. package/dist/engines/InstanceConfigEngine.js +13 -3
  34. package/dist/engines/InstanceConfigEngine.js.map +1 -1
  35. package/dist/engines/PermissionEngine.d.ts +5 -4
  36. package/dist/engines/PermissionEngine.d.ts.map +1 -1
  37. package/dist/engines/PermissionEngine.js +7 -5
  38. package/dist/engines/PermissionEngine.js.map +1 -1
  39. package/dist/engines/QueryEngine.d.ts +81 -6
  40. package/dist/engines/QueryEngine.d.ts.map +1 -1
  41. package/dist/engines/QueryEngine.js +283 -4
  42. package/dist/engines/QueryEngine.js.map +1 -1
  43. package/dist/engines/UserInfoEngine.d.ts +64 -12
  44. package/dist/engines/UserInfoEngine.d.ts.map +1 -1
  45. package/dist/engines/UserInfoEngine.js +100 -33
  46. package/dist/engines/UserInfoEngine.js.map +1 -1
  47. package/dist/engines/artifacts.d.ts.map +1 -1
  48. package/dist/engines/artifacts.js +1 -0
  49. package/dist/engines/artifacts.js.map +1 -1
  50. package/dist/engines/conversations.d.ts +378 -35
  51. package/dist/engines/conversations.d.ts.map +1 -1
  52. package/dist/engines/conversations.js +736 -79
  53. package/dist/engines/conversations.js.map +1 -1
  54. package/dist/generated/entities/__mj.d.ts +3488 -230
  55. package/dist/generated/entities/__mj.d.ts.map +1 -1
  56. package/dist/generated/entities/__mj.js +2927 -18
  57. package/dist/generated/entities/__mj.js.map +1 -1
  58. package/dist/generated/remote_operations.d.ts +17 -5
  59. package/dist/generated/remote_operations.d.ts.map +1 -1
  60. package/dist/generated/remote_operations.js.map +1 -1
  61. package/dist/index.d.ts +4 -0
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +4 -0
  64. package/dist/index.js.map +1 -1
  65. package/package.json +6 -5
  66. package/readme.md +1 -1
@@ -2375,12 +2375,12 @@ export const MJAIAgentRunStepSchema = z.object({
2375
2375
  * * Field Name: PayloadAtStart
2376
2376
  * * Display Name: Payload At Start
2377
2377
  * * SQL Data Type: nvarchar(MAX)
2378
- * * Description: JSON serialization of the Payload state at the start of this step`),
2378
+ * * Description: JSON serialization of the Payload state at the start of this step. NULL when PayloadAtStartSourceStepID is set; the starting payload is then the PayloadAtEnd of that step.`),
2379
2379
  PayloadAtEnd: z.string().nullable().describe(`
2380
2380
  * * Field Name: PayloadAtEnd
2381
2381
  * * Display Name: Payload At End
2382
2382
  * * SQL Data Type: nvarchar(MAX)
2383
- * * Description: JSON serialization of the Payload state at the end of this step`),
2383
+ * * Description: JSON serialization of the Payload state at the end of this step. NULL when PayloadAtEndSourceStepID is set; the ending payload is then the PayloadAtEnd of that step.`),
2384
2384
  FinalPayloadValidationResult: z.union([z.literal('Fail'), z.literal('Fail'), z.literal('Pass'), z.literal('Pass'), z.literal('Retry'), z.literal('Retry'), z.literal('Warn'), z.literal('Warn')]).nullable().describe(`
2385
2385
  * * Field Name: FinalPayloadValidationResult
2386
2386
  * * Display Name: Validation Result
@@ -2447,6 +2447,18 @@ detailed information about what validation rules failed.`),
2447
2447
  * * Display Name: Native Tool Results Sent
2448
2448
  * * SQL Data Type: bit
2449
2449
  * * Description: For native tool-calling steps: 1 = the results of this step's tool calls were returned to the model as native tool-result turns, 0 = as the markdown action-results user message. NULL for envelope steps and for rows predating the feature.`),
2450
+ PayloadAtStartSourceStepID: z.string().nullable().describe(`
2451
+ * * Field Name: PayloadAtStartSourceStepID
2452
+ * * Display Name: Payload At Start Source Step ID
2453
+ * * SQL Data Type: uniqueidentifier
2454
+ * * Related Entity/Foreign Key: MJ: AI Agent Run Steps (vwAIAgentRunSteps.ID)
2455
+ * * Description: When set, PayloadAtStart is not stored on this row because it equals the PayloadAtEnd of the referenced step in the same run. Read that step's PayloadAtEnd to get this step's starting payload.`),
2456
+ PayloadAtEndSourceStepID: z.string().nullable().describe(`
2457
+ * * Field Name: PayloadAtEndSourceStepID
2458
+ * * Display Name: Payload At End Source Step ID
2459
+ * * SQL Data Type: uniqueidentifier
2460
+ * * Related Entity/Foreign Key: MJ: AI Agent Run Steps (vwAIAgentRunSteps.ID)
2461
+ * * Description: When set, PayloadAtEnd is not stored on this row because it equals the PayloadAtEnd of the referenced step in the same run. Read that step's PayloadAtEnd to get this step's ending payload.`),
2450
2462
  AgentRun: z.string().nullable().describe(`
2451
2463
  * * Field Name: AgentRun
2452
2464
  * * Display Name: Agent Run Context
@@ -2455,6 +2467,14 @@ detailed information about what validation rules failed.`),
2455
2467
  * * Field Name: Parent
2456
2468
  * * Display Name: Parent Step Context
2457
2469
  * * SQL Data Type: nvarchar(255)`),
2470
+ PayloadAtStartSourceStep: z.string().nullable().describe(`
2471
+ * * Field Name: PayloadAtStartSourceStep
2472
+ * * Display Name: Payload At Start Source Step
2473
+ * * SQL Data Type: nvarchar(255)`),
2474
+ PayloadAtEndSourceStep: z.string().nullable().describe(`
2475
+ * * Field Name: PayloadAtEndSourceStep
2476
+ * * Display Name: Payload At End Source Step
2477
+ * * SQL Data Type: nvarchar(255)`),
2458
2478
  RootParentID: z.string().nullable().describe(`
2459
2479
  * * Field Name: RootParentID
2460
2480
  * * Display Name: Root Parent
@@ -2549,7 +2569,7 @@ export const MJAIAgentRunSchema = z.object({
2549
2569
  * * Field Name: Result
2550
2570
  * * Display Name: Result
2551
2571
  * * SQL Data Type: nvarchar(MAX)
2552
- * * Description: Final result or output from the agent execution, stored as JSON or text`),
2572
+ * * Description: Deprecated. No longer written by agent runs; use FinalPayload, which holds the same value. Kept for existing rows and external readers.`),
2553
2573
  AgentState: z.string().nullable().describe(`
2554
2574
  * * Field Name: AgentState
2555
2575
  * * Display Name: Agent State
@@ -3257,6 +3277,67 @@ export const MJAIAgentSessionChannelSchema = z.object({
3257
3277
  * * Display Name: Channel
3258
3278
  * * SQL Data Type: nvarchar(100)`),
3259
3279
  });
3280
+ /**
3281
+ * zod schema definition for the entity MJ: AI Agent Session Recording Shards
3282
+ */
3283
+ export const MJAIAgentSessionRecordingShardSchema = z.object({
3284
+ ID: z.string().describe(`
3285
+ * * Field Name: ID
3286
+ * * Display Name: ID
3287
+ * * SQL Data Type: uniqueidentifier
3288
+ * * Default Value: newsequentialid()`),
3289
+ AgentSessionID: z.string().describe(`
3290
+ * * Field Name: AgentSessionID
3291
+ * * Display Name: Agent Session
3292
+ * * SQL Data Type: uniqueidentifier
3293
+ * * Related Entity/Foreign Key: MJ: AI Agent Sessions (vwAIAgentSessions.ID)`),
3294
+ Index: z.number().describe(`
3295
+ * * Field Name: Index
3296
+ * * Display Name: Index
3297
+ * * SQL Data Type: int
3298
+ * * Description: Zero-based position of the shard in the recording. Unique per session; a retry of the same index with the same bytes is acknowledged, with different bytes it is refused.`),
3299
+ StartSample: z.number().describe(`
3300
+ * * Field Name: StartSample
3301
+ * * Display Name: Start Sample
3302
+ * * SQL Data Type: bigint
3303
+ * * Description: Sample position (48 kHz) where this shard's audio starts in the recording.`),
3304
+ SampleCount: z.number().describe(`
3305
+ * * Field Name: SampleCount
3306
+ * * Display Name: Sample Count
3307
+ * * SQL Data Type: int
3308
+ * * Description: Number of audio samples (48 kHz) the shard covers.`),
3309
+ Bytes: z.number().describe(`
3310
+ * * Field Name: Bytes
3311
+ * * Display Name: Bytes
3312
+ * * SQL Data Type: int
3313
+ * * Description: Size of Data in bytes.`),
3314
+ Sha256: z.string().describe(`
3315
+ * * Field Name: Sha256
3316
+ * * Display Name: SHA-256
3317
+ * * SQL Data Type: nvarchar(64)
3318
+ * * Description: Lowercase hex SHA-256 of Data; decides whether a repeated upload of the same index is a retry or a conflict.`),
3319
+ Data: z.string().describe(`
3320
+ * * Field Name: Data
3321
+ * * Display Name: Data
3322
+ * * SQL Data Type: varbinary(MAX)
3323
+ * * Description: The shard bytes as uploaded (MJOPUS1 header followed by length-prefixed Opus packets).`),
3324
+ ReceivedAt: z.date().describe(`
3325
+ * * Field Name: ReceivedAt
3326
+ * * Display Name: Received At
3327
+ * * SQL Data Type: datetimeoffset
3328
+ * * Default Value: sysdatetimeoffset()
3329
+ * * Description: When the server first stored this shard.`),
3330
+ __mj_CreatedAt: z.date().describe(`
3331
+ * * Field Name: __mj_CreatedAt
3332
+ * * Display Name: Created At
3333
+ * * SQL Data Type: datetimeoffset
3334
+ * * Default Value: getutcdate()`),
3335
+ __mj_UpdatedAt: z.date().describe(`
3336
+ * * Field Name: __mj_UpdatedAt
3337
+ * * Display Name: Updated At
3338
+ * * SQL Data Type: datetimeoffset
3339
+ * * Default Value: getutcdate()`),
3340
+ });
3260
3341
  /**
3261
3342
  * zod schema definition for the entity MJ: AI Agent Sessions
3262
3343
  */
@@ -3370,6 +3451,39 @@ export const MJAIAgentSessionSchema = z.object({
3370
3451
  * * Display Name: Linked Record ID
3371
3452
  * * SQL Data Type: nvarchar(500)
3372
3453
  * * Description: Polymorphic counterparty-identity record key. The primary-key value of the record (within LinkedEntityID's entity) this session resolved to, serialized as a string so any entity type can be referenced regardless of PK shape (UUID, int, composite). NVARCHAR(500), intentionally NOT FK-constrained. Used together with LinkedEntityID — see CK_AIAgentSession_LinkBinding. NULL while the session's counterparty is anonymous/unresolved.`),
3454
+ RecordingStatus: z.union([z.literal('Assembling'), z.literal('Complete'), z.literal('Failed'), z.literal('Partial'), z.literal('Pending')]).nullable().describe(`
3455
+ * * Field Name: RecordingStatus
3456
+ * * Display Name: Recording Status
3457
+ * * SQL Data Type: nvarchar(20)
3458
+ * * Value List Type: List
3459
+ * * Possible Values
3460
+ * * Assembling
3461
+ * * Complete
3462
+ * * Failed
3463
+ * * Partial
3464
+ * * Pending
3465
+ * * Description: State of the server-side recording assembly for a client-direct session recorded as Opus shards: Pending (shards or a terminal signal are waiting to be assembled), Assembling (claimed by one server instance), Complete (recording.wav holds every captured sample), Partial (assembled with silent gaps, listed in RecordingGaps), Failed (a shard conflict or an assembly error needs a human). NULL when the session was not recorded this way.`),
3466
+ RecordingExpectedShards: z.number().nullable().describe(`
3467
+ * * Field Name: RecordingExpectedShards
3468
+ * * Display Name: Expected Shards
3469
+ * * SQL Data Type: int
3470
+ * * Description: Number of recording shards the browser reported in its terminal signal (last shard index + 1). NULL until a terminal signal arrives.`),
3471
+ RecordingCapturedSamples: z.number().nullable().describe(`
3472
+ * * Field Name: RecordingCapturedSamples
3473
+ * * Display Name: Captured Samples
3474
+ * * SQL Data Type: bigint
3475
+ * * Description: Total audio samples (48 kHz mono) the browser captured, from its terminal signal. The assembled recording.wav is exactly this long. NULL until a terminal signal arrives.`),
3476
+ RecordingGaps: z.string().nullable().describe(`
3477
+ * * Field Name: RecordingGaps
3478
+ * * Display Name: Recording Gaps
3479
+ * * SQL Data Type: nvarchar(MAX)
3480
+ * * Description: JSON array of the silent gaps in a Partial recording: [{startSample, sampleCount, indexes}], sample positions at 48 kHz and the shard indexes that were missing. Empty or NULL when nothing is missing.`),
3481
+ RecordingAssemblyVersion: z.number().describe(`
3482
+ * * Field Name: RecordingAssemblyVersion
3483
+ * * Display Name: Assembly Version
3484
+ * * SQL Data Type: int
3485
+ * * Default Value: 0
3486
+ * * Description: Incremented by every assembly claim. The assembler finishes only if the version is still the one it claimed, so a newer assembly always wins over a slower older one.`),
3373
3487
  Agent: z.string().nullable().describe(`
3374
3488
  * * Field Name: Agent
3375
3489
  * * Display Name: Agent
@@ -3809,6 +3923,203 @@ export const MJAIAgentTypeSchema = z.object({
3809
3923
  * * Display Name: Conversation Summary Prompt
3810
3924
  * * SQL Data Type: nvarchar(255)`),
3811
3925
  });
3926
+ /**
3927
+ * zod schema definition for the entity MJ: AI Agent User Policies
3928
+ */
3929
+ export const MJAIAgentUserPolicySchema = z.object({
3930
+ ID: z.string().describe(`
3931
+ * * Field Name: ID
3932
+ * * Display Name: ID
3933
+ * * SQL Data Type: uniqueidentifier
3934
+ * * Default Value: newsequentialid()`),
3935
+ AgentID: z.string().describe(`
3936
+ * * Field Name: AgentID
3937
+ * * Display Name: Agent
3938
+ * * SQL Data Type: uniqueidentifier
3939
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
3940
+ * * Description: The AI Agent governed by this user policy.`),
3941
+ UserID: z.string().describe(`
3942
+ * * Field Name: UserID
3943
+ * * Display Name: User
3944
+ * * SQL Data Type: uniqueidentifier
3945
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
3946
+ * * Description: The MJ User who owns this policy and under whose security principal the agent executes.`),
3947
+ DisplayNameOverride: z.string().nullable().describe(`
3948
+ * * Field Name: DisplayNameOverride
3949
+ * * Display Name: Display Name Override
3950
+ * * SQL Data Type: nvarchar(100)
3951
+ * * Description: Optional user-personalized display name for this agent (e.g., "Maya" for a user's Chief of Staff).`),
3952
+ PreferredPersonaID: z.string().nullable().describe(`
3953
+ * * Field Name: PreferredPersonaID
3954
+ * * Display Name: Preferred Persona
3955
+ * * SQL Data Type: uniqueidentifier
3956
+ * * Related Entity/Foreign Key: MJ: AI Personas (vwAIPersonas.ID)
3957
+ * * Description: Optional AI Persona selected by the user for this agent's voice and communication style.`),
3958
+ Status: z.union([z.literal('Active'), z.literal('Disabled'), z.literal('Paused')]).describe(`
3959
+ * * Field Name: Status
3960
+ * * Display Name: Status
3961
+ * * SQL Data Type: nvarchar(20)
3962
+ * * Default Value: Active
3963
+ * * Value List Type: List
3964
+ * * Possible Values
3965
+ * * Active
3966
+ * * Disabled
3967
+ * * Paused
3968
+ * * Description: Policy lifecycle status: Active, Paused (autonomous wakes suspended), or Disabled.`),
3969
+ OnboardingStatus: z.union([z.literal('Completed'), z.literal('InProgress'), z.literal('NotStarted')]).describe(`
3970
+ * * Field Name: OnboardingStatus
3971
+ * * Display Name: Onboarding Status
3972
+ * * SQL Data Type: nvarchar(20)
3973
+ * * Default Value: NotStarted
3974
+ * * Value List Type: List
3975
+ * * Possible Values
3976
+ * * Completed
3977
+ * * InProgress
3978
+ * * NotStarted
3979
+ * * Description: Onboarding progression for this user-agent pair: NotStarted, InProgress, or Completed.`),
3980
+ OnboardedAt: z.date().nullable().describe(`
3981
+ * * Field Name: OnboardedAt
3982
+ * * Display Name: Onboarded At
3983
+ * * SQL Data Type: datetimeoffset
3984
+ * * Description: Timestamp when the user completed onboarding for this agent.`),
3985
+ CoordinationMode: z.union([z.literal('Autonomous'), z.literal('Coordinator'), z.literal('Observer')]).describe(`
3986
+ * * Field Name: CoordinationMode
3987
+ * * Display Name: Coordination Mode
3988
+ * * SQL Data Type: nvarchar(20)
3989
+ * * Default Value: Observer
3990
+ * * Value List Type: List
3991
+ * * Possible Values
3992
+ * * Autonomous
3993
+ * * Coordinator
3994
+ * * Observer
3995
+ * * Description: Operating posture: Observer (tracks and reports only; never nudges others), Coordinator (nudges internal task/priority owners and peer CoS agents), or Autonomous (proactively coordinates within approval boundaries).`),
3996
+ DefaultDataAccessMode: z.union([z.literal('AllowListOnly'), z.literal('ReadOnly'), z.literal('UserCeiling')]).describe(`
3997
+ * * Field Name: DefaultDataAccessMode
3998
+ * * Display Name: Default Data Access Mode
3999
+ * * SQL Data Type: nvarchar(20)
4000
+ * * Default Value: UserCeiling
4001
+ * * Value List Type: List
4002
+ * * Possible Values
4003
+ * * AllowListOnly
4004
+ * * ReadOnly
4005
+ * * UserCeiling
4006
+ * * Description: Default entity access ceiling when no explicit rule in EntityAccessRules matches: UserCeiling (inherit user's MJ permissions), ReadOnly (read permitted entities, block all writes unless explicitly allowed), or AllowListOnly (deny all entities not listed in EntityAccessRules).`),
4007
+ EmailChannelMode: z.union([z.literal('Disabled'), z.literal('DraftOnly'), z.literal('ReadOnly'), z.literal('SendAsAgent'), z.literal('SendAsUser')]).describe(`
4008
+ * * Field Name: EmailChannelMode
4009
+ * * Display Name: Email Channel Mode
4010
+ * * SQL Data Type: nvarchar(20)
4011
+ * * Default Value: DraftOnly
4012
+ * * Value List Type: List
4013
+ * * Possible Values
4014
+ * * Disabled
4015
+ * * DraftOnly
4016
+ * * ReadOnly
4017
+ * * SendAsAgent
4018
+ * * SendAsUser
4019
+ * * Description: Email channel permission level: Disabled, ReadOnly, DraftOnly, SendAsAgent, or SendAsUser.`),
4020
+ PhoneChannelMode: z.union([z.literal('Disabled'), z.literal('InboundOnly'), z.literal('OutboundAutonomous'), z.literal('OutboundWithApproval')]).describe(`
4021
+ * * Field Name: PhoneChannelMode
4022
+ * * Display Name: Phone Channel Mode
4023
+ * * SQL Data Type: nvarchar(20)
4024
+ * * Default Value: InboundOnly
4025
+ * * Value List Type: List
4026
+ * * Possible Values
4027
+ * * Disabled
4028
+ * * InboundOnly
4029
+ * * OutboundAutonomous
4030
+ * * OutboundWithApproval
4031
+ * * Description: Telephony channel permission level: Disabled, InboundOnly, OutboundWithApproval, or OutboundAutonomous.`),
4032
+ MessagingChannelMode: z.union([z.literal('Disabled'), z.literal('Enabled')]).describe(`
4033
+ * * Field Name: MessagingChannelMode
4034
+ * * Display Name: Messaging Channel Mode
4035
+ * * SQL Data Type: nvarchar(20)
4036
+ * * Default Value: Enabled
4037
+ * * Value List Type: List
4038
+ * * Possible Values
4039
+ * * Disabled
4040
+ * * Enabled
4041
+ * * Description: Messaging channel permission level (Slack/Teams/In-App): Disabled or Enabled.`),
4042
+ CalendarChannelMode: z.union([z.literal('Autonomous'), z.literal('Disabled'), z.literal('ProposeWithApproval'), z.literal('ReadOnly')]).describe(`
4043
+ * * Field Name: CalendarChannelMode
4044
+ * * Display Name: Calendar Channel Mode
4045
+ * * SQL Data Type: nvarchar(30)
4046
+ * * Default Value: ReadOnly
4047
+ * * Value List Type: List
4048
+ * * Possible Values
4049
+ * * Autonomous
4050
+ * * Disabled
4051
+ * * ProposeWithApproval
4052
+ * * ReadOnly
4053
+ * * Description: Calendar channel permission level: Disabled, ReadOnly (check events & free/busy only), ProposeWithApproval (create/modify events or send invites only with explicit user approval), or Autonomous.`),
4054
+ AllowInterAgentCoordination: z.boolean().describe(`
4055
+ * * Field Name: AllowInterAgentCoordination
4056
+ * * Display Name: Allow Inter-Agent Coordination
4057
+ * * SQL Data Type: bit
4058
+ * * Default Value: 1
4059
+ * * Description: Whether this user's agent may send or respond to structured coordination requests from other users' Chief of Staff agents.`),
4060
+ RequireApprovalForExternalComms: z.boolean().describe(`
4061
+ * * Field Name: RequireApprovalForExternalComms
4062
+ * * Display Name: Require Approval For External Comms
4063
+ * * SQL Data Type: bit
4064
+ * * Default Value: 1
4065
+ * * Description: When 1, any external email, message, or outbound call to non-internal recipients requires explicit user approval via AIAgentRequest.`),
4066
+ RequireApprovalForFinancials: z.boolean().describe(`
4067
+ * * Field Name: RequireApprovalForFinancials
4068
+ * * Display Name: Require Approval For Financials
4069
+ * * SQL Data Type: bit
4070
+ * * Default Value: 1
4071
+ * * Description: When 1, financial commitments, purchases, or accounting/order approvals require explicit user approval.`),
4072
+ RequireApprovalForDestructiveActions: z.boolean().describe(`
4073
+ * * Field Name: RequireApprovalForDestructiveActions
4074
+ * * Display Name: Require Approval For Destructive Actions
4075
+ * * SQL Data Type: bit
4076
+ * * Default Value: 1
4077
+ * * Description: When 1, deleting records or cancelling active workflows requires explicit user approval.`),
4078
+ AutoApproveAmountThreshold: z.number().nullable().describe(`
4079
+ * * Field Name: AutoApproveAmountThreshold
4080
+ * * Display Name: Auto Approve Amount Threshold
4081
+ * * SQL Data Type: decimal(18, 2)
4082
+ * * Description: Optional monetary threshold below which low-risk financial actions may proceed when RequireApprovalForFinancials is 0. NULL means no automatic monetary threshold.`),
4083
+ EntityAccessRules: z.any().nullable().describe(`
4084
+ * * Field Name: EntityAccessRules
4085
+ * * Display Name: Entity Access Rules
4086
+ * * SQL Data Type: nvarchar(MAX)
4087
+ * * JSON Type: Array<MJAIAgentUserPolicyEntity_IAgentUserEntityAccessRule>
4088
+ * * Description: JSON array of IAgentUserEntityAccessRule objects defining per-entity or wildcard CRUD narrowing, additional Row-Level Security (RLS) filters, additional Field-Level Security (FLS) field masks, and allowed time windows.`),
4089
+ ActionPolicyRules: z.any().nullable().describe(`
4090
+ * * Field Name: ActionPolicyRules
4091
+ * * Display Name: Action Policy Rules
4092
+ * * SQL Data Type: nvarchar(MAX)
4093
+ * * JSON Type: Array<MJAIAgentUserPolicyEntity_IAgentUserActionPolicyRule>
4094
+ * * Description: JSON array of IAgentUserActionPolicyRule objects defining per-action Allow/RequireApproval/Deny policies, SafeExpressionEvaluator parameter conditions, and allowed time windows.`),
4095
+ InstructionsOverride: z.string().nullable().describe(`
4096
+ * * Field Name: InstructionsOverride
4097
+ * * Display Name: Instructions Override
4098
+ * * SQL Data Type: nvarchar(MAX)
4099
+ * * Description: Optional user-specific standing instructions injected into the agent's system context on every run.`),
4100
+ __mj_CreatedAt: z.date().describe(`
4101
+ * * Field Name: __mj_CreatedAt
4102
+ * * Display Name: Created At
4103
+ * * SQL Data Type: datetimeoffset
4104
+ * * Default Value: getutcdate()`),
4105
+ __mj_UpdatedAt: z.date().describe(`
4106
+ * * Field Name: __mj_UpdatedAt
4107
+ * * Display Name: Updated At
4108
+ * * SQL Data Type: datetimeoffset
4109
+ * * Default Value: getutcdate()`),
4110
+ Agent: z.string().nullable().describe(`
4111
+ * * Field Name: Agent
4112
+ * * Display Name: Agent Name
4113
+ * * SQL Data Type: nvarchar(255)`),
4114
+ User: z.string().describe(`
4115
+ * * Field Name: User
4116
+ * * Display Name: User Name
4117
+ * * SQL Data Type: nvarchar(100)`),
4118
+ PreferredPersona: z.string().nullable().describe(`
4119
+ * * Field Name: PreferredPersona
4120
+ * * Display Name: Preferred Persona Name
4121
+ * * SQL Data Type: nvarchar(100)`),
4122
+ });
3812
4123
  /**
3813
4124
  * zod schema definition for the entity MJ: AI Agents
3814
4125
  */
@@ -4552,6 +4863,12 @@ export const MJAIBridgeAgentIdentitySchema = z.object({
4552
4863
  * * Display Name: Updated At
4553
4864
  * * SQL Data Type: datetimeoffset
4554
4865
  * * Default Value: getutcdate()`),
4866
+ UserID: z.string().nullable().describe(`
4867
+ * * Field Name: UserID
4868
+ * * Display Name: User
4869
+ * * SQL Data Type: uniqueidentifier
4870
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
4871
+ * * Description: Optional owning MJ User when this email address, phone DID, or platform account identity is dedicated to a specific user's personal agent instance (such as their Chief of Staff). NULL for shared/org-wide agent identities.`),
4555
4872
  Agent: z.string().nullable().describe(`
4556
4873
  * * Field Name: Agent
4557
4874
  * * Display Name: Agent Name
@@ -4560,6 +4877,10 @@ export const MJAIBridgeAgentIdentitySchema = z.object({
4560
4877
  * * Field Name: Provider
4561
4878
  * * Display Name: Provider Name
4562
4879
  * * SQL Data Type: nvarchar(100)`),
4880
+ User: z.string().nullable().describe(`
4881
+ * * Field Name: User
4882
+ * * Display Name: User Name
4883
+ * * SQL Data Type: nvarchar(100)`),
4563
4884
  });
4564
4885
  /**
4565
4886
  * zod schema definition for the entity MJ: AI Bridge Provider Channels
@@ -7275,6 +7596,16 @@ export const MJAIPromptSchema = z.object({
7275
7596
  * * SQL Data Type: nvarchar(MAX)
7276
7597
  * * JSON Type: MJAIPromptEntity_IAIPromptConfiguration
7277
7598
  * * Description: Per-prompt call-time configuration bag (JSON, IAIPromptConfiguration shape: LLM / Realtime / Vision / Audio sections). Base layer of the prompt Configuration cascade — AIPromptModel rows inherit from it per key and may override — and itself layered on top of the resolved AIModel/AIModelVendor ModelConfiguration. NULL = contributes nothing.`),
7599
+ TemplateDataCapture: z.union([z.literal('Full'), z.literal('None'), z.literal('Referenced')]).nullable().describe(`
7600
+ * * Field Name: TemplateDataCapture
7601
+ * * Display Name: Template Data Capture
7602
+ * * SQL Data Type: nvarchar(20)
7603
+ * * Value List Type: List
7604
+ * * Possible Values
7605
+ * * Full
7606
+ * * None
7607
+ * * Referenced
7608
+ * * Description: Which template inputs (data, templateData) prompt runs store in Messages: None (shape only), Referenced (only keys the template uses) or Full. NULL uses the server default.`),
7278
7609
  Template: z.string().describe(`
7279
7610
  * * Field Name: Template
7280
7611
  * * Display Name: Template Text
@@ -9045,6 +9376,12 @@ export const MJActionParamSchema = z.object({
9045
9376
  * * SQL Data Type: bit
9046
9377
  * * Default Value: 1
9047
9378
  * * Description: Whether this parameter's VALUE may be written to ActionExecutionLog.Params. Default 1. Set to 0 for parameters that carry records, credentials or personal data - for example the Data payload of Execute Agent. Independent of the hard rule that Entity Action params of ValueType 'Entity Object' or 'Entity Object Data' are never logged regardless of this flag. When logging is suppressed the log records the parameter name, its type and a redaction marker, never the value.`),
9379
+ ValueSchema: z.any().nullable().describe(`
9380
+ * * Field Name: ValueSchema
9381
+ * * Display Name: Value Schema
9382
+ * * SQL Data Type: nvarchar(MAX)
9383
+ * * JSON Type: MJActionParamEntity_IActionParamValueSchema
9384
+ * * Description: Optional JSON Schema fragment describing this parameter's value, limited to the cross-provider subset: type, description, enum, items, properties and required. When set, the native tool builder declares it to the model in place of the coarse ValueType mapping, and argument coercion follows it. For an IsArray parameter it describes one element. When NULL, the schema is derived from ValueType.`),
9048
9385
  Action: z.string().describe(`
9049
9386
  * * Field Name: Action
9050
9387
  * * Display Name: Action
@@ -9776,6 +10113,16 @@ export const MJArchiveConfigurationSchema = z.object({
9776
10113
  * * Display Name: Updated At
9777
10114
  * * SQL Data Type: datetimeoffset
9778
10115
  * * Default Value: getutcdate()`),
10116
+ StorageMode: z.union([z.literal('Purge'), z.literal('Store')]).describe(`
10117
+ * * Field Name: StorageMode
10118
+ * * Display Name: Storage Mode
10119
+ * * SQL Data Type: nvarchar(20)
10120
+ * * Default Value: Store
10121
+ * * Value List Type: List
10122
+ * * Possible Values
10123
+ * * Purge
10124
+ * * Store
10125
+ * * Description: Whether runs keep a copy of the data they remove. Store (default): each record's archive document is written to the storage account before the mode changes the source row. Purge: the mode is applied with no copy written, StorageAccountID is not needed, and cleared data cannot be restored. A Purge run refuses entities in ArchiveOnly mode, entities missing from metadata, entities that track Record Changes, entities whose driver is not registered or does not support purge, and HardDelete entities that use soft delete or whose delete cascade reaches an entity that tracks Record Changes or uses soft delete.`),
9779
10126
  StorageAccount: z.string().nullable().describe(`
9780
10127
  * * Field Name: StorageAccount
9781
10128
  * * Display Name: Storage Account Name
@@ -9863,10 +10210,10 @@ export const MJArchiveRunDetailSchema = z.object({
9863
10210
  * * Display Name: Updated At
9864
10211
  * * SQL Data Type: datetimeoffset
9865
10212
  * * Default Value: getutcdate()`),
9866
- ArchiveRun: z.date().describe(`
10213
+ ArchiveRun: z.string().describe(`
9867
10214
  * * Field Name: ArchiveRun
9868
- * * Display Name: Archive Run Timestamp
9869
- * * SQL Data Type: datetimeoffset`),
10215
+ * * Display Name: Archive Run
10216
+ * * SQL Data Type: nvarchar(255)`),
9870
10217
  Entity: z.string().describe(`
9871
10218
  * * Field Name: Entity
9872
10219
  * * Display Name: Entity Name
@@ -9962,6 +10309,16 @@ export const MJArchiveRunSchema = z.object({
9962
10309
  * * Display Name: Updated At
9963
10310
  * * SQL Data Type: datetimeoffset
9964
10311
  * * Default Value: getutcdate()`),
10312
+ StorageMode: z.union([z.literal('Purge'), z.literal('Store')]).describe(`
10313
+ * * Field Name: StorageMode
10314
+ * * Display Name: Storage Mode
10315
+ * * SQL Data Type: nvarchar(20)
10316
+ * * Default Value: Store
10317
+ * * Value List Type: List
10318
+ * * Possible Values
10319
+ * * Purge
10320
+ * * Store
10321
+ * * Description: The configuration's StorageMode when this run started: Store (copies written to storage) or Purge (no copies kept; only failed records get an ArchiveRunDetail row).`),
9965
10322
  ArchiveConfiguration: z.string().describe(`
9966
10323
  * * Field Name: ArchiveConfiguration
9967
10324
  * * Display Name: Configuration Name
@@ -11481,6 +11838,44 @@ export const MJCommunicationProviderSchema = z.object({
11481
11838
  * * SQL Data Type: bit
11482
11839
  * * Default Value: 0
11483
11840
  * * Description: Whether or not the provider supports creating draft messages`),
11841
+ SupportsCalendar: z.boolean().describe(`
11842
+ * * Field Name: SupportsCalendar
11843
+ * * Display Name: Supports Calendar
11844
+ * * SQL Data Type: bit
11845
+ * * Default Value: 0
11846
+ * * Description: Whether the provider supports calendar event reading, creation, updating, and invitation responses.`),
11847
+ SupportsFreeBusy: z.boolean().describe(`
11848
+ * * Field Name: SupportsFreeBusy
11849
+ * * Display Name: Supports Free Busy
11850
+ * * SQL Data Type: bit
11851
+ * * Default Value: 0
11852
+ * * Description: Whether the provider supports checking free/busy schedules and finding optimal meeting times.`),
11853
+ EnterpriseScopeMode: z.union([z.literal('SecurityGroupScoped'), z.literal('TenantWide'), z.literal('UtilityMailboxesOnly')]).describe(`
11854
+ * * Field Name: EnterpriseScopeMode
11855
+ * * Display Name: Enterprise Scope Mode
11856
+ * * SQL Data Type: nvarchar(40)
11857
+ * * Default Value: UtilityMailboxesOnly
11858
+ * * Value List Type: List
11859
+ * * Possible Values
11860
+ * * SecurityGroupScoped
11861
+ * * TenantWide
11862
+ * * UtilityMailboxesOnly
11863
+ * * Description: Enterprise mailbox scope posture for this provider: UtilityMailboxesOnly (restricted to shared/agent utility mailboxes), SecurityGroupScoped (Exchange RBAC / Workspace group-scoped user mailboxes), or TenantWide.`),
11864
+ AllowedEmailDomains: z.string().nullable().describe(`
11865
+ * * Field Name: AllowedEmailDomains
11866
+ * * Display Name: Allowed Email Domains
11867
+ * * SQL Data Type: nvarchar(500)
11868
+ * * Description: Optional comma-separated list of corporate email domains permitted for user-scoped mailbox and calendar operations (e.g., "company.com,subsidiary.com").`),
11869
+ DefaultCredentialID: z.string().nullable().describe(`
11870
+ * * Field Name: DefaultCredentialID
11871
+ * * Display Name: Default Credential ID
11872
+ * * SQL Data Type: uniqueidentifier
11873
+ * * Related Entity/Foreign Key: MJ: Credentials (vwCredentials.ID)
11874
+ * * Description: Optional default MJ Credential used by this communication provider when no per-request credential override is supplied.`),
11875
+ DefaultCredential: z.string().nullable().describe(`
11876
+ * * Field Name: DefaultCredential
11877
+ * * Display Name: Default Credential
11878
+ * * SQL Data Type: nvarchar(200)`),
11484
11879
  });
11485
11880
  /**
11486
11881
  * zod schema definition for the entity MJ: Communication Runs
@@ -14161,6 +14556,82 @@ export const MJConversationArtifactSchema = z.object({
14161
14556
  * * Display Name: Artifact Type
14162
14557
  * * SQL Data Type: nvarchar(100)`),
14163
14558
  });
14559
+ /**
14560
+ * zod schema definition for the entity MJ: Conversation Branches
14561
+ */
14562
+ export const MJConversationBranchSchema = z.object({
14563
+ ID: z.string().describe(`
14564
+ * * Field Name: ID
14565
+ * * Display Name: ID
14566
+ * * SQL Data Type: uniqueidentifier
14567
+ * * Default Value: newsequentialid()`),
14568
+ ConversationID: z.string().describe(`
14569
+ * * Field Name: ConversationID
14570
+ * * Display Name: Conversation
14571
+ * * SQL Data Type: uniqueidentifier
14572
+ * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)
14573
+ * * Description: The conversation this fork belongs to.`),
14574
+ ParentBranchID: z.string().nullable().describe(`
14575
+ * * Field Name: ParentBranchID
14576
+ * * Display Name: Parent Branch
14577
+ * * SQL Data Type: uniqueidentifier
14578
+ * * Related Entity/Foreign Key: MJ: Conversation Branches (vwConversationBranches.ID)
14579
+ * * Description: The fork this one started from. NULL means it started from Main, or before the first message when ForkFromSequence is also NULL.`),
14580
+ ForkFromSequence: z.number().nullable().describe(`
14581
+ * * Field Name: ForkFromSequence
14582
+ * * Display Name: Fork From Sequence
14583
+ * * SQL Data Type: int
14584
+ * * Description: Sequence of the last message shared with the parent path. NULL means the fork starts before the first message, in which case ParentBranchID is also NULL.`),
14585
+ Name: z.string().nullable().describe(`
14586
+ * * Field Name: Name
14587
+ * * Display Name: Name
14588
+ * * SQL Data Type: nvarchar(255)
14589
+ * * Description: Optional name of the fork. With no name, the UI shows a default label from Kind: a Fork is named from its first message.`),
14590
+ Kind: z.union([z.literal('Edit'), z.literal('Fork'), z.literal('Regenerate')]).describe(`
14591
+ * * Field Name: Kind
14592
+ * * Display Name: Kind
14593
+ * * SQL Data Type: nvarchar(20)
14594
+ * * Default Value: Fork
14595
+ * * Value List Type: List
14596
+ * * Possible Values
14597
+ * * Edit
14598
+ * * Fork
14599
+ * * Regenerate
14600
+ * * Description: How the fork started: Fork (Fork from here), Edit (a sent message was edited) or Regenerate (an answer was regenerated).`),
14601
+ SourceDetailID: z.string().nullable().describe(`
14602
+ * * Field Name: SourceDetailID
14603
+ * * Display Name: Source Detail
14604
+ * * SQL Data Type: uniqueidentifier
14605
+ * * Description: The edited message (Kind Edit) or the replaced answer (Kind Regenerate); NULL otherwise. Not a foreign key, to avoid a CodeGen cascade cycle with ConversationDetail.`),
14606
+ UserID: z.string().describe(`
14607
+ * * Field Name: UserID
14608
+ * * Display Name: User
14609
+ * * SQL Data Type: uniqueidentifier
14610
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
14611
+ * * Description: The person who started the fork.`),
14612
+ __mj_CreatedAt: z.date().describe(`
14613
+ * * Field Name: __mj_CreatedAt
14614
+ * * Display Name: Created At
14615
+ * * SQL Data Type: datetimeoffset
14616
+ * * Default Value: getutcdate()`),
14617
+ __mj_UpdatedAt: z.date().describe(`
14618
+ * * Field Name: __mj_UpdatedAt
14619
+ * * Display Name: Updated At
14620
+ * * SQL Data Type: datetimeoffset
14621
+ * * Default Value: getutcdate()`),
14622
+ Conversation: z.string().nullable().describe(`
14623
+ * * Field Name: Conversation
14624
+ * * Display Name: Conversation Detail
14625
+ * * SQL Data Type: nvarchar(255)`),
14626
+ ParentBranch: z.string().nullable().describe(`
14627
+ * * Field Name: ParentBranch
14628
+ * * Display Name: Parent Branch Detail
14629
+ * * SQL Data Type: nvarchar(255)`),
14630
+ User: z.string().describe(`
14631
+ * * Field Name: User
14632
+ * * Display Name: User Name
14633
+ * * SQL Data Type: nvarchar(100)`),
14634
+ });
14164
14635
  /**
14165
14636
  * zod schema definition for the entity MJ: Conversation Compaction Runs
14166
14637
  */
@@ -14608,6 +15079,17 @@ export const MJConversationDetailSchema = z.object({
14608
15079
  * * SQL Data Type: int
14609
15080
  * * Default Value: 0
14610
15081
  * * Description: Monotonic, per-conversation ordinal assigned on insert (1-based). Provides a stable symbolic handle used by conversation-history retrieval tools and by the sequence markers embedded in compaction summaries. A summary stored in SummaryOfEarlierConversation on a given row covers all rows with a lower Sequence in the same conversation.`),
15082
+ BranchID: z.string().nullable().describe(`
15083
+ * * Field Name: BranchID
15084
+ * * Display Name: Branch
15085
+ * * SQL Data Type: uniqueidentifier
15086
+ * * Related Entity/Foreign Key: MJ: Conversation Branches (vwConversationBranches.ID)
15087
+ * * Description: The fork this message belongs to. NULL means Main (the trunk). Every writer sets it explicitly.`),
15088
+ ReplacedAt: z.date().nullable().describe(`
15089
+ * * Field Name: ReplacedAt
15090
+ * * Display Name: Replaced At
15091
+ * * SQL Data Type: datetimeoffset
15092
+ * * Description: When a rerun of this message's turn replaced it (Regenerate or Save and resend while forking is off). A replaced row is kept for audit, is hidden from the user and is never sent to an agent. NULL means the row is live.`),
14611
15093
  Conversation: z.string().nullable().describe(`
14612
15094
  * * Field Name: Conversation
14613
15095
  * * Display Name: Conversation
@@ -14636,6 +15118,10 @@ export const MJConversationDetailSchema = z.object({
14636
15118
  * * Field Name: TestRun
14637
15119
  * * Display Name: Test Run
14638
15120
  * * SQL Data Type: nvarchar(255)`),
15121
+ Branch: z.string().nullable().describe(`
15122
+ * * Field Name: Branch
15123
+ * * Display Name: Branch
15124
+ * * SQL Data Type: nvarchar(255)`),
14639
15125
  RootParentID: z.string().nullable().describe(`
14640
15126
  * * Field Name: RootParentID
14641
15127
  * * Display Name: Root Parent
@@ -20354,6 +20840,181 @@ export const MJFeaturePipelineTypeSchema = z.object({
20354
20840
  * * SQL Data Type: datetimeoffset
20355
20841
  * * Default Value: getutcdate()`),
20356
20842
  });
20843
+ /**
20844
+ * zod schema definition for the entity MJ: Feature Pipeline Versions
20845
+ */
20846
+ export const MJFeaturePipelineVersionSchema = z.object({
20847
+ ID: z.string().describe(`
20848
+ * * Field Name: ID
20849
+ * * Display Name: ID
20850
+ * * SQL Data Type: uniqueidentifier
20851
+ * * Default Value: newsequentialid()`),
20852
+ RecordProcessID: z.string().describe(`
20853
+ * * Field Name: RecordProcessID
20854
+ * * Display Name: Record Process ID
20855
+ * * SQL Data Type: uniqueidentifier
20856
+ * * Related Entity/Foreign Key: MJ: Record Processes (vwRecordProcesses.ID)`),
20857
+ Version: z.number().describe(`
20858
+ * * Field Name: Version
20859
+ * * Display Name: Version
20860
+ * * SQL Data Type: int
20861
+ * * Description: Monotonic version number within the pipeline (1, 2, ...).`),
20862
+ PinHash: z.string().describe(`
20863
+ * * Field Name: PinHash
20864
+ * * Display Name: Pin Hash
20865
+ * * SQL Data Type: nvarchar(64)
20866
+ * * Description: SHA-256 of the pin (SpecHash, PromptVersionHash, AIModelID, ParametersHash). Unique per pipeline.`),
20867
+ SpecHash: z.string().describe(`
20868
+ * * Field Name: SpecHash
20869
+ * * Display Name: Spec Hash
20870
+ * * SQL Data Type: nvarchar(64)
20871
+ * * Description: SHA-256 of the output-affecting parts of the DataFeatureSpec (Context, Outputs, PipelineType, Escalation, PromptID, ProcessorExtensionKey) and the OutputMapping.`),
20872
+ PromptID: z.string().nullable().describe(`
20873
+ * * Field Name: PromptID
20874
+ * * Display Name: Prompt
20875
+ * * SQL Data Type: uniqueidentifier
20876
+ * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
20877
+ * * Description: The pipeline prompt this version runs.`),
20878
+ PromptVersionHash: z.string().nullable().describe(`
20879
+ * * Field Name: PromptVersionHash
20880
+ * * Display Name: Prompt Version Hash
20881
+ * * SQL Data Type: nvarchar(64)
20882
+ * * Description: Prompt version hash (template text, outputs, constraint block, pipeline type, escalation) of this version.`),
20883
+ AIModelID: z.string().nullable().describe(`
20884
+ * * Field Name: AIModelID
20885
+ * * Display Name: AI Model
20886
+ * * SQL Data Type: uniqueidentifier
20887
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
20888
+ * * Description: Primary AI model of the prompt for this version.`),
20889
+ ParametersHash: z.string().nullable().describe(`
20890
+ * * Field Name: ParametersHash
20891
+ * * Display Name: Parameters Hash
20892
+ * * SQL Data Type: nvarchar(64)
20893
+ * * Description: SHA-256 of the prompt inference parameters for this version.`),
20894
+ Status: z.union([z.literal('Active'), z.literal('Candidate'), z.literal('Refused'), z.literal('Retired')]).describe(`
20895
+ * * Field Name: Status
20896
+ * * Display Name: Status
20897
+ * * SQL Data Type: nvarchar(20)
20898
+ * * Default Value: Candidate
20899
+ * * Value List Type: List
20900
+ * * Possible Values
20901
+ * * Active
20902
+ * * Candidate
20903
+ * * Refused
20904
+ * * Retired
20905
+ * * Description: Candidate (registered, not yet allowed to write), Active (the version runs write), Refused (golden-set result below threshold), Retired (superseded by a later Active version).`),
20906
+ Gated: z.boolean().describe(`
20907
+ * * Field Name: Gated
20908
+ * * Display Name: Gated
20909
+ * * SQL Data Type: bit
20910
+ * * Default Value: 0
20911
+ * * Description: True when the pipeline declares DataFeatureSpec.Activation: the version can become Active only through a stored golden-set result at or above Threshold.`),
20912
+ GoldenSetTestID: z.string().nullable().describe(`
20913
+ * * Field Name: GoldenSetTestID
20914
+ * * Display Name: Golden Set Test
20915
+ * * SQL Data Type: uniqueidentifier
20916
+ * * Related Entity/Foreign Key: MJ: Tests (vwTests.ID)
20917
+ * * Description: The MJ: Tests row holding the golden set this version was evaluated on.`),
20918
+ GoldenSetTestRunID: z.string().nullable().describe(`
20919
+ * * Field Name: GoldenSetTestRunID
20920
+ * * Display Name: Golden Set Test Run
20921
+ * * SQL Data Type: uniqueidentifier
20922
+ * * Related Entity/Foreign Key: MJ: Test Runs (vwTestRuns.ID)
20923
+ * * Description: The MJ: Test Runs row of the evaluation whose result is stored here.`),
20924
+ Metric: z.literal('accuracy').nullable().describe(`
20925
+ * * Field Name: Metric
20926
+ * * Display Name: Metric
20927
+ * * SQL Data Type: nvarchar(20)
20928
+ * * Value List Type: List
20929
+ * * Possible Values
20930
+ * * accuracy
20931
+ * * Description: Metric of the stored result: accuracy.`),
20932
+ Threshold: z.number().nullable().describe(`
20933
+ * * Field Name: Threshold
20934
+ * * Display Name: Threshold
20935
+ * * SQL Data Type: float(53)
20936
+ * * Description: Declared activation threshold copied from DataFeatureSpec.Activation at evaluation time.`),
20937
+ ResultValue: z.number().nullable().describe(`
20938
+ * * Field Name: ResultValue
20939
+ * * Display Name: Result Value
20940
+ * * SQL Data Type: float(53)
20941
+ * * Description: Point estimate of the metric (the lowest per-output value when the pipeline has several outputs).`),
20942
+ ResultLower: z.number().nullable().describe(`
20943
+ * * Field Name: ResultLower
20944
+ * * Display Name: Result Lower Bound
20945
+ * * SQL Data Type: float(53)
20946
+ * * Description: Lower bound of the 95% Wilson interval of ResultValue.`),
20947
+ ResultUpper: z.number().nullable().describe(`
20948
+ * * Field Name: ResultUpper
20949
+ * * Display Name: Result Upper Bound
20950
+ * * SQL Data Type: float(53)
20951
+ * * Description: Upper bound of the 95% Wilson interval of ResultValue.`),
20952
+ ResultN: z.number().nullable().describe(`
20953
+ * * Field Name: ResultN
20954
+ * * Display Name: Result Sample Size (N)
20955
+ * * SQL Data Type: int
20956
+ * * Description: Number of golden cases scored.`),
20957
+ ResultDetails: z.string().nullable().describe(`
20958
+ * * Field Name: ResultDetails
20959
+ * * Display Name: Result Details
20960
+ * * SQL Data Type: nvarchar(MAX)
20961
+ * * Description: JSON per-output results (correct, n, value, interval) and the per-case answers of the evaluation.`),
20962
+ ActivatedAt: z.date().nullable().describe(`
20963
+ * * Field Name: ActivatedAt
20964
+ * * Display Name: Activated At
20965
+ * * SQL Data Type: datetimeoffset
20966
+ * * Description: When the version became Active.`),
20967
+ ApprovedByUserID: z.string().nullable().describe(`
20968
+ * * Field Name: ApprovedByUserID
20969
+ * * Display Name: Approved By User
20970
+ * * SQL Data Type: uniqueidentifier
20971
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
20972
+ * * Description: The user whose run activated the version (for an unattended activation, the Feature Pipeline Version Steward job's user).`),
20973
+ RetiredAt: z.date().nullable().describe(`
20974
+ * * Field Name: RetiredAt
20975
+ * * Display Name: Retired At
20976
+ * * SQL Data Type: datetimeoffset
20977
+ * * Description: When a later Active version superseded this one.`),
20978
+ BackfilledAt: z.date().nullable().describe(`
20979
+ * * Field Name: BackfilledAt
20980
+ * * Display Name: Backfilled At
20981
+ * * SQL Data Type: datetimeoffset
20982
+ * * Description: When the Feature Pipeline Version Steward finished the one backfill run of this activation of the version.`),
20983
+ __mj_CreatedAt: z.date().describe(`
20984
+ * * Field Name: __mj_CreatedAt
20985
+ * * Display Name: Created At
20986
+ * * SQL Data Type: datetimeoffset
20987
+ * * Default Value: getutcdate()`),
20988
+ __mj_UpdatedAt: z.date().describe(`
20989
+ * * Field Name: __mj_UpdatedAt
20990
+ * * Display Name: Updated At
20991
+ * * SQL Data Type: datetimeoffset
20992
+ * * Default Value: getutcdate()`),
20993
+ RecordProcess: z.string().describe(`
20994
+ * * Field Name: RecordProcess
20995
+ * * Display Name: Record Process
20996
+ * * SQL Data Type: nvarchar(255)`),
20997
+ Prompt: z.string().nullable().describe(`
20998
+ * * Field Name: Prompt
20999
+ * * Display Name: Prompt Text
21000
+ * * SQL Data Type: nvarchar(255)`),
21001
+ AIModel: z.string().nullable().describe(`
21002
+ * * Field Name: AIModel
21003
+ * * Display Name: AI Model Name
21004
+ * * SQL Data Type: nvarchar(50)`),
21005
+ GoldenSetTest: z.string().nullable().describe(`
21006
+ * * Field Name: GoldenSetTest
21007
+ * * Display Name: Golden Set Test Name
21008
+ * * SQL Data Type: nvarchar(255)`),
21009
+ GoldenSetTestRun: z.string().nullable().describe(`
21010
+ * * Field Name: GoldenSetTestRun
21011
+ * * Display Name: Golden Set Test Run Name
21012
+ * * SQL Data Type: nvarchar(255)`),
21013
+ ApprovedByUser: z.string().nullable().describe(`
21014
+ * * Field Name: ApprovedByUser
21015
+ * * Display Name: Approved By User Name
21016
+ * * SQL Data Type: nvarchar(100)`),
21017
+ });
20357
21018
  /**
20358
21019
  * zod schema definition for the entity MJ: Feature Value Caches
20359
21020
  */
@@ -20450,6 +21111,17 @@ export const MJFeatureValueCacheSchema = z.object({
20450
21111
  * * SQL Data Type: datetimeoffset
20451
21112
  * * Default Value: getutcdate()
20452
21113
  * * Description: Timestamp when this record was last updated.`),
21114
+ AIModelID: z.string().nullable().describe(`
21115
+ * * Field Name: AIModelID
21116
+ * * Display Name: AI Model
21117
+ * * SQL Data Type: uniqueidentifier
21118
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
21119
+ * * Description: Primary AI model of the prompt that computed this cached result. Part of the cache key.`),
21120
+ ParametersHash: z.string().nullable().describe(`
21121
+ * * Field Name: ParametersHash
21122
+ * * Display Name: Parameters Hash
21123
+ * * SQL Data Type: nvarchar(64)
21124
+ * * Description: SHA-256 of the prompt's inference parameters when this result was computed. Part of the cache key.`),
20453
21125
  RecordProcess: z.string().nullable().describe(`
20454
21126
  * * Field Name: RecordProcess
20455
21127
  * * Display Name: Record Process Name
@@ -20458,6 +21130,10 @@ export const MJFeatureValueCacheSchema = z.object({
20458
21130
  * * Field Name: Prompt
20459
21131
  * * Display Name: Prompt Name
20460
21132
  * * SQL Data Type: nvarchar(255)`),
21133
+ AIModel: z.string().nullable().describe(`
21134
+ * * Field Name: AIModel
21135
+ * * Display Name: AI Model
21136
+ * * SQL Data Type: nvarchar(50)`),
20461
21137
  });
20462
21138
  /**
20463
21139
  * zod schema definition for the entity MJ: Feature Values
@@ -20583,6 +21259,42 @@ export const MJFeatureValueSchema = z.object({
20583
21259
  * * SQL Data Type: datetimeoffset
20584
21260
  * * Default Value: getutcdate()
20585
21261
  * * Description: Timestamp when this record was last updated.`),
21262
+ PipelineVersion: z.number().nullable().describe(`
21263
+ * * Field Name: PipelineVersion
21264
+ * * Display Name: Pipeline Version
21265
+ * * SQL Data Type: int
21266
+ * * Description: Version of the Feature Pipeline (MJ: Feature Pipeline Versions.Version) that computed this value; part of the FeatureValueKey.`),
21267
+ AIModelID: z.string().nullable().describe(`
21268
+ * * Field Name: AIModelID
21269
+ * * Display Name: AI Model
21270
+ * * SQL Data Type: uniqueidentifier
21271
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
21272
+ * * Description: Primary AI model the pipeline's prompt is configured to run (highest-priority Active AI Prompt Model). Part of the FeatureValueKey; the model that actually answered is on the linked AI Prompt Run.`),
21273
+ ParametersHash: z.string().nullable().describe(`
21274
+ * * Field Name: ParametersHash
21275
+ * * Display Name: Parameters Hash
21276
+ * * SQL Data Type: nvarchar(64)
21277
+ * * Description: SHA-256 of the prompt's inference parameters (temperature, topP, topK, minP, penalties, seed, response format, effort level, model parameters). Part of the FeatureValueKey.`),
21278
+ InputHash: z.string().nullable().describe(`
21279
+ * * Field Name: InputHash
21280
+ * * Display Name: Input Hash
21281
+ * * SQL Data Type: nvarchar(64)
21282
+ * * Description: SHA-256 of the normalized input the value was computed from (the Dedup Cache key hash when the pipeline caches). Part of the FeatureValueKey.`),
21283
+ ValueKeyHash: z.string().nullable().describe(`
21284
+ * * Field Name: ValueKeyHash
21285
+ * * Display Name: Value Key Hash
21286
+ * * SQL Data Type: nvarchar(64)
21287
+ * * Description: SHA-256 of the canonical FeatureValueKey (entity, record, feature, pipeline version, prompt version hash, AI model, parameters hash, input hash, source). Unique per pipeline: re-computing the same key updates the row instead of inserting a duplicate.`),
21288
+ Source: z.union([z.literal('Human'), z.literal('Pipeline')]).describe(`
21289
+ * * Field Name: Source
21290
+ * * Display Name: Source
21291
+ * * SQL Data Type: nvarchar(20)
21292
+ * * Default Value: Pipeline
21293
+ * * Value List Type: List
21294
+ * * Possible Values
21295
+ * * Human
21296
+ * * Pipeline
21297
+ * * Description: Who produced the value: Pipeline (computed by the Feature Pipeline) or Human (entered by a person, which write-back leaves in place).`),
20586
21298
  RecordProcess: z.string().describe(`
20587
21299
  * * Field Name: RecordProcess
20588
21300
  * * Display Name: Record Process
@@ -20603,6 +21315,10 @@ export const MJFeatureValueSchema = z.object({
20603
21315
  * * Field Name: FeatureValueCache
20604
21316
  * * Display Name: Feature Value Cache
20605
21317
  * * SQL Data Type: nvarchar(500)`),
21318
+ AIModel: z.string().nullable().describe(`
21319
+ * * Field Name: AIModel
21320
+ * * Display Name: AI Model Details
21321
+ * * SQL Data Type: nvarchar(50)`),
20606
21322
  });
20607
21323
  /**
20608
21324
  * zod schema definition for the entity MJ: File Categories
@@ -25892,6 +26608,11 @@ export const MJProcessRunDetailSchema = z.object({
25892
26608
  * * Display Name: Updated At
25893
26609
  * * SQL Data Type: datetimeoffset
25894
26610
  * * Default Value: getutcdate()`),
26611
+ Warnings: z.string().nullable().describe(`
26612
+ * * Field Name: Warnings
26613
+ * * Display Name: Warnings
26614
+ * * SQL Data Type: nvarchar(MAX)
26615
+ * * Description: JSON array of the record's non-fatal problems (for example, its Dedup Cache entry could not be stored) on a record that otherwise succeeded. NULL when there were none. Failures are in ErrorMessage, never here.`),
25895
26616
  Entity: z.string().describe(`
25896
26617
  * * Field Name: Entity
25897
26618
  * * Display Name: Entity Name
@@ -26072,6 +26793,11 @@ export const MJProcessRunSchema = z.object({
26072
26793
  * * SQL Data Type: bit
26073
26794
  * * Default Value: 0
26074
26795
  * * Description: When 1, this run was a dry-run (compute-only) preview: the per-record diffs were computed and persisted as Process Run Details, but no changes were written back to the target records. When 0, the run applied its changes.`),
26796
+ ResultSummary: z.string().nullable().describe(`
26797
+ * * Field Name: ResultSummary
26798
+ * * Display Name: Result Summary
26799
+ * * SQL Data Type: nvarchar(MAX)
26800
+ * * Description: JSON summary of a Feature Pipeline run (FeaturePipelineRunResult); NULL for other work types.`),
26075
26801
  RecordProcess: z.string().nullable().describe(`
26076
26802
  * * Field Name: RecordProcess
26077
26803
  * * Display Name: Record Process Name
@@ -30613,6 +31339,111 @@ export const MJSchemaInfoSchema = z.object({
30613
31339
  * * SQL Data Type: nvarchar(50)
30614
31340
  * * Description: Case-stable canonical schema name, sourced from the app manifest (mj-app.json schema.name). Used in place of SchemaName when deriving the schema prefix for entity ClassName/CodeName and GraphQL type names, so that PostgreSQL installs — whose physical SchemaName is folded to lowercase — still produce PascalCase prefixes matching the published, hand-cased entity packages. NULL means "no override": the prefix falls back to SchemaName (every existing install, the core __mj schema, and SQL Server, where SchemaName is already canonical).`),
30615
31341
  });
31342
+ /**
31343
+ * zod schema definition for the entity MJ: Scoped Notification Configs
31344
+ */
31345
+ export const MJScopedNotificationConfigSchema = z.object({
31346
+ ID: z.string().describe(`
31347
+ * * Field Name: ID
31348
+ * * Display Name: ID
31349
+ * * SQL Data Type: uniqueidentifier
31350
+ * * Default Value: newsequentialid()`),
31351
+ NotificationTypeID: z.string().describe(`
31352
+ * * Field Name: NotificationTypeID
31353
+ * * Display Name: Notification Type
31354
+ * * SQL Data Type: uniqueidentifier
31355
+ * * Related Entity/Foreign Key: MJ: User Notification Types (vwUserNotificationTypes.ID)
31356
+ * * Description: The notification type this config is for.`),
31357
+ Description: z.string().nullable().describe(`
31358
+ * * Field Name: Description
31359
+ * * Display Name: Description
31360
+ * * SQL Data Type: nvarchar(MAX)
31361
+ * * Description: Why the row exists, for the administrator who finds it.`),
31362
+ PrimaryScopeEntityID: z.string().nullable().describe(`
31363
+ * * Field Name: PrimaryScopeEntityID
31364
+ * * Display Name: Primary Scope Entity ID
31365
+ * * SQL Data Type: uniqueidentifier
31366
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
31367
+ * * Description: The entity of the primary scope record (Applications, Roles, Users, Companies, ...). NULL with PrimaryScopeRecordID NULL = a global row.`),
31368
+ PrimaryScopeRecordID: z.string().nullable().describe(`
31369
+ * * Field Name: PrimaryScopeRecordID
31370
+ * * Display Name: Primary Scope Record ID
31371
+ * * SQL Data Type: nvarchar(100)
31372
+ * * Description: The record ID within the primary scope entity this config is scoped to. NULL = global. In scope when it is the caller's primary scope record, the recipient, or a role the recipient holds.`),
31373
+ SecondaryScopes: z.string().nullable().describe(`
31374
+ * * Field Name: SecondaryScopes
31375
+ * * Display Name: Secondary Scopes
31376
+ * * SQL Data Type: nvarchar(MAX)
31377
+ * * Description: JSON object of additional scope dimensions, e.g. {"origin":"System"}. Every dimension named must match the notice's scope for the row to apply. origin is Person, System (the Owner-type user) or Automation.`),
31378
+ InApp: z.union([z.literal('Allow'), z.literal('Deny')]).nullable().describe(`
31379
+ * * Field Name: InApp
31380
+ * * Display Name: In-App Channel
31381
+ * * SQL Data Type: nvarchar(20)
31382
+ * * Value List Type: List
31383
+ * * Possible Values
31384
+ * * Allow
31385
+ * * Deny
31386
+ * * Description: The in-app channel: Allow, Deny, or NULL to leave it to the next row.`),
31387
+ Email: z.union([z.literal('Allow'), z.literal('Deny')]).nullable().describe(`
31388
+ * * Field Name: Email
31389
+ * * Display Name: Email Channel
31390
+ * * SQL Data Type: nvarchar(20)
31391
+ * * Value List Type: List
31392
+ * * Possible Values
31393
+ * * Allow
31394
+ * * Deny
31395
+ * * Description: The email channel: Allow, Deny, or NULL to leave it to the next row.`),
31396
+ SMS: z.union([z.literal('Allow'), z.literal('Deny')]).nullable().describe(`
31397
+ * * Field Name: SMS
31398
+ * * Display Name: SMS Channel
31399
+ * * SQL Data Type: nvarchar(20)
31400
+ * * Value List Type: List
31401
+ * * Possible Values
31402
+ * * Allow
31403
+ * * Deny
31404
+ * * Description: The SMS channel: Allow, Deny, or NULL to leave it to the next row.`),
31405
+ IsLocked: z.boolean().describe(`
31406
+ * * Field Name: IsLocked
31407
+ * * Display Name: Is Locked
31408
+ * * SQL Data Type: bit
31409
+ * * Default Value: 0
31410
+ * * Description: When set, a Deny on this row is absorbing: no less specific row and no recipient preference may turn the channel on. The way a notification type's AllowUserPreference caps the recipient today.`),
31411
+ Priority: z.number().describe(`
31412
+ * * Field Name: Priority
31413
+ * * Display Name: Priority
31414
+ * * SQL Data Type: int
31415
+ * * Default Value: 0
31416
+ * * Description: Tie-break for resolution. Higher wins when two rows tie on scope specificity and neither denies. Default 0.`),
31417
+ Status: z.union([z.literal('Active'), z.literal('Archived'), z.literal('Provisional')]).describe(`
31418
+ * * Field Name: Status
31419
+ * * Display Name: Status
31420
+ * * SQL Data Type: nvarchar(20)
31421
+ * * Default Value: Active
31422
+ * * Value List Type: List
31423
+ * * Possible Values
31424
+ * * Active
31425
+ * * Archived
31426
+ * * Provisional
31427
+ * * Description: Lifecycle: Active (live), Provisional (staged; eligible), Archived (excluded from resolution).`),
31428
+ __mj_CreatedAt: z.date().describe(`
31429
+ * * Field Name: __mj_CreatedAt
31430
+ * * Display Name: Created At
31431
+ * * SQL Data Type: datetimeoffset
31432
+ * * Default Value: getutcdate()`),
31433
+ __mj_UpdatedAt: z.date().describe(`
31434
+ * * Field Name: __mj_UpdatedAt
31435
+ * * Display Name: Updated At
31436
+ * * SQL Data Type: datetimeoffset
31437
+ * * Default Value: getutcdate()`),
31438
+ NotificationType: z.string().describe(`
31439
+ * * Field Name: NotificationType
31440
+ * * Display Name: Notification Type Name
31441
+ * * SQL Data Type: nvarchar(100)`),
31442
+ PrimaryScopeEntity: z.string().nullable().describe(`
31443
+ * * Field Name: PrimaryScopeEntity
31444
+ * * Display Name: Primary Scope Entity
31445
+ * * SQL Data Type: nvarchar(255)`),
31446
+ });
30616
31447
  /**
30617
31448
  * zod schema definition for the entity MJ: Scoped Prompt Configs
30618
31449
  */
@@ -34333,6 +35164,16 @@ export const MJThemeSchema = z.object({
34333
35164
  * * Display Name: Updated At
34334
35165
  * * SQL Data Type: datetimeoffset
34335
35166
  * * Default Value: getutcdate()`),
35167
+ LoginScreen: z.string().nullable().describe(`
35168
+ * * Field Name: LoginScreen
35169
+ * * Display Name: Login Screen
35170
+ * * SQL Data Type: nvarchar(MAX)
35171
+ * * Description: The published sign-in page design as JSON (the LoginDesign shape from @memberjunction/theme-engine): layout, background, colors and the blocks in each login-screen region. The default Active theme's value is served unauthenticated to draw the Explorer login screen. NULL means the stock login screen.`),
35172
+ LoginScreenDraft: z.string().nullable().describe(`
35173
+ * * Field Name: LoginScreenDraft
35174
+ * * Display Name: Login Screen Draft
35175
+ * * SQL Data Type: nvarchar(MAX)
35176
+ * * Description: The sign-in page design being edited in Login Studio, as JSON in the same shape as LoginScreen. Never served publicly; publishing copies it to LoginScreen. NULL means no draft.`),
34336
35177
  });
34337
35178
  /**
34338
35179
  * zod schema definition for the entity MJ: User Application Entities
@@ -35020,16 +35861,17 @@ export const MJUserRoutineSchema = z.object({
35020
35861
  * * Disabled
35021
35862
  * * Paused
35022
35863
  * * Description: Lifecycle status: Active (eligible to run), Paused (temporarily off), Disabled (off).`),
35023
- RoutineType: z.union([z.literal('Monitoring'), z.literal('Scheduled')]).describe(`
35864
+ RoutineType: z.union([z.literal('AgentWake'), z.literal('Monitoring'), z.literal('Scheduled')]).describe(`
35024
35865
  * * Field Name: RoutineType
35025
35866
  * * Display Name: Routine Type
35026
35867
  * * SQL Data Type: nvarchar(20)
35027
35868
  * * Default Value: Scheduled
35028
35869
  * * Value List Type: List
35029
35870
  * * Possible Values
35871
+ * * AgentWake
35030
35872
  * * Monitoring
35031
35873
  * * Scheduled
35032
- * * Description: Scheduled (always notify per NotifyCondition) or Monitoring (intended for OnChange detection via result hashing).`),
35874
+ * * Description: Scheduled (user cron routine), Monitoring (OnChange detection via result hashing), or AgentWake (autonomous agent self-scheduled wake/monitor entry, hidden from the default user cron list).`),
35033
35875
  TargetType: z.union([z.literal('Action'), z.literal('Agent'), z.literal('Prompt')]).describe(`
35034
35876
  * * Field Name: TargetType
35035
35877
  * * Display Name: Target Type
@@ -35060,11 +35902,11 @@ export const MJUserRoutineSchema = z.object({
35060
35902
  * * Display Name: Requested Skills
35061
35903
  * * SQL Data Type: nvarchar(MAX)
35062
35904
  * * Description: Optional JSON array of MJ: AI Skills IDs to pre-activate when the routine target is an Agent — threaded as ExecuteAgentParams.requestedSkillIDs so the agent starts each scheduled run with the requested skills' instructions and tools in effect (subject to all availability gates; ActivationMode does not gate this explicit-request path). Ignored for Action/Prompt targets.`),
35063
- CronExpression: z.string().describe(`
35905
+ CronExpression: z.string().nullable().describe(`
35064
35906
  * * Field Name: CronExpression
35065
35907
  * * Display Name: Cron Expression
35066
35908
  * * SQL Data Type: nvarchar(100)
35067
- * * Description: Standard cron expression evaluated by the dispatcher to determine when the routine is due.`),
35909
+ * * Description: Standard cron expression evaluated by the dispatcher for Recurring and Adaptive routines. NULL when ScheduleMode is OneShot.`),
35068
35910
  StartAt: z.date().nullable().describe(`
35069
35911
  * * Field Name: StartAt
35070
35912
  * * Display Name: Start At
@@ -35153,6 +35995,28 @@ export const MJUserRoutineSchema = z.object({
35153
35995
  * * SQL Data Type: uniqueidentifier
35154
35996
  * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)
35155
35997
  * * Description: The dedicated conversation this routine's Agent runs append to (created on first conversation-mode run, Application-scoped so it stays out of the default chat list). NULL when the routine has never run in conversation mode.`),
35998
+ ScheduleMode: z.union([z.literal('Adaptive'), z.literal('OneShot'), z.literal('Recurring')]).describe(`
35999
+ * * Field Name: ScheduleMode
36000
+ * * Display Name: Schedule Mode
36001
+ * * SQL Data Type: nvarchar(20)
36002
+ * * Default Value: Recurring
36003
+ * * Value List Type: List
36004
+ * * Possible Values
36005
+ * * Adaptive
36006
+ * * OneShot
36007
+ * * Recurring
36008
+ * * Description: Scheduling mode: Recurring (fixed cron schedule), OneShot (single future wake at NextRunAt, auto-disables after firing unless rescheduled by the agent), or Adaptive (fallback CronExpression combined with agent-set NextRunAt and event/condition wake gates).`),
36009
+ WakeConfiguration: z.any().nullable().describe(`
36010
+ * * Field Name: WakeConfiguration
36011
+ * * Display Name: Wake Configuration
36012
+ * * SQL Data Type: nvarchar(MAX)
36013
+ * * JSON Type: MJUserRoutineEntity_IRoutineWakeConfiguration
36014
+ * * Description: Optional JSON configuration (IRoutineWakeConfiguration) specifying watchedEntities for durable watermark/RecordChange polling and the 3-tier wake gate (Tier 1 SafeExpressionEvaluator, Tier 2 AIDecisionRunner fast decision model, Tier 3 AIPromptRunner metadata prompt).`),
36015
+ LastCheckedAt: z.date().nullable().describe(`
36016
+ * * Field Name: LastCheckedAt
36017
+ * * Display Name: Last Checked At
36018
+ * * SQL Data Type: datetimeoffset
36019
+ * * Description: Timestamp when the dispatcher last evaluated this routine's watched entities and wake gate conditions.`),
35156
36020
  User: z.string().describe(`
35157
36021
  * * Field Name: User
35158
36022
  * * Display Name: User Name
@@ -35613,6 +36477,12 @@ export const MJUserSchema = z.object({
35613
36477
  * * Display Name: User Image Icon Class
35614
36478
  * * SQL Data Type: nvarchar(100)
35615
36479
  * * Description: Font Awesome icon class for user avatar (e.g., "fa-solid fa-user-astronaut"). Used as fallback when UserImageURL is not provided. Example classes: "fa-solid fa-user", "fa-regular fa-circle-user", "fa-solid fa-user-tie".`),
36480
+ IsTemplate: z.boolean().describe(`
36481
+ * * Field Name: IsTemplate
36482
+ * * Display Name: Is Template
36483
+ * * SQL Data Type: bit
36484
+ * * Default Value: 0
36485
+ * * Description: When true, this user is a template: its configuration (pinned apps, views, settings, dashboards, conversations) is copied to new users through the template clone preset or userHandling.newUserTemplate. Template users are for setting things up, not for everyday use; Explorer shows a banner while one is signed in.`),
35616
36486
  FirstLast: z.string().nullable().describe(`
35617
36487
  * * Field Name: FirstLast
35618
36488
  * * Display Name: First Last
@@ -42997,7 +43867,7 @@ let MJAIAgentRunStepEntity = class MJAIAgentRunStepEntity extends BaseEntity {
42997
43867
  * * Field Name: PayloadAtStart
42998
43868
  * * Display Name: Payload At Start
42999
43869
  * * SQL Data Type: nvarchar(MAX)
43000
- * * Description: JSON serialization of the Payload state at the start of this step
43870
+ * * Description: JSON serialization of the Payload state at the start of this step. NULL when PayloadAtStartSourceStepID is set; the starting payload is then the PayloadAtEnd of that step.
43001
43871
  */
43002
43872
  get PayloadAtStart() {
43003
43873
  return this.Get('PayloadAtStart');
@@ -43009,7 +43879,7 @@ let MJAIAgentRunStepEntity = class MJAIAgentRunStepEntity extends BaseEntity {
43009
43879
  * * Field Name: PayloadAtEnd
43010
43880
  * * Display Name: Payload At End
43011
43881
  * * SQL Data Type: nvarchar(MAX)
43012
- * * Description: JSON serialization of the Payload state at the end of this step
43882
+ * * Description: JSON serialization of the Payload state at the end of this step. NULL when PayloadAtEndSourceStepID is set; the ending payload is then the PayloadAtEnd of that step.
43013
43883
  */
43014
43884
  get PayloadAtEnd() {
43015
43885
  return this.Get('PayloadAtEnd');
@@ -43161,6 +44031,32 @@ detailed information about what validation rules failed.
43161
44031
  this.Set('NativeToolResultsSent', value);
43162
44032
  }
43163
44033
  /**
44034
+ * * Field Name: PayloadAtStartSourceStepID
44035
+ * * Display Name: Payload At Start Source Step ID
44036
+ * * SQL Data Type: uniqueidentifier
44037
+ * * Related Entity/Foreign Key: MJ: AI Agent Run Steps (vwAIAgentRunSteps.ID)
44038
+ * * Description: When set, PayloadAtStart is not stored on this row because it equals the PayloadAtEnd of the referenced step in the same run. Read that step's PayloadAtEnd to get this step's starting payload.
44039
+ */
44040
+ get PayloadAtStartSourceStepID() {
44041
+ return this.Get('PayloadAtStartSourceStepID');
44042
+ }
44043
+ set PayloadAtStartSourceStepID(value) {
44044
+ this.Set('PayloadAtStartSourceStepID', value);
44045
+ }
44046
+ /**
44047
+ * * Field Name: PayloadAtEndSourceStepID
44048
+ * * Display Name: Payload At End Source Step ID
44049
+ * * SQL Data Type: uniqueidentifier
44050
+ * * Related Entity/Foreign Key: MJ: AI Agent Run Steps (vwAIAgentRunSteps.ID)
44051
+ * * Description: When set, PayloadAtEnd is not stored on this row because it equals the PayloadAtEnd of the referenced step in the same run. Read that step's PayloadAtEnd to get this step's ending payload.
44052
+ */
44053
+ get PayloadAtEndSourceStepID() {
44054
+ return this.Get('PayloadAtEndSourceStepID');
44055
+ }
44056
+ set PayloadAtEndSourceStepID(value) {
44057
+ this.Set('PayloadAtEndSourceStepID', value);
44058
+ }
44059
+ /**
43164
44060
  * * Field Name: AgentRun
43165
44061
  * * Display Name: Agent Run Context
43166
44062
  * * SQL Data Type: nvarchar(255)
@@ -43177,6 +44073,22 @@ detailed information about what validation rules failed.
43177
44073
  return this.Get('Parent');
43178
44074
  }
43179
44075
  /**
44076
+ * * Field Name: PayloadAtStartSourceStep
44077
+ * * Display Name: Payload At Start Source Step
44078
+ * * SQL Data Type: nvarchar(255)
44079
+ */
44080
+ get PayloadAtStartSourceStep() {
44081
+ return this.Get('PayloadAtStartSourceStep');
44082
+ }
44083
+ /**
44084
+ * * Field Name: PayloadAtEndSourceStep
44085
+ * * Display Name: Payload At End Source Step
44086
+ * * SQL Data Type: nvarchar(255)
44087
+ */
44088
+ get PayloadAtEndSourceStep() {
44089
+ return this.Get('PayloadAtEndSourceStep');
44090
+ }
44091
+ /**
43180
44092
  * * Field Name: RootParentID
43181
44093
  * * Display Name: Root Parent
43182
44094
  * * SQL Data Type: uniqueidentifier
@@ -43478,7 +44390,7 @@ let MJAIAgentRunEntity = class MJAIAgentRunEntity extends BaseEntity {
43478
44390
  * * Field Name: Result
43479
44391
  * * Display Name: Result
43480
44392
  * * SQL Data Type: nvarchar(MAX)
43481
- * * Description: Final result or output from the agent execution, stored as JSON or text
44393
+ * * Description: Deprecated. No longer written by agent runs; use FinalPayload, which holds the same value. Kept for existing rows and external readers.
43482
44394
  */
43483
44395
  get Result() {
43484
44396
  return this.Get('Result');
@@ -45068,6 +45980,210 @@ MJAIAgentSessionChannelEntity = __decorate([
45068
45980
  RegisterClass(BaseEntity, 'MJ: AI Agent Session Channels')
45069
45981
  ], MJAIAgentSessionChannelEntity);
45070
45982
  export { MJAIAgentSessionChannelEntity };
45983
+ /**
45984
+ * MJ: AI Agent Session Recording Shards - strongly typed entity sub-class
45985
+ * * Schema: __mj
45986
+ * * Base Table: AIAgentSessionRecordingShard
45987
+ * * Base View: vwAIAgentSessionRecordingShards
45988
+ * * @description One 5-second Opus recording shard (MJOPUS1 format) uploaded by the browser during a client-direct realtime call, staged here until the server assembles the session recording. Deleted once the recording is Complete, or by the session janitor after its lookback window.
45989
+ * * Primary Key: ID
45990
+ * @extends {BaseEntity}
45991
+ * @class
45992
+ * @public
45993
+ */
45994
+ let MJAIAgentSessionRecordingShardEntity = class MJAIAgentSessionRecordingShardEntity extends BaseEntity {
45995
+ /**
45996
+ * Loads the MJ: AI Agent Session Recording Shards record from the database
45997
+ * @param ID: string - primary key value to load the MJ: AI Agent Session Recording Shards record.
45998
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
45999
+ * @returns {Promise<boolean>} - true if successful, false otherwise
46000
+ * @public
46001
+ * @async
46002
+ * @memberof MJAIAgentSessionRecordingShardEntity
46003
+ * @method
46004
+ * @override
46005
+ */
46006
+ async Load(ID, EntityRelationshipsToLoad) {
46007
+ const compositeKey = new CompositeKey();
46008
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
46009
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
46010
+ }
46011
+ /**
46012
+ * Validate() method override for MJ: AI Agent Session Recording Shards entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
46013
+ * * Index: The index must be zero or a positive number.
46014
+ * * Table-Level: Start sample, sample count, and byte count must each be zero or greater to ensure recording data measurements are valid and non-negative.
46015
+ * @public
46016
+ * @method
46017
+ * @override
46018
+ */
46019
+ Validate() {
46020
+ const result = super.Validate();
46021
+ this.ValidateIndexNonNegative(result);
46022
+ this.ValidateStartSampleSampleCountAndBytesNonNegative(result);
46023
+ result.Success = result.Success && (result.Errors.length === 0);
46024
+ return result;
46025
+ }
46026
+ /**
46027
+ * The index must be zero or a positive number.
46028
+ * @param result - the ValidationResult object to add any errors or warnings to
46029
+ * @public
46030
+ * @method
46031
+ */
46032
+ ValidateIndexNonNegative(result) {
46033
+ if (this.Index != null && this.Index < 0) {
46034
+ result.Errors.push(new ValidationErrorInfo("Index", "Index must be greater than or equal to 0.", this.Index, ValidationErrorType.Failure));
46035
+ }
46036
+ }
46037
+ /**
46038
+ * Start sample, sample count, and byte count must each be zero or greater to ensure recording data measurements are valid and non-negative.
46039
+ * @param result - the ValidationResult object to add any errors or warnings to
46040
+ * @public
46041
+ * @method
46042
+ */
46043
+ ValidateStartSampleSampleCountAndBytesNonNegative(result) {
46044
+ if (this.StartSample != null && this.StartSample < 0) {
46045
+ result.Errors.push(new ValidationErrorInfo("StartSample", "Start sample must be greater than or equal to 0.", this.StartSample, ValidationErrorType.Failure));
46046
+ }
46047
+ if (this.SampleCount != null && this.SampleCount < 0) {
46048
+ result.Errors.push(new ValidationErrorInfo("SampleCount", "Sample count must be greater than or equal to 0.", this.SampleCount, ValidationErrorType.Failure));
46049
+ }
46050
+ if (this.Bytes != null && this.Bytes < 0) {
46051
+ result.Errors.push(new ValidationErrorInfo("Bytes", "Bytes must be greater than or equal to 0.", this.Bytes, ValidationErrorType.Failure));
46052
+ }
46053
+ }
46054
+ /**
46055
+ * * Field Name: ID
46056
+ * * Display Name: ID
46057
+ * * SQL Data Type: uniqueidentifier
46058
+ * * Default Value: newsequentialid()
46059
+ */
46060
+ get ID() {
46061
+ return this.Get('ID');
46062
+ }
46063
+ set ID(value) {
46064
+ this.Set('ID', value);
46065
+ }
46066
+ /**
46067
+ * * Field Name: AgentSessionID
46068
+ * * Display Name: Agent Session
46069
+ * * SQL Data Type: uniqueidentifier
46070
+ * * Related Entity/Foreign Key: MJ: AI Agent Sessions (vwAIAgentSessions.ID)
46071
+ */
46072
+ get AgentSessionID() {
46073
+ return this.Get('AgentSessionID');
46074
+ }
46075
+ set AgentSessionID(value) {
46076
+ this.Set('AgentSessionID', value);
46077
+ }
46078
+ /**
46079
+ * * Field Name: Index
46080
+ * * Display Name: Index
46081
+ * * SQL Data Type: int
46082
+ * * Description: Zero-based position of the shard in the recording. Unique per session; a retry of the same index with the same bytes is acknowledged, with different bytes it is refused.
46083
+ */
46084
+ get Index() {
46085
+ return this.Get('Index');
46086
+ }
46087
+ set Index(value) {
46088
+ this.Set('Index', value);
46089
+ }
46090
+ /**
46091
+ * * Field Name: StartSample
46092
+ * * Display Name: Start Sample
46093
+ * * SQL Data Type: bigint
46094
+ * * Description: Sample position (48 kHz) where this shard's audio starts in the recording.
46095
+ */
46096
+ get StartSample() {
46097
+ return this.Get('StartSample');
46098
+ }
46099
+ set StartSample(value) {
46100
+ this.Set('StartSample', value);
46101
+ }
46102
+ /**
46103
+ * * Field Name: SampleCount
46104
+ * * Display Name: Sample Count
46105
+ * * SQL Data Type: int
46106
+ * * Description: Number of audio samples (48 kHz) the shard covers.
46107
+ */
46108
+ get SampleCount() {
46109
+ return this.Get('SampleCount');
46110
+ }
46111
+ set SampleCount(value) {
46112
+ this.Set('SampleCount', value);
46113
+ }
46114
+ /**
46115
+ * * Field Name: Bytes
46116
+ * * Display Name: Bytes
46117
+ * * SQL Data Type: int
46118
+ * * Description: Size of Data in bytes.
46119
+ */
46120
+ get Bytes() {
46121
+ return this.Get('Bytes');
46122
+ }
46123
+ set Bytes(value) {
46124
+ this.Set('Bytes', value);
46125
+ }
46126
+ /**
46127
+ * * Field Name: Sha256
46128
+ * * Display Name: SHA-256
46129
+ * * SQL Data Type: nvarchar(64)
46130
+ * * Description: Lowercase hex SHA-256 of Data; decides whether a repeated upload of the same index is a retry or a conflict.
46131
+ */
46132
+ get Sha256() {
46133
+ return this.Get('Sha256');
46134
+ }
46135
+ set Sha256(value) {
46136
+ this.Set('Sha256', value);
46137
+ }
46138
+ /**
46139
+ * * Field Name: Data
46140
+ * * Display Name: Data
46141
+ * * SQL Data Type: varbinary(MAX)
46142
+ * * Binary Value: base64-encoded string. Decode with Base64ToBytes() — or Base64ToFloat32Vector() for an embedding — from @memberjunction/global.
46143
+ * * Description: The shard bytes as uploaded (MJOPUS1 header followed by length-prefixed Opus packets).
46144
+ */
46145
+ get Data() {
46146
+ return this.Get('Data');
46147
+ }
46148
+ set Data(value) {
46149
+ this.Set('Data', value);
46150
+ }
46151
+ /**
46152
+ * * Field Name: ReceivedAt
46153
+ * * Display Name: Received At
46154
+ * * SQL Data Type: datetimeoffset
46155
+ * * Default Value: sysdatetimeoffset()
46156
+ * * Description: When the server first stored this shard.
46157
+ */
46158
+ get ReceivedAt() {
46159
+ return this.Get('ReceivedAt');
46160
+ }
46161
+ set ReceivedAt(value) {
46162
+ this.Set('ReceivedAt', value);
46163
+ }
46164
+ /**
46165
+ * * Field Name: __mj_CreatedAt
46166
+ * * Display Name: Created At
46167
+ * * SQL Data Type: datetimeoffset
46168
+ * * Default Value: getutcdate()
46169
+ */
46170
+ get __mj_CreatedAt() {
46171
+ return this.Get('__mj_CreatedAt');
46172
+ }
46173
+ /**
46174
+ * * Field Name: __mj_UpdatedAt
46175
+ * * Display Name: Updated At
46176
+ * * SQL Data Type: datetimeoffset
46177
+ * * Default Value: getutcdate()
46178
+ */
46179
+ get __mj_UpdatedAt() {
46180
+ return this.Get('__mj_UpdatedAt');
46181
+ }
46182
+ };
46183
+ MJAIAgentSessionRecordingShardEntity = __decorate([
46184
+ RegisterClass(BaseEntity, 'MJ: AI Agent Session Recording Shards')
46185
+ ], MJAIAgentSessionRecordingShardEntity);
46186
+ export { MJAIAgentSessionRecordingShardEntity };
45071
46187
  /**
45072
46188
  * MJ: AI Agent Sessions - strongly typed entity sub-class
45073
46189
  * * Schema: __mj
@@ -45352,6 +46468,74 @@ let MJAIAgentSessionEntity = class MJAIAgentSessionEntity extends BaseEntity {
45352
46468
  this.Set('LinkedRecordID', value);
45353
46469
  }
45354
46470
  /**
46471
+ * * Field Name: RecordingStatus
46472
+ * * Display Name: Recording Status
46473
+ * * SQL Data Type: nvarchar(20)
46474
+ * * Value List Type: List
46475
+ * * Possible Values
46476
+ * * Assembling
46477
+ * * Complete
46478
+ * * Failed
46479
+ * * Partial
46480
+ * * Pending
46481
+ * * Description: State of the server-side recording assembly for a client-direct session recorded as Opus shards: Pending (shards or a terminal signal are waiting to be assembled), Assembling (claimed by one server instance), Complete (recording.wav holds every captured sample), Partial (assembled with silent gaps, listed in RecordingGaps), Failed (a shard conflict or an assembly error needs a human). NULL when the session was not recorded this way.
46482
+ */
46483
+ get RecordingStatus() {
46484
+ return this.Get('RecordingStatus');
46485
+ }
46486
+ set RecordingStatus(value) {
46487
+ this.Set('RecordingStatus', value);
46488
+ }
46489
+ /**
46490
+ * * Field Name: RecordingExpectedShards
46491
+ * * Display Name: Expected Shards
46492
+ * * SQL Data Type: int
46493
+ * * Description: Number of recording shards the browser reported in its terminal signal (last shard index + 1). NULL until a terminal signal arrives.
46494
+ */
46495
+ get RecordingExpectedShards() {
46496
+ return this.Get('RecordingExpectedShards');
46497
+ }
46498
+ set RecordingExpectedShards(value) {
46499
+ this.Set('RecordingExpectedShards', value);
46500
+ }
46501
+ /**
46502
+ * * Field Name: RecordingCapturedSamples
46503
+ * * Display Name: Captured Samples
46504
+ * * SQL Data Type: bigint
46505
+ * * Description: Total audio samples (48 kHz mono) the browser captured, from its terminal signal. The assembled recording.wav is exactly this long. NULL until a terminal signal arrives.
46506
+ */
46507
+ get RecordingCapturedSamples() {
46508
+ return this.Get('RecordingCapturedSamples');
46509
+ }
46510
+ set RecordingCapturedSamples(value) {
46511
+ this.Set('RecordingCapturedSamples', value);
46512
+ }
46513
+ /**
46514
+ * * Field Name: RecordingGaps
46515
+ * * Display Name: Recording Gaps
46516
+ * * SQL Data Type: nvarchar(MAX)
46517
+ * * Description: JSON array of the silent gaps in a Partial recording: [{startSample, sampleCount, indexes}], sample positions at 48 kHz and the shard indexes that were missing. Empty or NULL when nothing is missing.
46518
+ */
46519
+ get RecordingGaps() {
46520
+ return this.Get('RecordingGaps');
46521
+ }
46522
+ set RecordingGaps(value) {
46523
+ this.Set('RecordingGaps', value);
46524
+ }
46525
+ /**
46526
+ * * Field Name: RecordingAssemblyVersion
46527
+ * * Display Name: Assembly Version
46528
+ * * SQL Data Type: int
46529
+ * * Default Value: 0
46530
+ * * Description: Incremented by every assembly claim. The assembler finishes only if the version is still the one it claimed, so a newer assembly always wins over a slower older one.
46531
+ */
46532
+ get RecordingAssemblyVersion() {
46533
+ return this.Get('RecordingAssemblyVersion');
46534
+ }
46535
+ set RecordingAssemblyVersion(value) {
46536
+ this.Set('RecordingAssemblyVersion', value);
46537
+ }
46538
+ /**
45355
46539
  * * Field Name: Agent
45356
46540
  * * Display Name: Agent
45357
46541
  * * SQL Data Type: nvarchar(255)
@@ -46544,6 +47728,433 @@ MJAIAgentTypeEntity = __decorate([
46544
47728
  RegisterClass(BaseEntity, 'MJ: AI Agent Types')
46545
47729
  ], MJAIAgentTypeEntity);
46546
47730
  export { MJAIAgentTypeEntity };
47731
+ /**
47732
+ * MJ: AI Agent User Policies - strongly typed entity sub-class
47733
+ * * Schema: __mj
47734
+ * * Base Table: AIAgentUserPolicy
47735
+ * * Base View: vwAIAgentUserPolicies
47736
+ * * @description Per-(Agent, User) policy and personalization record. The owning user's MJ permissions (Entity CRUD, Role RLS, Role FLS) form the hard ceiling; this table defines strict narrowing rules, channel modes, time windows, and approval gates.
47737
+ * * Primary Key: ID
47738
+ * @extends {BaseEntity}
47739
+ * @class
47740
+ * @public
47741
+ */
47742
+ let MJAIAgentUserPolicyEntity = class MJAIAgentUserPolicyEntity extends BaseEntity {
47743
+ /**
47744
+ * Loads the MJ: AI Agent User Policies record from the database
47745
+ * @param ID: string - primary key value to load the MJ: AI Agent User Policies record.
47746
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
47747
+ * @returns {Promise<boolean>} - true if successful, false otherwise
47748
+ * @public
47749
+ * @async
47750
+ * @memberof MJAIAgentUserPolicyEntity
47751
+ * @method
47752
+ * @override
47753
+ */
47754
+ async Load(ID, EntityRelationshipsToLoad) {
47755
+ const compositeKey = new CompositeKey();
47756
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
47757
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
47758
+ }
47759
+ /**
47760
+ * * Field Name: ID
47761
+ * * Display Name: ID
47762
+ * * SQL Data Type: uniqueidentifier
47763
+ * * Default Value: newsequentialid()
47764
+ */
47765
+ get ID() {
47766
+ return this.Get('ID');
47767
+ }
47768
+ set ID(value) {
47769
+ this.Set('ID', value);
47770
+ }
47771
+ /**
47772
+ * * Field Name: AgentID
47773
+ * * Display Name: Agent
47774
+ * * SQL Data Type: uniqueidentifier
47775
+ * * Related Entity/Foreign Key: MJ: AI Agents (vwAIAgents.ID)
47776
+ * * Description: The AI Agent governed by this user policy.
47777
+ */
47778
+ get AgentID() {
47779
+ return this.Get('AgentID');
47780
+ }
47781
+ set AgentID(value) {
47782
+ this.Set('AgentID', value);
47783
+ }
47784
+ /**
47785
+ * * Field Name: UserID
47786
+ * * Display Name: User
47787
+ * * SQL Data Type: uniqueidentifier
47788
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
47789
+ * * Description: The MJ User who owns this policy and under whose security principal the agent executes.
47790
+ */
47791
+ get UserID() {
47792
+ return this.Get('UserID');
47793
+ }
47794
+ set UserID(value) {
47795
+ this.Set('UserID', value);
47796
+ }
47797
+ /**
47798
+ * * Field Name: DisplayNameOverride
47799
+ * * Display Name: Display Name Override
47800
+ * * SQL Data Type: nvarchar(100)
47801
+ * * Description: Optional user-personalized display name for this agent (e.g., "Maya" for a user's Chief of Staff).
47802
+ */
47803
+ get DisplayNameOverride() {
47804
+ return this.Get('DisplayNameOverride');
47805
+ }
47806
+ set DisplayNameOverride(value) {
47807
+ this.Set('DisplayNameOverride', value);
47808
+ }
47809
+ /**
47810
+ * * Field Name: PreferredPersonaID
47811
+ * * Display Name: Preferred Persona
47812
+ * * SQL Data Type: uniqueidentifier
47813
+ * * Related Entity/Foreign Key: MJ: AI Personas (vwAIPersonas.ID)
47814
+ * * Description: Optional AI Persona selected by the user for this agent's voice and communication style.
47815
+ */
47816
+ get PreferredPersonaID() {
47817
+ return this.Get('PreferredPersonaID');
47818
+ }
47819
+ set PreferredPersonaID(value) {
47820
+ this.Set('PreferredPersonaID', value);
47821
+ }
47822
+ /**
47823
+ * * Field Name: Status
47824
+ * * Display Name: Status
47825
+ * * SQL Data Type: nvarchar(20)
47826
+ * * Default Value: Active
47827
+ * * Value List Type: List
47828
+ * * Possible Values
47829
+ * * Active
47830
+ * * Disabled
47831
+ * * Paused
47832
+ * * Description: Policy lifecycle status: Active, Paused (autonomous wakes suspended), or Disabled.
47833
+ */
47834
+ get Status() {
47835
+ return this.Get('Status');
47836
+ }
47837
+ set Status(value) {
47838
+ this.Set('Status', value);
47839
+ }
47840
+ /**
47841
+ * * Field Name: OnboardingStatus
47842
+ * * Display Name: Onboarding Status
47843
+ * * SQL Data Type: nvarchar(20)
47844
+ * * Default Value: NotStarted
47845
+ * * Value List Type: List
47846
+ * * Possible Values
47847
+ * * Completed
47848
+ * * InProgress
47849
+ * * NotStarted
47850
+ * * Description: Onboarding progression for this user-agent pair: NotStarted, InProgress, or Completed.
47851
+ */
47852
+ get OnboardingStatus() {
47853
+ return this.Get('OnboardingStatus');
47854
+ }
47855
+ set OnboardingStatus(value) {
47856
+ this.Set('OnboardingStatus', value);
47857
+ }
47858
+ /**
47859
+ * * Field Name: OnboardedAt
47860
+ * * Display Name: Onboarded At
47861
+ * * SQL Data Type: datetimeoffset
47862
+ * * Description: Timestamp when the user completed onboarding for this agent.
47863
+ */
47864
+ get OnboardedAt() {
47865
+ return this.Get('OnboardedAt');
47866
+ }
47867
+ set OnboardedAt(value) {
47868
+ this.Set('OnboardedAt', value);
47869
+ }
47870
+ /**
47871
+ * * Field Name: CoordinationMode
47872
+ * * Display Name: Coordination Mode
47873
+ * * SQL Data Type: nvarchar(20)
47874
+ * * Default Value: Observer
47875
+ * * Value List Type: List
47876
+ * * Possible Values
47877
+ * * Autonomous
47878
+ * * Coordinator
47879
+ * * Observer
47880
+ * * Description: Operating posture: Observer (tracks and reports only; never nudges others), Coordinator (nudges internal task/priority owners and peer CoS agents), or Autonomous (proactively coordinates within approval boundaries).
47881
+ */
47882
+ get CoordinationMode() {
47883
+ return this.Get('CoordinationMode');
47884
+ }
47885
+ set CoordinationMode(value) {
47886
+ this.Set('CoordinationMode', value);
47887
+ }
47888
+ /**
47889
+ * * Field Name: DefaultDataAccessMode
47890
+ * * Display Name: Default Data Access Mode
47891
+ * * SQL Data Type: nvarchar(20)
47892
+ * * Default Value: UserCeiling
47893
+ * * Value List Type: List
47894
+ * * Possible Values
47895
+ * * AllowListOnly
47896
+ * * ReadOnly
47897
+ * * UserCeiling
47898
+ * * Description: Default entity access ceiling when no explicit rule in EntityAccessRules matches: UserCeiling (inherit user's MJ permissions), ReadOnly (read permitted entities, block all writes unless explicitly allowed), or AllowListOnly (deny all entities not listed in EntityAccessRules).
47899
+ */
47900
+ get DefaultDataAccessMode() {
47901
+ return this.Get('DefaultDataAccessMode');
47902
+ }
47903
+ set DefaultDataAccessMode(value) {
47904
+ this.Set('DefaultDataAccessMode', value);
47905
+ }
47906
+ /**
47907
+ * * Field Name: EmailChannelMode
47908
+ * * Display Name: Email Channel Mode
47909
+ * * SQL Data Type: nvarchar(20)
47910
+ * * Default Value: DraftOnly
47911
+ * * Value List Type: List
47912
+ * * Possible Values
47913
+ * * Disabled
47914
+ * * DraftOnly
47915
+ * * ReadOnly
47916
+ * * SendAsAgent
47917
+ * * SendAsUser
47918
+ * * Description: Email channel permission level: Disabled, ReadOnly, DraftOnly, SendAsAgent, or SendAsUser.
47919
+ */
47920
+ get EmailChannelMode() {
47921
+ return this.Get('EmailChannelMode');
47922
+ }
47923
+ set EmailChannelMode(value) {
47924
+ this.Set('EmailChannelMode', value);
47925
+ }
47926
+ /**
47927
+ * * Field Name: PhoneChannelMode
47928
+ * * Display Name: Phone Channel Mode
47929
+ * * SQL Data Type: nvarchar(20)
47930
+ * * Default Value: InboundOnly
47931
+ * * Value List Type: List
47932
+ * * Possible Values
47933
+ * * Disabled
47934
+ * * InboundOnly
47935
+ * * OutboundAutonomous
47936
+ * * OutboundWithApproval
47937
+ * * Description: Telephony channel permission level: Disabled, InboundOnly, OutboundWithApproval, or OutboundAutonomous.
47938
+ */
47939
+ get PhoneChannelMode() {
47940
+ return this.Get('PhoneChannelMode');
47941
+ }
47942
+ set PhoneChannelMode(value) {
47943
+ this.Set('PhoneChannelMode', value);
47944
+ }
47945
+ /**
47946
+ * * Field Name: MessagingChannelMode
47947
+ * * Display Name: Messaging Channel Mode
47948
+ * * SQL Data Type: nvarchar(20)
47949
+ * * Default Value: Enabled
47950
+ * * Value List Type: List
47951
+ * * Possible Values
47952
+ * * Disabled
47953
+ * * Enabled
47954
+ * * Description: Messaging channel permission level (Slack/Teams/In-App): Disabled or Enabled.
47955
+ */
47956
+ get MessagingChannelMode() {
47957
+ return this.Get('MessagingChannelMode');
47958
+ }
47959
+ set MessagingChannelMode(value) {
47960
+ this.Set('MessagingChannelMode', value);
47961
+ }
47962
+ /**
47963
+ * * Field Name: CalendarChannelMode
47964
+ * * Display Name: Calendar Channel Mode
47965
+ * * SQL Data Type: nvarchar(30)
47966
+ * * Default Value: ReadOnly
47967
+ * * Value List Type: List
47968
+ * * Possible Values
47969
+ * * Autonomous
47970
+ * * Disabled
47971
+ * * ProposeWithApproval
47972
+ * * ReadOnly
47973
+ * * Description: Calendar channel permission level: Disabled, ReadOnly (check events & free/busy only), ProposeWithApproval (create/modify events or send invites only with explicit user approval), or Autonomous.
47974
+ */
47975
+ get CalendarChannelMode() {
47976
+ return this.Get('CalendarChannelMode');
47977
+ }
47978
+ set CalendarChannelMode(value) {
47979
+ this.Set('CalendarChannelMode', value);
47980
+ }
47981
+ /**
47982
+ * * Field Name: AllowInterAgentCoordination
47983
+ * * Display Name: Allow Inter-Agent Coordination
47984
+ * * SQL Data Type: bit
47985
+ * * Default Value: 1
47986
+ * * Description: Whether this user's agent may send or respond to structured coordination requests from other users' Chief of Staff agents.
47987
+ */
47988
+ get AllowInterAgentCoordination() {
47989
+ return this.Get('AllowInterAgentCoordination');
47990
+ }
47991
+ set AllowInterAgentCoordination(value) {
47992
+ this.Set('AllowInterAgentCoordination', value);
47993
+ }
47994
+ /**
47995
+ * * Field Name: RequireApprovalForExternalComms
47996
+ * * Display Name: Require Approval For External Comms
47997
+ * * SQL Data Type: bit
47998
+ * * Default Value: 1
47999
+ * * Description: When 1, any external email, message, or outbound call to non-internal recipients requires explicit user approval via AIAgentRequest.
48000
+ */
48001
+ get RequireApprovalForExternalComms() {
48002
+ return this.Get('RequireApprovalForExternalComms');
48003
+ }
48004
+ set RequireApprovalForExternalComms(value) {
48005
+ this.Set('RequireApprovalForExternalComms', value);
48006
+ }
48007
+ /**
48008
+ * * Field Name: RequireApprovalForFinancials
48009
+ * * Display Name: Require Approval For Financials
48010
+ * * SQL Data Type: bit
48011
+ * * Default Value: 1
48012
+ * * Description: When 1, financial commitments, purchases, or accounting/order approvals require explicit user approval.
48013
+ */
48014
+ get RequireApprovalForFinancials() {
48015
+ return this.Get('RequireApprovalForFinancials');
48016
+ }
48017
+ set RequireApprovalForFinancials(value) {
48018
+ this.Set('RequireApprovalForFinancials', value);
48019
+ }
48020
+ /**
48021
+ * * Field Name: RequireApprovalForDestructiveActions
48022
+ * * Display Name: Require Approval For Destructive Actions
48023
+ * * SQL Data Type: bit
48024
+ * * Default Value: 1
48025
+ * * Description: When 1, deleting records or cancelling active workflows requires explicit user approval.
48026
+ */
48027
+ get RequireApprovalForDestructiveActions() {
48028
+ return this.Get('RequireApprovalForDestructiveActions');
48029
+ }
48030
+ set RequireApprovalForDestructiveActions(value) {
48031
+ this.Set('RequireApprovalForDestructiveActions', value);
48032
+ }
48033
+ /**
48034
+ * * Field Name: AutoApproveAmountThreshold
48035
+ * * Display Name: Auto Approve Amount Threshold
48036
+ * * SQL Data Type: decimal(18, 2)
48037
+ * * Description: Optional monetary threshold below which low-risk financial actions may proceed when RequireApprovalForFinancials is 0. NULL means no automatic monetary threshold.
48038
+ */
48039
+ get AutoApproveAmountThreshold() {
48040
+ return this.Get('AutoApproveAmountThreshold');
48041
+ }
48042
+ set AutoApproveAmountThreshold(value) {
48043
+ this.Set('AutoApproveAmountThreshold', value);
48044
+ }
48045
+ /**
48046
+ * * Field Name: EntityAccessRules
48047
+ * * Display Name: Entity Access Rules
48048
+ * * SQL Data Type: nvarchar(MAX)
48049
+ * * JSON Type: Array<MJAIAgentUserPolicyEntity_IAgentUserEntityAccessRule>
48050
+ * * Description: JSON array of IAgentUserEntityAccessRule objects defining per-entity or wildcard CRUD narrowing, additional Row-Level Security (RLS) filters, additional Field-Level Security (FLS) field masks, and allowed time windows.
48051
+ */
48052
+ get EntityAccessRules() {
48053
+ return this.Get('EntityAccessRules');
48054
+ }
48055
+ set EntityAccessRules(value) {
48056
+ this.Set('EntityAccessRules', value);
48057
+ }
48058
+ /**
48059
+ * Typed accessor for EntityAccessRules — a live view of the parsed JSON as Array<MJAIAgentUserPolicyEntity_IAgentUserEntityAccessRule>.
48060
+ * Edits made through it, at any depth (`obj.a.b = 1`, `arr.push(x)`, `delete obj.k`), update the
48061
+ * underlying EntityAccessRules field, so it becomes dirty and Save() persists them. If the raw value changes by
48062
+ * any other route (Load, Set, revert) the next read re-parses, and objects obtained earlier are
48063
+ * detached: writing through one throws. To clone, structuredClone or postMessage the value use
48064
+ * ToPlainJSON() from @memberjunction/core.
48065
+ */
48066
+ get EntityAccessRulesObject() {
48067
+ return this.GetJSONFieldObject('EntityAccessRules');
48068
+ }
48069
+ set EntityAccessRulesObject(value) {
48070
+ this.SetJSONFieldObject('EntityAccessRules', value);
48071
+ }
48072
+ /**
48073
+ * * Field Name: ActionPolicyRules
48074
+ * * Display Name: Action Policy Rules
48075
+ * * SQL Data Type: nvarchar(MAX)
48076
+ * * JSON Type: Array<MJAIAgentUserPolicyEntity_IAgentUserActionPolicyRule>
48077
+ * * Description: JSON array of IAgentUserActionPolicyRule objects defining per-action Allow/RequireApproval/Deny policies, SafeExpressionEvaluator parameter conditions, and allowed time windows.
48078
+ */
48079
+ get ActionPolicyRules() {
48080
+ return this.Get('ActionPolicyRules');
48081
+ }
48082
+ set ActionPolicyRules(value) {
48083
+ this.Set('ActionPolicyRules', value);
48084
+ }
48085
+ /**
48086
+ * Typed accessor for ActionPolicyRules — a live view of the parsed JSON as Array<MJAIAgentUserPolicyEntity_IAgentUserActionPolicyRule>.
48087
+ * Edits made through it, at any depth (`obj.a.b = 1`, `arr.push(x)`, `delete obj.k`), update the
48088
+ * underlying ActionPolicyRules field, so it becomes dirty and Save() persists them. If the raw value changes by
48089
+ * any other route (Load, Set, revert) the next read re-parses, and objects obtained earlier are
48090
+ * detached: writing through one throws. To clone, structuredClone or postMessage the value use
48091
+ * ToPlainJSON() from @memberjunction/core.
48092
+ */
48093
+ get ActionPolicyRulesObject() {
48094
+ return this.GetJSONFieldObject('ActionPolicyRules');
48095
+ }
48096
+ set ActionPolicyRulesObject(value) {
48097
+ this.SetJSONFieldObject('ActionPolicyRules', value);
48098
+ }
48099
+ /**
48100
+ * * Field Name: InstructionsOverride
48101
+ * * Display Name: Instructions Override
48102
+ * * SQL Data Type: nvarchar(MAX)
48103
+ * * Description: Optional user-specific standing instructions injected into the agent's system context on every run.
48104
+ */
48105
+ get InstructionsOverride() {
48106
+ return this.Get('InstructionsOverride');
48107
+ }
48108
+ set InstructionsOverride(value) {
48109
+ this.Set('InstructionsOverride', value);
48110
+ }
48111
+ /**
48112
+ * * Field Name: __mj_CreatedAt
48113
+ * * Display Name: Created At
48114
+ * * SQL Data Type: datetimeoffset
48115
+ * * Default Value: getutcdate()
48116
+ */
48117
+ get __mj_CreatedAt() {
48118
+ return this.Get('__mj_CreatedAt');
48119
+ }
48120
+ /**
48121
+ * * Field Name: __mj_UpdatedAt
48122
+ * * Display Name: Updated At
48123
+ * * SQL Data Type: datetimeoffset
48124
+ * * Default Value: getutcdate()
48125
+ */
48126
+ get __mj_UpdatedAt() {
48127
+ return this.Get('__mj_UpdatedAt');
48128
+ }
48129
+ /**
48130
+ * * Field Name: Agent
48131
+ * * Display Name: Agent Name
48132
+ * * SQL Data Type: nvarchar(255)
48133
+ */
48134
+ get Agent() {
48135
+ return this.Get('Agent');
48136
+ }
48137
+ /**
48138
+ * * Field Name: User
48139
+ * * Display Name: User Name
48140
+ * * SQL Data Type: nvarchar(100)
48141
+ */
48142
+ get User() {
48143
+ return this.Get('User');
48144
+ }
48145
+ /**
48146
+ * * Field Name: PreferredPersona
48147
+ * * Display Name: Preferred Persona Name
48148
+ * * SQL Data Type: nvarchar(100)
48149
+ */
48150
+ get PreferredPersona() {
48151
+ return this.Get('PreferredPersona');
48152
+ }
48153
+ };
48154
+ MJAIAgentUserPolicyEntity = __decorate([
48155
+ RegisterClass(BaseEntity, 'MJ: AI Agent User Policies')
48156
+ ], MJAIAgentUserPolicyEntity);
48157
+ export { MJAIAgentUserPolicyEntity };
46547
48158
  /**
46548
48159
  * MJ: AI Agents - strongly typed entity sub-class
46549
48160
  * * Schema: __mj
@@ -48405,6 +50016,19 @@ let MJAIBridgeAgentIdentityEntity = class MJAIBridgeAgentIdentityEntity extends
48405
50016
  return this.Get('__mj_UpdatedAt');
48406
50017
  }
48407
50018
  /**
50019
+ * * Field Name: UserID
50020
+ * * Display Name: User
50021
+ * * SQL Data Type: uniqueidentifier
50022
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
50023
+ * * Description: Optional owning MJ User when this email address, phone DID, or platform account identity is dedicated to a specific user's personal agent instance (such as their Chief of Staff). NULL for shared/org-wide agent identities.
50024
+ */
50025
+ get UserID() {
50026
+ return this.Get('UserID');
50027
+ }
50028
+ set UserID(value) {
50029
+ this.Set('UserID', value);
50030
+ }
50031
+ /**
48408
50032
  * * Field Name: Agent
48409
50033
  * * Display Name: Agent Name
48410
50034
  * * SQL Data Type: nvarchar(255)
@@ -48420,6 +50044,14 @@ let MJAIBridgeAgentIdentityEntity = class MJAIBridgeAgentIdentityEntity extends
48420
50044
  get Provider() {
48421
50045
  return this.Get('Provider');
48422
50046
  }
50047
+ /**
50048
+ * * Field Name: User
50049
+ * * Display Name: User Name
50050
+ * * SQL Data Type: nvarchar(100)
50051
+ */
50052
+ get User() {
50053
+ return this.Get('User');
50054
+ }
48423
50055
  };
48424
50056
  MJAIBridgeAgentIdentityEntity = __decorate([
48425
50057
  RegisterClass(BaseEntity, 'MJ: AI Bridge Agent Identities')
@@ -55662,6 +57294,23 @@ let MJAIPromptEntity = class MJAIPromptEntity extends BaseEntity {
55662
57294
  this.SetJSONFieldObject('PromptConfiguration', value);
55663
57295
  }
55664
57296
  /**
57297
+ * * Field Name: TemplateDataCapture
57298
+ * * Display Name: Template Data Capture
57299
+ * * SQL Data Type: nvarchar(20)
57300
+ * * Value List Type: List
57301
+ * * Possible Values
57302
+ * * Full
57303
+ * * None
57304
+ * * Referenced
57305
+ * * Description: Which template inputs (data, templateData) prompt runs store in Messages: None (shape only), Referenced (only keys the template uses) or Full. NULL uses the server default.
57306
+ */
57307
+ get TemplateDataCapture() {
57308
+ return this.Get('TemplateDataCapture');
57309
+ }
57310
+ set TemplateDataCapture(value) {
57311
+ this.Set('TemplateDataCapture', value);
57312
+ }
57313
+ /**
55665
57314
  * * Field Name: Template
55666
57315
  * * Display Name: Template Text
55667
57316
  * * SQL Data Type: nvarchar(255)
@@ -60071,6 +61720,33 @@ let MJActionParamEntity = class MJActionParamEntity extends BaseEntity {
60071
61720
  this.Set('LogValue', value);
60072
61721
  }
60073
61722
  /**
61723
+ * * Field Name: ValueSchema
61724
+ * * Display Name: Value Schema
61725
+ * * SQL Data Type: nvarchar(MAX)
61726
+ * * JSON Type: MJActionParamEntity_IActionParamValueSchema
61727
+ * * Description: Optional JSON Schema fragment describing this parameter's value, limited to the cross-provider subset: type, description, enum, items, properties and required. When set, the native tool builder declares it to the model in place of the coarse ValueType mapping, and argument coercion follows it. For an IsArray parameter it describes one element. When NULL, the schema is derived from ValueType.
61728
+ */
61729
+ get ValueSchema() {
61730
+ return this.Get('ValueSchema');
61731
+ }
61732
+ set ValueSchema(value) {
61733
+ this.Set('ValueSchema', value);
61734
+ }
61735
+ /**
61736
+ * Typed accessor for ValueSchema — a live view of the parsed JSON as MJActionParamEntity_IActionParamValueSchema.
61737
+ * Edits made through it, at any depth (`obj.a.b = 1`, `arr.push(x)`, `delete obj.k`), update the
61738
+ * underlying ValueSchema field, so it becomes dirty and Save() persists them. If the raw value changes by
61739
+ * any other route (Load, Set, revert) the next read re-parses, and objects obtained earlier are
61740
+ * detached: writing through one throws. To clone, structuredClone or postMessage the value use
61741
+ * ToPlainJSON() from @memberjunction/core.
61742
+ */
61743
+ get ValueSchemaObject() {
61744
+ return this.GetJSONFieldObject('ValueSchema');
61745
+ }
61746
+ set ValueSchemaObject(value) {
61747
+ this.SetJSONFieldObject('ValueSchema', value);
61748
+ }
61749
+ /**
60074
61750
  * * Field Name: Action
60075
61751
  * * Display Name: Action
60076
61752
  * * SQL Data Type: nvarchar(425)
@@ -61988,6 +63664,23 @@ let MJArchiveConfigurationEntity = class MJArchiveConfigurationEntity extends Ba
61988
63664
  return this.Get('__mj_UpdatedAt');
61989
63665
  }
61990
63666
  /**
63667
+ * * Field Name: StorageMode
63668
+ * * Display Name: Storage Mode
63669
+ * * SQL Data Type: nvarchar(20)
63670
+ * * Default Value: Store
63671
+ * * Value List Type: List
63672
+ * * Possible Values
63673
+ * * Purge
63674
+ * * Store
63675
+ * * Description: Whether runs keep a copy of the data they remove. Store (default): each record's archive document is written to the storage account before the mode changes the source row. Purge: the mode is applied with no copy written, StorageAccountID is not needed, and cleared data cannot be restored. A Purge run refuses entities in ArchiveOnly mode, entities missing from metadata, entities that track Record Changes, entities whose driver is not registered or does not support purge, and HardDelete entities that use soft delete or whose delete cascade reaches an entity that tracks Record Changes or uses soft delete.
63676
+ */
63677
+ get StorageMode() {
63678
+ return this.Get('StorageMode');
63679
+ }
63680
+ set StorageMode(value) {
63681
+ this.Set('StorageMode', value);
63682
+ }
63683
+ /**
61991
63684
  * * Field Name: StorageAccount
61992
63685
  * * Display Name: Storage Account Name
61993
63686
  * * SQL Data Type: nvarchar(200)
@@ -62197,8 +63890,8 @@ let MJArchiveRunDetailEntity = class MJArchiveRunDetailEntity extends BaseEntity
62197
63890
  }
62198
63891
  /**
62199
63892
  * * Field Name: ArchiveRun
62200
- * * Display Name: Archive Run Timestamp
62201
- * * SQL Data Type: datetimeoffset
63893
+ * * Display Name: Archive Run
63894
+ * * SQL Data Type: nvarchar(255)
62202
63895
  */
62203
63896
  get ArchiveRun() {
62204
63897
  return this.Get('ArchiveRun');
@@ -62423,6 +64116,23 @@ let MJArchiveRunEntity = class MJArchiveRunEntity extends BaseEntity {
62423
64116
  return this.Get('__mj_UpdatedAt');
62424
64117
  }
62425
64118
  /**
64119
+ * * Field Name: StorageMode
64120
+ * * Display Name: Storage Mode
64121
+ * * SQL Data Type: nvarchar(20)
64122
+ * * Default Value: Store
64123
+ * * Value List Type: List
64124
+ * * Possible Values
64125
+ * * Purge
64126
+ * * Store
64127
+ * * Description: The configuration's StorageMode when this run started: Store (copies written to storage) or Purge (no copies kept; only failed records get an ArchiveRunDetail row).
64128
+ */
64129
+ get StorageMode() {
64130
+ return this.Get('StorageMode');
64131
+ }
64132
+ set StorageMode(value) {
64133
+ this.Set('StorageMode', value);
64134
+ }
64135
+ /**
62426
64136
  * * Field Name: ArchiveConfiguration
62427
64137
  * * Display Name: Configuration Name
62428
64138
  * * SQL Data Type: nvarchar(255)
@@ -66133,6 +67843,83 @@ let MJCommunicationProviderEntity = class MJCommunicationProviderEntity extends
66133
67843
  set SupportsDrafts(value) {
66134
67844
  this.Set('SupportsDrafts', value);
66135
67845
  }
67846
+ /**
67847
+ * * Field Name: SupportsCalendar
67848
+ * * Display Name: Supports Calendar
67849
+ * * SQL Data Type: bit
67850
+ * * Default Value: 0
67851
+ * * Description: Whether the provider supports calendar event reading, creation, updating, and invitation responses.
67852
+ */
67853
+ get SupportsCalendar() {
67854
+ return this.Get('SupportsCalendar');
67855
+ }
67856
+ set SupportsCalendar(value) {
67857
+ this.Set('SupportsCalendar', value);
67858
+ }
67859
+ /**
67860
+ * * Field Name: SupportsFreeBusy
67861
+ * * Display Name: Supports Free Busy
67862
+ * * SQL Data Type: bit
67863
+ * * Default Value: 0
67864
+ * * Description: Whether the provider supports checking free/busy schedules and finding optimal meeting times.
67865
+ */
67866
+ get SupportsFreeBusy() {
67867
+ return this.Get('SupportsFreeBusy');
67868
+ }
67869
+ set SupportsFreeBusy(value) {
67870
+ this.Set('SupportsFreeBusy', value);
67871
+ }
67872
+ /**
67873
+ * * Field Name: EnterpriseScopeMode
67874
+ * * Display Name: Enterprise Scope Mode
67875
+ * * SQL Data Type: nvarchar(40)
67876
+ * * Default Value: UtilityMailboxesOnly
67877
+ * * Value List Type: List
67878
+ * * Possible Values
67879
+ * * SecurityGroupScoped
67880
+ * * TenantWide
67881
+ * * UtilityMailboxesOnly
67882
+ * * Description: Enterprise mailbox scope posture for this provider: UtilityMailboxesOnly (restricted to shared/agent utility mailboxes), SecurityGroupScoped (Exchange RBAC / Workspace group-scoped user mailboxes), or TenantWide.
67883
+ */
67884
+ get EnterpriseScopeMode() {
67885
+ return this.Get('EnterpriseScopeMode');
67886
+ }
67887
+ set EnterpriseScopeMode(value) {
67888
+ this.Set('EnterpriseScopeMode', value);
67889
+ }
67890
+ /**
67891
+ * * Field Name: AllowedEmailDomains
67892
+ * * Display Name: Allowed Email Domains
67893
+ * * SQL Data Type: nvarchar(500)
67894
+ * * Description: Optional comma-separated list of corporate email domains permitted for user-scoped mailbox and calendar operations (e.g., "company.com,subsidiary.com").
67895
+ */
67896
+ get AllowedEmailDomains() {
67897
+ return this.Get('AllowedEmailDomains');
67898
+ }
67899
+ set AllowedEmailDomains(value) {
67900
+ this.Set('AllowedEmailDomains', value);
67901
+ }
67902
+ /**
67903
+ * * Field Name: DefaultCredentialID
67904
+ * * Display Name: Default Credential ID
67905
+ * * SQL Data Type: uniqueidentifier
67906
+ * * Related Entity/Foreign Key: MJ: Credentials (vwCredentials.ID)
67907
+ * * Description: Optional default MJ Credential used by this communication provider when no per-request credential override is supplied.
67908
+ */
67909
+ get DefaultCredentialID() {
67910
+ return this.Get('DefaultCredentialID');
67911
+ }
67912
+ set DefaultCredentialID(value) {
67913
+ this.Set('DefaultCredentialID', value);
67914
+ }
67915
+ /**
67916
+ * * Field Name: DefaultCredential
67917
+ * * Display Name: Default Credential
67918
+ * * SQL Data Type: nvarchar(200)
67919
+ */
67920
+ get DefaultCredential() {
67921
+ return this.Get('DefaultCredential');
67922
+ }
66136
67923
  };
66137
67924
  MJCommunicationProviderEntity = __decorate([
66138
67925
  RegisterClass(BaseEntity, 'MJ: Communication Providers')
@@ -72738,6 +74525,221 @@ MJConversationArtifactEntity = __decorate([
72738
74525
  RegisterClass(BaseEntity, 'MJ: Conversation Artifacts')
72739
74526
  ], MJConversationArtifactEntity);
72740
74527
  export { MJConversationArtifactEntity };
74528
+ /**
74529
+ * MJ: Conversation Branches - strongly typed entity sub-class
74530
+ * * Schema: __mj
74531
+ * * Base Table: ConversationBranch
74532
+ * * Base View: vwConversationBranches
74533
+ * * @description A fork of a conversation: another path that starts at a message. Main (the trunk) is the messages with no branch. A fork's path is its own messages plus each ancestor's messages up to that ancestor's ForkFromSequence.
74534
+ * * Primary Key: ID
74535
+ * @extends {BaseEntity}
74536
+ * @class
74537
+ * @public
74538
+ */
74539
+ let MJConversationBranchEntity = class MJConversationBranchEntity extends BaseEntity {
74540
+ /**
74541
+ * Loads the MJ: Conversation Branches record from the database
74542
+ * @param ID: string - primary key value to load the MJ: Conversation Branches record.
74543
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
74544
+ * @returns {Promise<boolean>} - true if successful, false otherwise
74545
+ * @public
74546
+ * @async
74547
+ * @memberof MJConversationBranchEntity
74548
+ * @method
74549
+ * @override
74550
+ */
74551
+ async Load(ID, EntityRelationshipsToLoad) {
74552
+ const compositeKey = new CompositeKey();
74553
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
74554
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
74555
+ }
74556
+ /**
74557
+ * MJ: Conversation Branches - Delete method override to wrap in transaction since CascadeDeletes is true.
74558
+ * Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
74559
+ * @public
74560
+ * @method
74561
+ * @override
74562
+ * @memberof MJConversationBranchEntity
74563
+ * @returns {Promise<boolean>} - true if successful, false otherwise
74564
+ */
74565
+ async Delete(options) {
74566
+ if (Metadata.Provider.ProviderType === ProviderType.Database) { // global-provider-ok: codegen runs offline against a single provider
74567
+ // For database providers, use the transaction methods directly
74568
+ const provider = Metadata.Provider; // global-provider-ok: codegen runs offline against a single provider
74569
+ try {
74570
+ await provider.BeginTransaction();
74571
+ const result = await super.Delete(options);
74572
+ if (result) {
74573
+ await provider.CommitTransaction();
74574
+ return true;
74575
+ }
74576
+ else {
74577
+ await provider.RollbackTransaction();
74578
+ return false;
74579
+ }
74580
+ }
74581
+ catch (error) {
74582
+ await provider.RollbackTransaction();
74583
+ throw error;
74584
+ }
74585
+ }
74586
+ else {
74587
+ // For network providers, cascading deletes are handled server-side
74588
+ return super.Delete(options);
74589
+ }
74590
+ }
74591
+ /**
74592
+ * * Field Name: ID
74593
+ * * Display Name: ID
74594
+ * * SQL Data Type: uniqueidentifier
74595
+ * * Default Value: newsequentialid()
74596
+ */
74597
+ get ID() {
74598
+ return this.Get('ID');
74599
+ }
74600
+ set ID(value) {
74601
+ this.Set('ID', value);
74602
+ }
74603
+ /**
74604
+ * * Field Name: ConversationID
74605
+ * * Display Name: Conversation
74606
+ * * SQL Data Type: uniqueidentifier
74607
+ * * Related Entity/Foreign Key: MJ: Conversations (vwConversations.ID)
74608
+ * * Description: The conversation this fork belongs to.
74609
+ */
74610
+ get ConversationID() {
74611
+ return this.Get('ConversationID');
74612
+ }
74613
+ set ConversationID(value) {
74614
+ this.Set('ConversationID', value);
74615
+ }
74616
+ /**
74617
+ * * Field Name: ParentBranchID
74618
+ * * Display Name: Parent Branch
74619
+ * * SQL Data Type: uniqueidentifier
74620
+ * * Related Entity/Foreign Key: MJ: Conversation Branches (vwConversationBranches.ID)
74621
+ * * Description: The fork this one started from. NULL means it started from Main, or before the first message when ForkFromSequence is also NULL.
74622
+ */
74623
+ get ParentBranchID() {
74624
+ return this.Get('ParentBranchID');
74625
+ }
74626
+ set ParentBranchID(value) {
74627
+ this.Set('ParentBranchID', value);
74628
+ }
74629
+ /**
74630
+ * * Field Name: ForkFromSequence
74631
+ * * Display Name: Fork From Sequence
74632
+ * * SQL Data Type: int
74633
+ * * Description: Sequence of the last message shared with the parent path. NULL means the fork starts before the first message, in which case ParentBranchID is also NULL.
74634
+ */
74635
+ get ForkFromSequence() {
74636
+ return this.Get('ForkFromSequence');
74637
+ }
74638
+ set ForkFromSequence(value) {
74639
+ this.Set('ForkFromSequence', value);
74640
+ }
74641
+ /**
74642
+ * * Field Name: Name
74643
+ * * Display Name: Name
74644
+ * * SQL Data Type: nvarchar(255)
74645
+ * * Description: Optional name of the fork. With no name, the UI shows a default label from Kind: a Fork is named from its first message.
74646
+ */
74647
+ get Name() {
74648
+ return this.Get('Name');
74649
+ }
74650
+ set Name(value) {
74651
+ this.Set('Name', value);
74652
+ }
74653
+ /**
74654
+ * * Field Name: Kind
74655
+ * * Display Name: Kind
74656
+ * * SQL Data Type: nvarchar(20)
74657
+ * * Default Value: Fork
74658
+ * * Value List Type: List
74659
+ * * Possible Values
74660
+ * * Edit
74661
+ * * Fork
74662
+ * * Regenerate
74663
+ * * Description: How the fork started: Fork (Fork from here), Edit (a sent message was edited) or Regenerate (an answer was regenerated).
74664
+ */
74665
+ get Kind() {
74666
+ return this.Get('Kind');
74667
+ }
74668
+ set Kind(value) {
74669
+ this.Set('Kind', value);
74670
+ }
74671
+ /**
74672
+ * * Field Name: SourceDetailID
74673
+ * * Display Name: Source Detail
74674
+ * * SQL Data Type: uniqueidentifier
74675
+ * * Description: The edited message (Kind Edit) or the replaced answer (Kind Regenerate); NULL otherwise. Not a foreign key, to avoid a CodeGen cascade cycle with ConversationDetail.
74676
+ */
74677
+ get SourceDetailID() {
74678
+ return this.Get('SourceDetailID');
74679
+ }
74680
+ set SourceDetailID(value) {
74681
+ this.Set('SourceDetailID', value);
74682
+ }
74683
+ /**
74684
+ * * Field Name: UserID
74685
+ * * Display Name: User
74686
+ * * SQL Data Type: uniqueidentifier
74687
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
74688
+ * * Description: The person who started the fork.
74689
+ */
74690
+ get UserID() {
74691
+ return this.Get('UserID');
74692
+ }
74693
+ set UserID(value) {
74694
+ this.Set('UserID', value);
74695
+ }
74696
+ /**
74697
+ * * Field Name: __mj_CreatedAt
74698
+ * * Display Name: Created At
74699
+ * * SQL Data Type: datetimeoffset
74700
+ * * Default Value: getutcdate()
74701
+ */
74702
+ get __mj_CreatedAt() {
74703
+ return this.Get('__mj_CreatedAt');
74704
+ }
74705
+ /**
74706
+ * * Field Name: __mj_UpdatedAt
74707
+ * * Display Name: Updated At
74708
+ * * SQL Data Type: datetimeoffset
74709
+ * * Default Value: getutcdate()
74710
+ */
74711
+ get __mj_UpdatedAt() {
74712
+ return this.Get('__mj_UpdatedAt');
74713
+ }
74714
+ /**
74715
+ * * Field Name: Conversation
74716
+ * * Display Name: Conversation Detail
74717
+ * * SQL Data Type: nvarchar(255)
74718
+ */
74719
+ get Conversation() {
74720
+ return this.Get('Conversation');
74721
+ }
74722
+ /**
74723
+ * * Field Name: ParentBranch
74724
+ * * Display Name: Parent Branch Detail
74725
+ * * SQL Data Type: nvarchar(255)
74726
+ */
74727
+ get ParentBranch() {
74728
+ return this.Get('ParentBranch');
74729
+ }
74730
+ /**
74731
+ * * Field Name: User
74732
+ * * Display Name: User Name
74733
+ * * SQL Data Type: nvarchar(100)
74734
+ */
74735
+ get User() {
74736
+ return this.Get('User');
74737
+ }
74738
+ };
74739
+ MJConversationBranchEntity = __decorate([
74740
+ RegisterClass(BaseEntity, 'MJ: Conversation Branches')
74741
+ ], MJConversationBranchEntity);
74742
+ export { MJConversationBranchEntity };
72741
74743
  /**
72742
74744
  * MJ: Conversation Compaction Runs - strongly typed entity sub-class
72743
74745
  * * Schema: __mj
@@ -73917,6 +75919,31 @@ let MJConversationDetailEntity = class MJConversationDetailEntity extends BaseEn
73917
75919
  return this.Get('Sequence');
73918
75920
  }
73919
75921
  /**
75922
+ * * Field Name: BranchID
75923
+ * * Display Name: Branch
75924
+ * * SQL Data Type: uniqueidentifier
75925
+ * * Related Entity/Foreign Key: MJ: Conversation Branches (vwConversationBranches.ID)
75926
+ * * Description: The fork this message belongs to. NULL means Main (the trunk). Every writer sets it explicitly.
75927
+ */
75928
+ get BranchID() {
75929
+ return this.Get('BranchID');
75930
+ }
75931
+ set BranchID(value) {
75932
+ this.Set('BranchID', value);
75933
+ }
75934
+ /**
75935
+ * * Field Name: ReplacedAt
75936
+ * * Display Name: Replaced At
75937
+ * * SQL Data Type: datetimeoffset
75938
+ * * Description: When a rerun of this message's turn replaced it (Regenerate or Save and resend while forking is off). A replaced row is kept for audit, is hidden from the user and is never sent to an agent. NULL means the row is live.
75939
+ */
75940
+ get ReplacedAt() {
75941
+ return this.Get('ReplacedAt');
75942
+ }
75943
+ set ReplacedAt(value) {
75944
+ this.Set('ReplacedAt', value);
75945
+ }
75946
+ /**
73920
75947
  * * Field Name: Conversation
73921
75948
  * * Display Name: Conversation
73922
75949
  * * SQL Data Type: nvarchar(255)
@@ -73973,6 +76000,14 @@ let MJConversationDetailEntity = class MJConversationDetailEntity extends BaseEn
73973
76000
  return this.Get('TestRun');
73974
76001
  }
73975
76002
  /**
76003
+ * * Field Name: Branch
76004
+ * * Display Name: Branch
76005
+ * * SQL Data Type: nvarchar(255)
76006
+ */
76007
+ get Branch() {
76008
+ return this.Get('Branch');
76009
+ }
76010
+ /**
73976
76011
  * * Field Name: RootParentID
73977
76012
  * * Display Name: Root Parent
73978
76013
  * * SQL Data Type: uniqueidentifier
@@ -88202,6 +90237,409 @@ MJFeaturePipelineTypeEntity = __decorate([
88202
90237
  RegisterClass(BaseEntity, 'MJ: Feature Pipeline Types')
88203
90238
  ], MJFeaturePipelineTypeEntity);
88204
90239
  export { MJFeaturePipelineTypeEntity };
90240
+ /**
90241
+ * MJ: Feature Pipeline Versions - strongly typed entity sub-class
90242
+ * * Schema: __mj
90243
+ * * Base Table: FeaturePipelineVersion
90244
+ * * Base View: vwFeaturePipelineVersions
90245
+ * * @description One version of a Feature Pipeline: a distinct pin (spec hash, prompt version hash, primary AI model, parameters hash). A gated pipeline runs only under an Active version, and a version becomes Active only with a stored golden-set result at or above its declared threshold.
90246
+ * * Primary Key: ID
90247
+ * @extends {BaseEntity}
90248
+ * @class
90249
+ * @public
90250
+ */
90251
+ let MJFeaturePipelineVersionEntity = class MJFeaturePipelineVersionEntity extends BaseEntity {
90252
+ /**
90253
+ * Loads the MJ: Feature Pipeline Versions record from the database
90254
+ * @param ID: string - primary key value to load the MJ: Feature Pipeline Versions record.
90255
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
90256
+ * @returns {Promise<boolean>} - true if successful, false otherwise
90257
+ * @public
90258
+ * @async
90259
+ * @memberof MJFeaturePipelineVersionEntity
90260
+ * @method
90261
+ * @override
90262
+ */
90263
+ async Load(ID, EntityRelationshipsToLoad) {
90264
+ const compositeKey = new CompositeKey();
90265
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
90266
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
90267
+ }
90268
+ /**
90269
+ * * Field Name: ID
90270
+ * * Display Name: ID
90271
+ * * SQL Data Type: uniqueidentifier
90272
+ * * Default Value: newsequentialid()
90273
+ */
90274
+ get ID() {
90275
+ return this.Get('ID');
90276
+ }
90277
+ set ID(value) {
90278
+ this.Set('ID', value);
90279
+ }
90280
+ /**
90281
+ * * Field Name: RecordProcessID
90282
+ * * Display Name: Record Process ID
90283
+ * * SQL Data Type: uniqueidentifier
90284
+ * * Related Entity/Foreign Key: MJ: Record Processes (vwRecordProcesses.ID)
90285
+ */
90286
+ get RecordProcessID() {
90287
+ return this.Get('RecordProcessID');
90288
+ }
90289
+ set RecordProcessID(value) {
90290
+ this.Set('RecordProcessID', value);
90291
+ }
90292
+ /**
90293
+ * * Field Name: Version
90294
+ * * Display Name: Version
90295
+ * * SQL Data Type: int
90296
+ * * Description: Monotonic version number within the pipeline (1, 2, ...).
90297
+ */
90298
+ get Version() {
90299
+ return this.Get('Version');
90300
+ }
90301
+ set Version(value) {
90302
+ this.Set('Version', value);
90303
+ }
90304
+ /**
90305
+ * * Field Name: PinHash
90306
+ * * Display Name: Pin Hash
90307
+ * * SQL Data Type: nvarchar(64)
90308
+ * * Description: SHA-256 of the pin (SpecHash, PromptVersionHash, AIModelID, ParametersHash). Unique per pipeline.
90309
+ */
90310
+ get PinHash() {
90311
+ return this.Get('PinHash');
90312
+ }
90313
+ set PinHash(value) {
90314
+ this.Set('PinHash', value);
90315
+ }
90316
+ /**
90317
+ * * Field Name: SpecHash
90318
+ * * Display Name: Spec Hash
90319
+ * * SQL Data Type: nvarchar(64)
90320
+ * * Description: SHA-256 of the output-affecting parts of the DataFeatureSpec (Context, Outputs, PipelineType, Escalation, PromptID, ProcessorExtensionKey) and the OutputMapping.
90321
+ */
90322
+ get SpecHash() {
90323
+ return this.Get('SpecHash');
90324
+ }
90325
+ set SpecHash(value) {
90326
+ this.Set('SpecHash', value);
90327
+ }
90328
+ /**
90329
+ * * Field Name: PromptID
90330
+ * * Display Name: Prompt
90331
+ * * SQL Data Type: uniqueidentifier
90332
+ * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
90333
+ * * Description: The pipeline prompt this version runs.
90334
+ */
90335
+ get PromptID() {
90336
+ return this.Get('PromptID');
90337
+ }
90338
+ set PromptID(value) {
90339
+ this.Set('PromptID', value);
90340
+ }
90341
+ /**
90342
+ * * Field Name: PromptVersionHash
90343
+ * * Display Name: Prompt Version Hash
90344
+ * * SQL Data Type: nvarchar(64)
90345
+ * * Description: Prompt version hash (template text, outputs, constraint block, pipeline type, escalation) of this version.
90346
+ */
90347
+ get PromptVersionHash() {
90348
+ return this.Get('PromptVersionHash');
90349
+ }
90350
+ set PromptVersionHash(value) {
90351
+ this.Set('PromptVersionHash', value);
90352
+ }
90353
+ /**
90354
+ * * Field Name: AIModelID
90355
+ * * Display Name: AI Model
90356
+ * * SQL Data Type: uniqueidentifier
90357
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
90358
+ * * Description: Primary AI model of the prompt for this version.
90359
+ */
90360
+ get AIModelID() {
90361
+ return this.Get('AIModelID');
90362
+ }
90363
+ set AIModelID(value) {
90364
+ this.Set('AIModelID', value);
90365
+ }
90366
+ /**
90367
+ * * Field Name: ParametersHash
90368
+ * * Display Name: Parameters Hash
90369
+ * * SQL Data Type: nvarchar(64)
90370
+ * * Description: SHA-256 of the prompt inference parameters for this version.
90371
+ */
90372
+ get ParametersHash() {
90373
+ return this.Get('ParametersHash');
90374
+ }
90375
+ set ParametersHash(value) {
90376
+ this.Set('ParametersHash', value);
90377
+ }
90378
+ /**
90379
+ * * Field Name: Status
90380
+ * * Display Name: Status
90381
+ * * SQL Data Type: nvarchar(20)
90382
+ * * Default Value: Candidate
90383
+ * * Value List Type: List
90384
+ * * Possible Values
90385
+ * * Active
90386
+ * * Candidate
90387
+ * * Refused
90388
+ * * Retired
90389
+ * * Description: Candidate (registered, not yet allowed to write), Active (the version runs write), Refused (golden-set result below threshold), Retired (superseded by a later Active version).
90390
+ */
90391
+ get Status() {
90392
+ return this.Get('Status');
90393
+ }
90394
+ set Status(value) {
90395
+ this.Set('Status', value);
90396
+ }
90397
+ /**
90398
+ * * Field Name: Gated
90399
+ * * Display Name: Gated
90400
+ * * SQL Data Type: bit
90401
+ * * Default Value: 0
90402
+ * * Description: True when the pipeline declares DataFeatureSpec.Activation: the version can become Active only through a stored golden-set result at or above Threshold.
90403
+ */
90404
+ get Gated() {
90405
+ return this.Get('Gated');
90406
+ }
90407
+ set Gated(value) {
90408
+ this.Set('Gated', value);
90409
+ }
90410
+ /**
90411
+ * * Field Name: GoldenSetTestID
90412
+ * * Display Name: Golden Set Test
90413
+ * * SQL Data Type: uniqueidentifier
90414
+ * * Related Entity/Foreign Key: MJ: Tests (vwTests.ID)
90415
+ * * Description: The MJ: Tests row holding the golden set this version was evaluated on.
90416
+ */
90417
+ get GoldenSetTestID() {
90418
+ return this.Get('GoldenSetTestID');
90419
+ }
90420
+ set GoldenSetTestID(value) {
90421
+ this.Set('GoldenSetTestID', value);
90422
+ }
90423
+ /**
90424
+ * * Field Name: GoldenSetTestRunID
90425
+ * * Display Name: Golden Set Test Run
90426
+ * * SQL Data Type: uniqueidentifier
90427
+ * * Related Entity/Foreign Key: MJ: Test Runs (vwTestRuns.ID)
90428
+ * * Description: The MJ: Test Runs row of the evaluation whose result is stored here.
90429
+ */
90430
+ get GoldenSetTestRunID() {
90431
+ return this.Get('GoldenSetTestRunID');
90432
+ }
90433
+ set GoldenSetTestRunID(value) {
90434
+ this.Set('GoldenSetTestRunID', value);
90435
+ }
90436
+ /**
90437
+ * * Field Name: Metric
90438
+ * * Display Name: Metric
90439
+ * * SQL Data Type: nvarchar(20)
90440
+ * * Value List Type: List
90441
+ * * Possible Values
90442
+ * * accuracy
90443
+ * * Description: Metric of the stored result: accuracy.
90444
+ */
90445
+ get Metric() {
90446
+ return this.Get('Metric');
90447
+ }
90448
+ set Metric(value) {
90449
+ this.Set('Metric', value);
90450
+ }
90451
+ /**
90452
+ * * Field Name: Threshold
90453
+ * * Display Name: Threshold
90454
+ * * SQL Data Type: float(53)
90455
+ * * Description: Declared activation threshold copied from DataFeatureSpec.Activation at evaluation time.
90456
+ */
90457
+ get Threshold() {
90458
+ return this.Get('Threshold');
90459
+ }
90460
+ set Threshold(value) {
90461
+ this.Set('Threshold', value);
90462
+ }
90463
+ /**
90464
+ * * Field Name: ResultValue
90465
+ * * Display Name: Result Value
90466
+ * * SQL Data Type: float(53)
90467
+ * * Description: Point estimate of the metric (the lowest per-output value when the pipeline has several outputs).
90468
+ */
90469
+ get ResultValue() {
90470
+ return this.Get('ResultValue');
90471
+ }
90472
+ set ResultValue(value) {
90473
+ this.Set('ResultValue', value);
90474
+ }
90475
+ /**
90476
+ * * Field Name: ResultLower
90477
+ * * Display Name: Result Lower Bound
90478
+ * * SQL Data Type: float(53)
90479
+ * * Description: Lower bound of the 95% Wilson interval of ResultValue.
90480
+ */
90481
+ get ResultLower() {
90482
+ return this.Get('ResultLower');
90483
+ }
90484
+ set ResultLower(value) {
90485
+ this.Set('ResultLower', value);
90486
+ }
90487
+ /**
90488
+ * * Field Name: ResultUpper
90489
+ * * Display Name: Result Upper Bound
90490
+ * * SQL Data Type: float(53)
90491
+ * * Description: Upper bound of the 95% Wilson interval of ResultValue.
90492
+ */
90493
+ get ResultUpper() {
90494
+ return this.Get('ResultUpper');
90495
+ }
90496
+ set ResultUpper(value) {
90497
+ this.Set('ResultUpper', value);
90498
+ }
90499
+ /**
90500
+ * * Field Name: ResultN
90501
+ * * Display Name: Result Sample Size (N)
90502
+ * * SQL Data Type: int
90503
+ * * Description: Number of golden cases scored.
90504
+ */
90505
+ get ResultN() {
90506
+ return this.Get('ResultN');
90507
+ }
90508
+ set ResultN(value) {
90509
+ this.Set('ResultN', value);
90510
+ }
90511
+ /**
90512
+ * * Field Name: ResultDetails
90513
+ * * Display Name: Result Details
90514
+ * * SQL Data Type: nvarchar(MAX)
90515
+ * * Description: JSON per-output results (correct, n, value, interval) and the per-case answers of the evaluation.
90516
+ */
90517
+ get ResultDetails() {
90518
+ return this.Get('ResultDetails');
90519
+ }
90520
+ set ResultDetails(value) {
90521
+ this.Set('ResultDetails', value);
90522
+ }
90523
+ /**
90524
+ * * Field Name: ActivatedAt
90525
+ * * Display Name: Activated At
90526
+ * * SQL Data Type: datetimeoffset
90527
+ * * Description: When the version became Active.
90528
+ */
90529
+ get ActivatedAt() {
90530
+ return this.Get('ActivatedAt');
90531
+ }
90532
+ set ActivatedAt(value) {
90533
+ this.Set('ActivatedAt', value);
90534
+ }
90535
+ /**
90536
+ * * Field Name: ApprovedByUserID
90537
+ * * Display Name: Approved By User
90538
+ * * SQL Data Type: uniqueidentifier
90539
+ * * Related Entity/Foreign Key: MJ: Users (vwUsers.ID)
90540
+ * * Description: The user whose run activated the version (for an unattended activation, the Feature Pipeline Version Steward job's user).
90541
+ */
90542
+ get ApprovedByUserID() {
90543
+ return this.Get('ApprovedByUserID');
90544
+ }
90545
+ set ApprovedByUserID(value) {
90546
+ this.Set('ApprovedByUserID', value);
90547
+ }
90548
+ /**
90549
+ * * Field Name: RetiredAt
90550
+ * * Display Name: Retired At
90551
+ * * SQL Data Type: datetimeoffset
90552
+ * * Description: When a later Active version superseded this one.
90553
+ */
90554
+ get RetiredAt() {
90555
+ return this.Get('RetiredAt');
90556
+ }
90557
+ set RetiredAt(value) {
90558
+ this.Set('RetiredAt', value);
90559
+ }
90560
+ /**
90561
+ * * Field Name: BackfilledAt
90562
+ * * Display Name: Backfilled At
90563
+ * * SQL Data Type: datetimeoffset
90564
+ * * Description: When the Feature Pipeline Version Steward finished the one backfill run of this activation of the version.
90565
+ */
90566
+ get BackfilledAt() {
90567
+ return this.Get('BackfilledAt');
90568
+ }
90569
+ set BackfilledAt(value) {
90570
+ this.Set('BackfilledAt', value);
90571
+ }
90572
+ /**
90573
+ * * Field Name: __mj_CreatedAt
90574
+ * * Display Name: Created At
90575
+ * * SQL Data Type: datetimeoffset
90576
+ * * Default Value: getutcdate()
90577
+ */
90578
+ get __mj_CreatedAt() {
90579
+ return this.Get('__mj_CreatedAt');
90580
+ }
90581
+ /**
90582
+ * * Field Name: __mj_UpdatedAt
90583
+ * * Display Name: Updated At
90584
+ * * SQL Data Type: datetimeoffset
90585
+ * * Default Value: getutcdate()
90586
+ */
90587
+ get __mj_UpdatedAt() {
90588
+ return this.Get('__mj_UpdatedAt');
90589
+ }
90590
+ /**
90591
+ * * Field Name: RecordProcess
90592
+ * * Display Name: Record Process
90593
+ * * SQL Data Type: nvarchar(255)
90594
+ */
90595
+ get RecordProcess() {
90596
+ return this.Get('RecordProcess');
90597
+ }
90598
+ /**
90599
+ * * Field Name: Prompt
90600
+ * * Display Name: Prompt Text
90601
+ * * SQL Data Type: nvarchar(255)
90602
+ */
90603
+ get Prompt() {
90604
+ return this.Get('Prompt');
90605
+ }
90606
+ /**
90607
+ * * Field Name: AIModel
90608
+ * * Display Name: AI Model Name
90609
+ * * SQL Data Type: nvarchar(50)
90610
+ */
90611
+ get AIModel() {
90612
+ return this.Get('AIModel');
90613
+ }
90614
+ /**
90615
+ * * Field Name: GoldenSetTest
90616
+ * * Display Name: Golden Set Test Name
90617
+ * * SQL Data Type: nvarchar(255)
90618
+ */
90619
+ get GoldenSetTest() {
90620
+ return this.Get('GoldenSetTest');
90621
+ }
90622
+ /**
90623
+ * * Field Name: GoldenSetTestRun
90624
+ * * Display Name: Golden Set Test Run Name
90625
+ * * SQL Data Type: nvarchar(255)
90626
+ */
90627
+ get GoldenSetTestRun() {
90628
+ return this.Get('GoldenSetTestRun');
90629
+ }
90630
+ /**
90631
+ * * Field Name: ApprovedByUser
90632
+ * * Display Name: Approved By User Name
90633
+ * * SQL Data Type: nvarchar(100)
90634
+ */
90635
+ get ApprovedByUser() {
90636
+ return this.Get('ApprovedByUser');
90637
+ }
90638
+ };
90639
+ MJFeaturePipelineVersionEntity = __decorate([
90640
+ RegisterClass(BaseEntity, 'MJ: Feature Pipeline Versions')
90641
+ ], MJFeaturePipelineVersionEntity);
90642
+ export { MJFeaturePipelineVersionEntity };
88205
90643
  /**
88206
90644
  * MJ: Feature Value Caches - strongly typed entity sub-class
88207
90645
  * * Schema: __mj
@@ -88436,6 +90874,31 @@ let MJFeatureValueCacheEntity = class MJFeatureValueCacheEntity extends BaseEnti
88436
90874
  return this.Get('__mj_UpdatedAt');
88437
90875
  }
88438
90876
  /**
90877
+ * * Field Name: AIModelID
90878
+ * * Display Name: AI Model
90879
+ * * SQL Data Type: uniqueidentifier
90880
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
90881
+ * * Description: Primary AI model of the prompt that computed this cached result. Part of the cache key.
90882
+ */
90883
+ get AIModelID() {
90884
+ return this.Get('AIModelID');
90885
+ }
90886
+ set AIModelID(value) {
90887
+ this.Set('AIModelID', value);
90888
+ }
90889
+ /**
90890
+ * * Field Name: ParametersHash
90891
+ * * Display Name: Parameters Hash
90892
+ * * SQL Data Type: nvarchar(64)
90893
+ * * Description: SHA-256 of the prompt's inference parameters when this result was computed. Part of the cache key.
90894
+ */
90895
+ get ParametersHash() {
90896
+ return this.Get('ParametersHash');
90897
+ }
90898
+ set ParametersHash(value) {
90899
+ this.Set('ParametersHash', value);
90900
+ }
90901
+ /**
88439
90902
  * * Field Name: RecordProcess
88440
90903
  * * Display Name: Record Process Name
88441
90904
  * * SQL Data Type: nvarchar(255)
@@ -88451,6 +90914,14 @@ let MJFeatureValueCacheEntity = class MJFeatureValueCacheEntity extends BaseEnti
88451
90914
  get Prompt() {
88452
90915
  return this.Get('Prompt');
88453
90916
  }
90917
+ /**
90918
+ * * Field Name: AIModel
90919
+ * * Display Name: AI Model
90920
+ * * SQL Data Type: nvarchar(50)
90921
+ */
90922
+ get AIModel() {
90923
+ return this.Get('AIModel');
90924
+ }
88454
90925
  };
88455
90926
  MJFeatureValueCacheEntity = __decorate([
88456
90927
  RegisterClass(BaseEntity, 'MJ: Feature Value Caches')
@@ -88461,7 +90932,7 @@ export { MJFeatureValueCacheEntity };
88461
90932
  * * Schema: __mj
88462
90933
  * * Base Table: FeatureValue
88463
90934
  * * Base View: vwFeatureValues
88464
- * * @description Complete historical audit table for Feature Pipelines. Records every feature value ever computed per entity record, with full provenance, model reasoning, and run back-links.
90935
+ * * @description Feature values computed by Feature Pipelines (or entered by people), one row per Feature Value key, updated in place when the same key is recomputed.
88465
90936
  * * Primary Key: ID
88466
90937
  * @extends {BaseEntity}
88467
90938
  * @class
@@ -88753,6 +91224,84 @@ let MJFeatureValueEntity = class MJFeatureValueEntity extends BaseEntity {
88753
91224
  return this.Get('__mj_UpdatedAt');
88754
91225
  }
88755
91226
  /**
91227
+ * * Field Name: PipelineVersion
91228
+ * * Display Name: Pipeline Version
91229
+ * * SQL Data Type: int
91230
+ * * Description: Version of the Feature Pipeline (MJ: Feature Pipeline Versions.Version) that computed this value; part of the FeatureValueKey.
91231
+ */
91232
+ get PipelineVersion() {
91233
+ return this.Get('PipelineVersion');
91234
+ }
91235
+ set PipelineVersion(value) {
91236
+ this.Set('PipelineVersion', value);
91237
+ }
91238
+ /**
91239
+ * * Field Name: AIModelID
91240
+ * * Display Name: AI Model
91241
+ * * SQL Data Type: uniqueidentifier
91242
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
91243
+ * * Description: Primary AI model the pipeline's prompt is configured to run (highest-priority Active AI Prompt Model). Part of the FeatureValueKey; the model that actually answered is on the linked AI Prompt Run.
91244
+ */
91245
+ get AIModelID() {
91246
+ return this.Get('AIModelID');
91247
+ }
91248
+ set AIModelID(value) {
91249
+ this.Set('AIModelID', value);
91250
+ }
91251
+ /**
91252
+ * * Field Name: ParametersHash
91253
+ * * Display Name: Parameters Hash
91254
+ * * SQL Data Type: nvarchar(64)
91255
+ * * Description: SHA-256 of the prompt's inference parameters (temperature, topP, topK, minP, penalties, seed, response format, effort level, model parameters). Part of the FeatureValueKey.
91256
+ */
91257
+ get ParametersHash() {
91258
+ return this.Get('ParametersHash');
91259
+ }
91260
+ set ParametersHash(value) {
91261
+ this.Set('ParametersHash', value);
91262
+ }
91263
+ /**
91264
+ * * Field Name: InputHash
91265
+ * * Display Name: Input Hash
91266
+ * * SQL Data Type: nvarchar(64)
91267
+ * * Description: SHA-256 of the normalized input the value was computed from (the Dedup Cache key hash when the pipeline caches). Part of the FeatureValueKey.
91268
+ */
91269
+ get InputHash() {
91270
+ return this.Get('InputHash');
91271
+ }
91272
+ set InputHash(value) {
91273
+ this.Set('InputHash', value);
91274
+ }
91275
+ /**
91276
+ * * Field Name: ValueKeyHash
91277
+ * * Display Name: Value Key Hash
91278
+ * * SQL Data Type: nvarchar(64)
91279
+ * * Description: SHA-256 of the canonical FeatureValueKey (entity, record, feature, pipeline version, prompt version hash, AI model, parameters hash, input hash, source). Unique per pipeline: re-computing the same key updates the row instead of inserting a duplicate.
91280
+ */
91281
+ get ValueKeyHash() {
91282
+ return this.Get('ValueKeyHash');
91283
+ }
91284
+ set ValueKeyHash(value) {
91285
+ this.Set('ValueKeyHash', value);
91286
+ }
91287
+ /**
91288
+ * * Field Name: Source
91289
+ * * Display Name: Source
91290
+ * * SQL Data Type: nvarchar(20)
91291
+ * * Default Value: Pipeline
91292
+ * * Value List Type: List
91293
+ * * Possible Values
91294
+ * * Human
91295
+ * * Pipeline
91296
+ * * Description: Who produced the value: Pipeline (computed by the Feature Pipeline) or Human (entered by a person, which write-back leaves in place).
91297
+ */
91298
+ get Source() {
91299
+ return this.Get('Source');
91300
+ }
91301
+ set Source(value) {
91302
+ this.Set('Source', value);
91303
+ }
91304
+ /**
88756
91305
  * * Field Name: RecordProcess
88757
91306
  * * Display Name: Record Process
88758
91307
  * * SQL Data Type: nvarchar(255)
@@ -88792,6 +91341,14 @@ let MJFeatureValueEntity = class MJFeatureValueEntity extends BaseEntity {
88792
91341
  get FeatureValueCache() {
88793
91342
  return this.Get('FeatureValueCache');
88794
91343
  }
91344
+ /**
91345
+ * * Field Name: AIModel
91346
+ * * Display Name: AI Model Details
91347
+ * * SQL Data Type: nvarchar(50)
91348
+ */
91349
+ get AIModel() {
91350
+ return this.Get('AIModel');
91351
+ }
88795
91352
  };
88796
91353
  MJFeatureValueEntity = __decorate([
88797
91354
  RegisterClass(BaseEntity, 'MJ: Feature Values')
@@ -101950,6 +104507,18 @@ let MJProcessRunDetailEntity = class MJProcessRunDetailEntity extends BaseEntity
101950
104507
  return this.Get('__mj_UpdatedAt');
101951
104508
  }
101952
104509
  /**
104510
+ * * Field Name: Warnings
104511
+ * * Display Name: Warnings
104512
+ * * SQL Data Type: nvarchar(MAX)
104513
+ * * Description: JSON array of the record's non-fatal problems (for example, its Dedup Cache entry could not be stored) on a record that otherwise succeeded. NULL when there were none. Failures are in ErrorMessage, never here.
104514
+ */
104515
+ get Warnings() {
104516
+ return this.Get('Warnings');
104517
+ }
104518
+ set Warnings(value) {
104519
+ this.Set('Warnings', value);
104520
+ }
104521
+ /**
101953
104522
  * * Field Name: Entity
101954
104523
  * * Display Name: Entity Name
101955
104524
  * * SQL Data Type: nvarchar(255)
@@ -102346,6 +104915,18 @@ let MJProcessRunEntity = class MJProcessRunEntity extends BaseEntity {
102346
104915
  this.Set('DryRun', value);
102347
104916
  }
102348
104917
  /**
104918
+ * * Field Name: ResultSummary
104919
+ * * Display Name: Result Summary
104920
+ * * SQL Data Type: nvarchar(MAX)
104921
+ * * Description: JSON summary of a Feature Pipeline run (FeaturePipelineRunResult); NULL for other work types.
104922
+ */
104923
+ get ResultSummary() {
104924
+ return this.Get('ResultSummary');
104925
+ }
104926
+ set ResultSummary(value) {
104927
+ this.Set('ResultSummary', value);
104928
+ }
104929
+ /**
102349
104930
  * * Field Name: RecordProcess
102350
104931
  * * Display Name: Record Process Name
102351
104932
  * * SQL Data Type: nvarchar(255)
@@ -113784,6 +116365,239 @@ MJSchemaInfoEntity = __decorate([
113784
116365
  RegisterClass(BaseEntity, 'MJ: Schema Info')
113785
116366
  ], MJSchemaInfoEntity);
113786
116367
  export { MJSchemaInfoEntity };
116368
+ /**
116369
+ * MJ: Scoped Notification Configs - strongly typed entity sub-class
116370
+ * * Schema: __mj
116371
+ * * Base Table: ScopedNotificationConfig
116372
+ * * Base View: vwScopedNotificationConfigs
116373
+ * * @description A notification config at one scope: the level between a notification type's defaults and a recipient's preference where an application, a role, a user or the notice's origin can allow or deny a channel. Scoped by the same primary record + secondary dimensions as Scoped Prompt Configs. Resolution: most specific in-scope row wins per channel; at equal specificity Deny beats Allow; a locked Deny caps every level below it, the recipient's preference included.
116374
+ * * Primary Key: ID
116375
+ * @extends {BaseEntity}
116376
+ * @class
116377
+ * @public
116378
+ */
116379
+ let MJScopedNotificationConfigEntity = class MJScopedNotificationConfigEntity extends BaseEntity {
116380
+ /**
116381
+ * Loads the MJ: Scoped Notification Configs record from the database
116382
+ * @param ID: string - primary key value to load the MJ: Scoped Notification Configs record.
116383
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
116384
+ * @returns {Promise<boolean>} - true if successful, false otherwise
116385
+ * @public
116386
+ * @async
116387
+ * @memberof MJScopedNotificationConfigEntity
116388
+ * @method
116389
+ * @override
116390
+ */
116391
+ async Load(ID, EntityRelationshipsToLoad) {
116392
+ const compositeKey = new CompositeKey();
116393
+ compositeKey.KeyValuePairs.push({ FieldName: 'ID', Value: ID });
116394
+ return await super.InnerLoad(compositeKey, EntityRelationshipsToLoad);
116395
+ }
116396
+ /**
116397
+ * * Field Name: ID
116398
+ * * Display Name: ID
116399
+ * * SQL Data Type: uniqueidentifier
116400
+ * * Default Value: newsequentialid()
116401
+ */
116402
+ get ID() {
116403
+ return this.Get('ID');
116404
+ }
116405
+ set ID(value) {
116406
+ this.Set('ID', value);
116407
+ }
116408
+ /**
116409
+ * * Field Name: NotificationTypeID
116410
+ * * Display Name: Notification Type
116411
+ * * SQL Data Type: uniqueidentifier
116412
+ * * Related Entity/Foreign Key: MJ: User Notification Types (vwUserNotificationTypes.ID)
116413
+ * * Description: The notification type this config is for.
116414
+ */
116415
+ get NotificationTypeID() {
116416
+ return this.Get('NotificationTypeID');
116417
+ }
116418
+ set NotificationTypeID(value) {
116419
+ this.Set('NotificationTypeID', value);
116420
+ }
116421
+ /**
116422
+ * * Field Name: Description
116423
+ * * Display Name: Description
116424
+ * * SQL Data Type: nvarchar(MAX)
116425
+ * * Description: Why the row exists, for the administrator who finds it.
116426
+ */
116427
+ get Description() {
116428
+ return this.Get('Description');
116429
+ }
116430
+ set Description(value) {
116431
+ this.Set('Description', value);
116432
+ }
116433
+ /**
116434
+ * * Field Name: PrimaryScopeEntityID
116435
+ * * Display Name: Primary Scope Entity ID
116436
+ * * SQL Data Type: uniqueidentifier
116437
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
116438
+ * * Description: The entity of the primary scope record (Applications, Roles, Users, Companies, ...). NULL with PrimaryScopeRecordID NULL = a global row.
116439
+ */
116440
+ get PrimaryScopeEntityID() {
116441
+ return this.Get('PrimaryScopeEntityID');
116442
+ }
116443
+ set PrimaryScopeEntityID(value) {
116444
+ this.Set('PrimaryScopeEntityID', value);
116445
+ }
116446
+ /**
116447
+ * * Field Name: PrimaryScopeRecordID
116448
+ * * Display Name: Primary Scope Record ID
116449
+ * * SQL Data Type: nvarchar(100)
116450
+ * * Description: The record ID within the primary scope entity this config is scoped to. NULL = global. In scope when it is the caller's primary scope record, the recipient, or a role the recipient holds.
116451
+ */
116452
+ get PrimaryScopeRecordID() {
116453
+ return this.Get('PrimaryScopeRecordID');
116454
+ }
116455
+ set PrimaryScopeRecordID(value) {
116456
+ this.Set('PrimaryScopeRecordID', value);
116457
+ }
116458
+ /**
116459
+ * * Field Name: SecondaryScopes
116460
+ * * Display Name: Secondary Scopes
116461
+ * * SQL Data Type: nvarchar(MAX)
116462
+ * * Description: JSON object of additional scope dimensions, e.g. {"origin":"System"}. Every dimension named must match the notice's scope for the row to apply. origin is Person, System (the Owner-type user) or Automation.
116463
+ */
116464
+ get SecondaryScopes() {
116465
+ return this.Get('SecondaryScopes');
116466
+ }
116467
+ set SecondaryScopes(value) {
116468
+ this.Set('SecondaryScopes', value);
116469
+ }
116470
+ /**
116471
+ * * Field Name: InApp
116472
+ * * Display Name: In-App Channel
116473
+ * * SQL Data Type: nvarchar(20)
116474
+ * * Value List Type: List
116475
+ * * Possible Values
116476
+ * * Allow
116477
+ * * Deny
116478
+ * * Description: The in-app channel: Allow, Deny, or NULL to leave it to the next row.
116479
+ */
116480
+ get InApp() {
116481
+ return this.Get('InApp');
116482
+ }
116483
+ set InApp(value) {
116484
+ this.Set('InApp', value);
116485
+ }
116486
+ /**
116487
+ * * Field Name: Email
116488
+ * * Display Name: Email Channel
116489
+ * * SQL Data Type: nvarchar(20)
116490
+ * * Value List Type: List
116491
+ * * Possible Values
116492
+ * * Allow
116493
+ * * Deny
116494
+ * * Description: The email channel: Allow, Deny, or NULL to leave it to the next row.
116495
+ */
116496
+ get Email() {
116497
+ return this.Get('Email');
116498
+ }
116499
+ set Email(value) {
116500
+ this.Set('Email', value);
116501
+ }
116502
+ /**
116503
+ * * Field Name: SMS
116504
+ * * Display Name: SMS Channel
116505
+ * * SQL Data Type: nvarchar(20)
116506
+ * * Value List Type: List
116507
+ * * Possible Values
116508
+ * * Allow
116509
+ * * Deny
116510
+ * * Description: The SMS channel: Allow, Deny, or NULL to leave it to the next row.
116511
+ */
116512
+ get SMS() {
116513
+ return this.Get('SMS');
116514
+ }
116515
+ set SMS(value) {
116516
+ this.Set('SMS', value);
116517
+ }
116518
+ /**
116519
+ * * Field Name: IsLocked
116520
+ * * Display Name: Is Locked
116521
+ * * SQL Data Type: bit
116522
+ * * Default Value: 0
116523
+ * * Description: When set, a Deny on this row is absorbing: no less specific row and no recipient preference may turn the channel on. The way a notification type's AllowUserPreference caps the recipient today.
116524
+ */
116525
+ get IsLocked() {
116526
+ return this.Get('IsLocked');
116527
+ }
116528
+ set IsLocked(value) {
116529
+ this.Set('IsLocked', value);
116530
+ }
116531
+ /**
116532
+ * * Field Name: Priority
116533
+ * * Display Name: Priority
116534
+ * * SQL Data Type: int
116535
+ * * Default Value: 0
116536
+ * * Description: Tie-break for resolution. Higher wins when two rows tie on scope specificity and neither denies. Default 0.
116537
+ */
116538
+ get Priority() {
116539
+ return this.Get('Priority');
116540
+ }
116541
+ set Priority(value) {
116542
+ this.Set('Priority', value);
116543
+ }
116544
+ /**
116545
+ * * Field Name: Status
116546
+ * * Display Name: Status
116547
+ * * SQL Data Type: nvarchar(20)
116548
+ * * Default Value: Active
116549
+ * * Value List Type: List
116550
+ * * Possible Values
116551
+ * * Active
116552
+ * * Archived
116553
+ * * Provisional
116554
+ * * Description: Lifecycle: Active (live), Provisional (staged; eligible), Archived (excluded from resolution).
116555
+ */
116556
+ get Status() {
116557
+ return this.Get('Status');
116558
+ }
116559
+ set Status(value) {
116560
+ this.Set('Status', value);
116561
+ }
116562
+ /**
116563
+ * * Field Name: __mj_CreatedAt
116564
+ * * Display Name: Created At
116565
+ * * SQL Data Type: datetimeoffset
116566
+ * * Default Value: getutcdate()
116567
+ */
116568
+ get __mj_CreatedAt() {
116569
+ return this.Get('__mj_CreatedAt');
116570
+ }
116571
+ /**
116572
+ * * Field Name: __mj_UpdatedAt
116573
+ * * Display Name: Updated At
116574
+ * * SQL Data Type: datetimeoffset
116575
+ * * Default Value: getutcdate()
116576
+ */
116577
+ get __mj_UpdatedAt() {
116578
+ return this.Get('__mj_UpdatedAt');
116579
+ }
116580
+ /**
116581
+ * * Field Name: NotificationType
116582
+ * * Display Name: Notification Type Name
116583
+ * * SQL Data Type: nvarchar(100)
116584
+ */
116585
+ get NotificationType() {
116586
+ return this.Get('NotificationType');
116587
+ }
116588
+ /**
116589
+ * * Field Name: PrimaryScopeEntity
116590
+ * * Display Name: Primary Scope Entity
116591
+ * * SQL Data Type: nvarchar(255)
116592
+ */
116593
+ get PrimaryScopeEntity() {
116594
+ return this.Get('PrimaryScopeEntity');
116595
+ }
116596
+ };
116597
+ MJScopedNotificationConfigEntity = __decorate([
116598
+ RegisterClass(BaseEntity, 'MJ: Scoped Notification Configs')
116599
+ ], MJScopedNotificationConfigEntity);
116600
+ export { MJScopedNotificationConfigEntity };
113787
116601
  /**
113788
116602
  * MJ: Scoped Prompt Configs - strongly typed entity sub-class
113789
116603
  * * Schema: __mj
@@ -123021,6 +125835,30 @@ let MJThemeEntity = class MJThemeEntity extends BaseEntity {
123021
125835
  get __mj_UpdatedAt() {
123022
125836
  return this.Get('__mj_UpdatedAt');
123023
125837
  }
125838
+ /**
125839
+ * * Field Name: LoginScreen
125840
+ * * Display Name: Login Screen
125841
+ * * SQL Data Type: nvarchar(MAX)
125842
+ * * Description: The published sign-in page design as JSON (the LoginDesign shape from @memberjunction/theme-engine): layout, background, colors and the blocks in each login-screen region. The default Active theme's value is served unauthenticated to draw the Explorer login screen. NULL means the stock login screen.
125843
+ */
125844
+ get LoginScreen() {
125845
+ return this.Get('LoginScreen');
125846
+ }
125847
+ set LoginScreen(value) {
125848
+ this.Set('LoginScreen', value);
125849
+ }
125850
+ /**
125851
+ * * Field Name: LoginScreenDraft
125852
+ * * Display Name: Login Screen Draft
125853
+ * * SQL Data Type: nvarchar(MAX)
125854
+ * * Description: The sign-in page design being edited in Login Studio, as JSON in the same shape as LoginScreen. Never served publicly; publishing copies it to LoginScreen. NULL means no draft.
125855
+ */
125856
+ get LoginScreenDraft() {
125857
+ return this.Get('LoginScreenDraft');
125858
+ }
125859
+ set LoginScreenDraft(value) {
125860
+ this.Set('LoginScreenDraft', value);
125861
+ }
123024
125862
  };
123025
125863
  MJThemeEntity = __decorate([
123026
125864
  RegisterClass(BaseEntity, 'MJ: Themes')
@@ -124790,9 +127628,10 @@ let MJUserRoutineEntity = class MJUserRoutineEntity extends BaseEntity {
124790
127628
  * * Default Value: Scheduled
124791
127629
  * * Value List Type: List
124792
127630
  * * Possible Values
127631
+ * * AgentWake
124793
127632
  * * Monitoring
124794
127633
  * * Scheduled
124795
- * * Description: Scheduled (always notify per NotifyCondition) or Monitoring (intended for OnChange detection via result hashing).
127634
+ * * Description: Scheduled (user cron routine), Monitoring (OnChange detection via result hashing), or AgentWake (autonomous agent self-scheduled wake/monitor entry, hidden from the default user cron list).
124796
127635
  */
124797
127636
  get RoutineType() {
124798
127637
  return this.Get('RoutineType');
@@ -124869,7 +127708,7 @@ let MJUserRoutineEntity = class MJUserRoutineEntity extends BaseEntity {
124869
127708
  * * Field Name: CronExpression
124870
127709
  * * Display Name: Cron Expression
124871
127710
  * * SQL Data Type: nvarchar(100)
124872
- * * Description: Standard cron expression evaluated by the dispatcher to determine when the routine is due.
127711
+ * * Description: Standard cron expression evaluated by the dispatcher for Recurring and Adaptive routines. NULL when ScheduleMode is OneShot.
124873
127712
  */
124874
127713
  get CronExpression() {
124875
127714
  return this.Get('CronExpression');
@@ -125058,6 +127897,63 @@ let MJUserRoutineEntity = class MJUserRoutineEntity extends BaseEntity {
125058
127897
  this.Set('ConversationID', value);
125059
127898
  }
125060
127899
  /**
127900
+ * * Field Name: ScheduleMode
127901
+ * * Display Name: Schedule Mode
127902
+ * * SQL Data Type: nvarchar(20)
127903
+ * * Default Value: Recurring
127904
+ * * Value List Type: List
127905
+ * * Possible Values
127906
+ * * Adaptive
127907
+ * * OneShot
127908
+ * * Recurring
127909
+ * * Description: Scheduling mode: Recurring (fixed cron schedule), OneShot (single future wake at NextRunAt, auto-disables after firing unless rescheduled by the agent), or Adaptive (fallback CronExpression combined with agent-set NextRunAt and event/condition wake gates).
127910
+ */
127911
+ get ScheduleMode() {
127912
+ return this.Get('ScheduleMode');
127913
+ }
127914
+ set ScheduleMode(value) {
127915
+ this.Set('ScheduleMode', value);
127916
+ }
127917
+ /**
127918
+ * * Field Name: WakeConfiguration
127919
+ * * Display Name: Wake Configuration
127920
+ * * SQL Data Type: nvarchar(MAX)
127921
+ * * JSON Type: MJUserRoutineEntity_IRoutineWakeConfiguration
127922
+ * * Description: Optional JSON configuration (IRoutineWakeConfiguration) specifying watchedEntities for durable watermark/RecordChange polling and the 3-tier wake gate (Tier 1 SafeExpressionEvaluator, Tier 2 AIDecisionRunner fast decision model, Tier 3 AIPromptRunner metadata prompt).
127923
+ */
127924
+ get WakeConfiguration() {
127925
+ return this.Get('WakeConfiguration');
127926
+ }
127927
+ set WakeConfiguration(value) {
127928
+ this.Set('WakeConfiguration', value);
127929
+ }
127930
+ /**
127931
+ * Typed accessor for WakeConfiguration — a live view of the parsed JSON as MJUserRoutineEntity_IRoutineWakeConfiguration.
127932
+ * Edits made through it, at any depth (`obj.a.b = 1`, `arr.push(x)`, `delete obj.k`), update the
127933
+ * underlying WakeConfiguration field, so it becomes dirty and Save() persists them. If the raw value changes by
127934
+ * any other route (Load, Set, revert) the next read re-parses, and objects obtained earlier are
127935
+ * detached: writing through one throws. To clone, structuredClone or postMessage the value use
127936
+ * ToPlainJSON() from @memberjunction/core.
127937
+ */
127938
+ get WakeConfigurationObject() {
127939
+ return this.GetJSONFieldObject('WakeConfiguration');
127940
+ }
127941
+ set WakeConfigurationObject(value) {
127942
+ this.SetJSONFieldObject('WakeConfiguration', value);
127943
+ }
127944
+ /**
127945
+ * * Field Name: LastCheckedAt
127946
+ * * Display Name: Last Checked At
127947
+ * * SQL Data Type: datetimeoffset
127948
+ * * Description: Timestamp when the dispatcher last evaluated this routine's watched entities and wake gate conditions.
127949
+ */
127950
+ get LastCheckedAt() {
127951
+ return this.Get('LastCheckedAt');
127952
+ }
127953
+ set LastCheckedAt(value) {
127954
+ this.Set('LastCheckedAt', value);
127955
+ }
127956
+ /**
125061
127957
  * * Field Name: User
125062
127958
  * * Display Name: User Name
125063
127959
  * * SQL Data Type: nvarchar(100)
@@ -126271,6 +129167,19 @@ let MJUserEntity = class MJUserEntity extends BaseEntity {
126271
129167
  this.Set('UserImageIconClass', value);
126272
129168
  }
126273
129169
  /**
129170
+ * * Field Name: IsTemplate
129171
+ * * Display Name: Is Template
129172
+ * * SQL Data Type: bit
129173
+ * * Default Value: 0
129174
+ * * Description: When true, this user is a template: its configuration (pinned apps, views, settings, dashboards, conversations) is copied to new users through the template clone preset or userHandling.newUserTemplate. Template users are for setting things up, not for everyday use; Explorer shows a banner while one is signed in.
129175
+ */
129176
+ get IsTemplate() {
129177
+ return this.Get('IsTemplate');
129178
+ }
129179
+ set IsTemplate(value) {
129180
+ this.Set('IsTemplate', value);
129181
+ }
129182
+ /**
126274
129183
  * * Field Name: FirstLast
126275
129184
  * * Display Name: First Last
126276
129185
  * * SQL Data Type: nvarchar(101)