@memberjunction/core-entities 5.45.0 → 5.46.0

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.
@@ -13437,6 +13437,8 @@ export declare const MJOpenAppSchema: z.ZodObject<{
13437
13437
  __mj_CreatedAt: z.ZodDate;
13438
13438
  __mj_UpdatedAt: z.ZodDate;
13439
13439
  Subpath: z.ZodNullable<z.ZodString>;
13440
+ LastCompletedStep: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"AngularExcludesUpdated">, z.ZodLiteral<"ConfigUpdated">, z.ZodLiteral<"DbCleanupDone">, z.ZodLiteral<"DependenciesReplaced">, z.ZodLiteral<"FilesRemoved">, z.ZodLiteral<"Finalized">, z.ZodLiteral<"HooksRun">, z.ZodLiteral<"MigrationsApplied">, z.ZodLiteral<"PackagesInstalled">, z.ZodLiteral<"RecordCreated">, z.ZodLiteral<"RecordUpdated">]>>;
13441
+ LastCompletedStepTargetVersion: z.ZodNullable<z.ZodString>;
13440
13442
  InstalledByUser: z.ZodString;
13441
13443
  }, "strip", z.ZodTypeAny, {
13442
13444
  ID?: string;
@@ -13460,6 +13462,8 @@ export declare const MJOpenAppSchema: z.ZodObject<{
13460
13462
  ConfigurationSchemaJSON?: string;
13461
13463
  InstalledByUserID?: string;
13462
13464
  Subpath?: string;
13465
+ LastCompletedStep?: "AngularExcludesUpdated" | "ConfigUpdated" | "DbCleanupDone" | "DependenciesReplaced" | "FilesRemoved" | "Finalized" | "HooksRun" | "MigrationsApplied" | "PackagesInstalled" | "RecordCreated" | "RecordUpdated";
13466
+ LastCompletedStepTargetVersion?: string;
13463
13467
  InstalledByUser?: string;
13464
13468
  }, {
13465
13469
  ID?: string;
@@ -13483,6 +13487,8 @@ export declare const MJOpenAppSchema: z.ZodObject<{
13483
13487
  ConfigurationSchemaJSON?: string;
13484
13488
  InstalledByUserID?: string;
13485
13489
  Subpath?: string;
13490
+ LastCompletedStep?: "AngularExcludesUpdated" | "ConfigUpdated" | "DbCleanupDone" | "DependenciesReplaced" | "FilesRemoved" | "Finalized" | "HooksRun" | "MigrationsApplied" | "PackagesInstalled" | "RecordCreated" | "RecordUpdated";
13491
+ LastCompletedStepTargetVersion?: string;
13486
13492
  InstalledByUser?: string;
13487
13493
  }>;
13488
13494
  export type MJOpenAppEntityType = z.infer<typeof MJOpenAppSchema>;
@@ -15938,6 +15944,98 @@ export declare const MJSchemaInfoSchema: z.ZodObject<{
15938
15944
  EntityNameSuffix?: string;
15939
15945
  }>;
15940
15946
  export type MJSchemaInfoEntityType = z.infer<typeof MJSchemaInfoSchema>;
15947
+ /**
15948
+ * zod schema definition for the entity MJ: Scoped Prompt Configs
15949
+ */
15950
+ export declare const MJScopedPromptConfigSchema: z.ZodObject<{
15951
+ ID: z.ZodString;
15952
+ PromptID: z.ZodString;
15953
+ Description: z.ZodNullable<z.ZodString>;
15954
+ PrimaryScopeEntityID: z.ZodNullable<z.ZodString>;
15955
+ PrimaryScopeRecordID: z.ZodNullable<z.ZodString>;
15956
+ SecondaryScopes: z.ZodNullable<z.ZodString>;
15957
+ Status: z.ZodUnion<[z.ZodLiteral<"Active">, z.ZodLiteral<"Archived">, z.ZodLiteral<"Provisional">]>;
15958
+ Priority: z.ZodNumber;
15959
+ ModelID: z.ZodNullable<z.ZodString>;
15960
+ VendorID: z.ZodNullable<z.ZodString>;
15961
+ ConfigurationID: z.ZodNullable<z.ZodString>;
15962
+ Temperature: z.ZodNullable<z.ZodNumber>;
15963
+ TopP: z.ZodNullable<z.ZodNumber>;
15964
+ TopK: z.ZodNullable<z.ZodNumber>;
15965
+ MinP: z.ZodNullable<z.ZodNumber>;
15966
+ FrequencyPenalty: z.ZodNullable<z.ZodNumber>;
15967
+ PresencePenalty: z.ZodNullable<z.ZodNumber>;
15968
+ Seed: z.ZodNullable<z.ZodNumber>;
15969
+ StopSequences: z.ZodNullable<z.ZodString>;
15970
+ ResponseFormat: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"Any">, z.ZodLiteral<"JSON">, z.ZodLiteral<"Markdown">, z.ZodLiteral<"ModelSpecific">, z.ZodLiteral<"Text">]>>;
15971
+ EffortLevel: z.ZodNullable<z.ZodNumber>;
15972
+ __mj_CreatedAt: z.ZodDate;
15973
+ __mj_UpdatedAt: z.ZodDate;
15974
+ Prompt: z.ZodString;
15975
+ PrimaryScopeEntity: z.ZodNullable<z.ZodString>;
15976
+ Model: z.ZodNullable<z.ZodString>;
15977
+ Vendor: z.ZodNullable<z.ZodString>;
15978
+ Configuration: z.ZodNullable<z.ZodString>;
15979
+ }, "strip", z.ZodTypeAny, {
15980
+ ID?: string;
15981
+ __mj_CreatedAt?: Date;
15982
+ __mj_UpdatedAt?: Date;
15983
+ Description?: string;
15984
+ Status?: "Active" | "Archived" | "Provisional";
15985
+ Priority?: number;
15986
+ Configuration?: string;
15987
+ PrimaryScopeEntityID?: string;
15988
+ PrimaryScopeRecordID?: string;
15989
+ SecondaryScopes?: string;
15990
+ PrimaryScopeEntity?: string;
15991
+ ModelID?: string;
15992
+ Model?: string;
15993
+ PromptID?: string;
15994
+ ConfigurationID?: string;
15995
+ Prompt?: string;
15996
+ EffortLevel?: number;
15997
+ Vendor?: string;
15998
+ VendorID?: string;
15999
+ Temperature?: number;
16000
+ TopP?: number;
16001
+ TopK?: number;
16002
+ MinP?: number;
16003
+ FrequencyPenalty?: number;
16004
+ PresencePenalty?: number;
16005
+ Seed?: number;
16006
+ StopSequences?: string;
16007
+ ResponseFormat?: "Any" | "JSON" | "Markdown" | "ModelSpecific" | "Text";
16008
+ }, {
16009
+ ID?: string;
16010
+ __mj_CreatedAt?: Date;
16011
+ __mj_UpdatedAt?: Date;
16012
+ Description?: string;
16013
+ Status?: "Active" | "Archived" | "Provisional";
16014
+ Priority?: number;
16015
+ Configuration?: string;
16016
+ PrimaryScopeEntityID?: string;
16017
+ PrimaryScopeRecordID?: string;
16018
+ SecondaryScopes?: string;
16019
+ PrimaryScopeEntity?: string;
16020
+ ModelID?: string;
16021
+ Model?: string;
16022
+ PromptID?: string;
16023
+ ConfigurationID?: string;
16024
+ Prompt?: string;
16025
+ EffortLevel?: number;
16026
+ Vendor?: string;
16027
+ VendorID?: string;
16028
+ Temperature?: number;
16029
+ TopP?: number;
16030
+ TopK?: number;
16031
+ MinP?: number;
16032
+ FrequencyPenalty?: number;
16033
+ PresencePenalty?: number;
16034
+ Seed?: number;
16035
+ StopSequences?: string;
16036
+ ResponseFormat?: "Any" | "JSON" | "Markdown" | "ModelSpecific" | "Text";
16037
+ }>;
16038
+ export type MJScopedPromptConfigEntityType = z.infer<typeof MJScopedPromptConfigSchema>;
15941
16039
  /**
15942
16040
  * zod schema definition for the entity MJ: Scoped Prompt Parts
15943
16041
  */
@@ -58812,6 +58910,35 @@ export declare class MJOpenAppEntity extends BaseEntity<MJOpenAppEntityType> {
58812
58910
  get Subpath(): string | null;
58813
58911
  set Subpath(value: string | null);
58814
58912
  /**
58913
+ * * Field Name: LastCompletedStep
58914
+ * * Display Name: Last Completed Step
58915
+ * * SQL Data Type: nvarchar(50)
58916
+ * * Value List Type: List
58917
+ * * Possible Values
58918
+ * * AngularExcludesUpdated
58919
+ * * ConfigUpdated
58920
+ * * DbCleanupDone
58921
+ * * DependenciesReplaced
58922
+ * * FilesRemoved
58923
+ * * Finalized
58924
+ * * HooksRun
58925
+ * * MigrationsApplied
58926
+ * * PackagesInstalled
58927
+ * * RecordCreated
58928
+ * * RecordUpdated
58929
+ * * Description: The last install/upgrade/remove step that completed successfully for this app while Status is Installing, Upgrading, or Removing. Used to resume a crashed or failed operation from the correct point instead of restarting it entirely. Cleared (NULL) once the operation reaches a terminal state (Active/Disabled/Removed/Error).
58930
+ */
58931
+ get LastCompletedStep(): 'AngularExcludesUpdated' | 'ConfigUpdated' | 'DbCleanupDone' | 'DependenciesReplaced' | 'FilesRemoved' | 'Finalized' | 'HooksRun' | 'MigrationsApplied' | 'PackagesInstalled' | 'RecordCreated' | 'RecordUpdated' | null;
58932
+ set LastCompletedStep(value: 'AngularExcludesUpdated' | 'ConfigUpdated' | 'DbCleanupDone' | 'DependenciesReplaced' | 'FilesRemoved' | 'Finalized' | 'HooksRun' | 'MigrationsApplied' | 'PackagesInstalled' | 'RecordCreated' | 'RecordUpdated' | null);
58933
+ /**
58934
+ * * Field Name: LastCompletedStepTargetVersion
58935
+ * * Display Name: Last Completed Step Target Version
58936
+ * * SQL Data Type: nvarchar(20)
58937
+ * * Description: The version this app was being upgraded TO when LastCompletedStep was last written, for Upgrade only. A resume only trusts LastCompletedStep when this matches the version currently being requested — otherwise a checkpoint from an interrupted upgrade to a different version could wrongly skip steps for the new target. Cleared alongside LastCompletedStep.
58938
+ */
58939
+ get LastCompletedStepTargetVersion(): string | null;
58940
+ set LastCompletedStepTargetVersion(value: string | null);
58941
+ /**
58815
58942
  * * Field Name: InstalledByUser
58816
58943
  * * Display Name: Installed By User
58817
58944
  * * SQL Data Type: nvarchar(100)
@@ -65699,6 +65826,261 @@ export declare class MJSchemaInfoEntity extends BaseEntity<MJSchemaInfoEntityTyp
65699
65826
  get CanonicalSchemaName(): string | null;
65700
65827
  set CanonicalSchemaName(value: string | null);
65701
65828
  }
65829
+ /**
65830
+ * MJ: Scoped Prompt Configs - strongly typed entity sub-class
65831
+ * * Schema: __mj
65832
+ * * Base Table: ScopedPromptConfig
65833
+ * * Base View: vwScopedPromptConfigs
65834
+ * * @description A scope-aware override of an AIPrompt's RUN SETTINGS (model/vendor, AI configuration, sampling knobs, response format, effort level). The run-settings sibling of ScopedPromptPart. Narrowed by a polymorphic scope (PrimaryScopeEntity/Record + SecondaryScopes). Resolved by a cached engine via a specificity cascade per PromptID — the most-specific in-scope row wins as a whole row (tie-broken by Priority); each non-null column overrides the prompt default, a NULL column inherits it. Runtime-explicit overrides on the agent run still win. Lets any MJ app tune model/generation behavior per scope by editing rows, not code.
65835
+ * * Primary Key: ID
65836
+ * @extends {BaseEntity}
65837
+ * @class
65838
+ * @public
65839
+ */
65840
+ export declare class MJScopedPromptConfigEntity extends BaseEntity<MJScopedPromptConfigEntityType> {
65841
+ /**
65842
+ * Loads the MJ: Scoped Prompt Configs record from the database
65843
+ * @param ID: string - primary key value to load the MJ: Scoped Prompt Configs record.
65844
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
65845
+ * @returns {Promise<boolean>} - true if successful, false otherwise
65846
+ * @public
65847
+ * @async
65848
+ * @memberof MJScopedPromptConfigEntity
65849
+ * @method
65850
+ * @override
65851
+ */
65852
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
65853
+ /**
65854
+ * * Field Name: ID
65855
+ * * Display Name: ID
65856
+ * * SQL Data Type: uniqueidentifier
65857
+ * * Default Value: newsequentialid()
65858
+ */
65859
+ get ID(): string;
65860
+ set ID(value: string);
65861
+ /**
65862
+ * * Field Name: PromptID
65863
+ * * Display Name: Prompt
65864
+ * * SQL Data Type: uniqueidentifier
65865
+ * * Related Entity/Foreign Key: MJ: AI Prompts (vwAIPrompts.ID)
65866
+ * * Description: The AIPrompt whose run settings this row overrides.
65867
+ */
65868
+ get PromptID(): string;
65869
+ set PromptID(value: string);
65870
+ /**
65871
+ * * Field Name: Description
65872
+ * * Display Name: Description
65873
+ * * SQL Data Type: nvarchar(MAX)
65874
+ * * Description: Optional human-readable note about this override (authoring aid; not sent to the model).
65875
+ */
65876
+ get Description(): string | null;
65877
+ set Description(value: string | null);
65878
+ /**
65879
+ * * Field Name: PrimaryScopeEntityID
65880
+ * * Display Name: Primary Scope Entity ID
65881
+ * * SQL Data Type: uniqueidentifier
65882
+ * * Related Entity/Foreign Key: MJ: Entities (vwEntities.ID)
65883
+ */
65884
+ get PrimaryScopeEntityID(): string | null;
65885
+ set PrimaryScopeEntityID(value: string | null);
65886
+ /**
65887
+ * * Field Name: PrimaryScopeRecordID
65888
+ * * Display Name: Primary Scope Record ID
65889
+ * * SQL Data Type: nvarchar(100)
65890
+ * * Description: The record ID within the primary scope entity that this override is scoped to. NULL = global (applies regardless of scope). When set with empty SecondaryScopes, the override is primary-scope-only (e.g. org-level).
65891
+ */
65892
+ get PrimaryScopeRecordID(): string | null;
65893
+ set PrimaryScopeRecordID(value: string | null);
65894
+ /**
65895
+ * * Field Name: SecondaryScopes
65896
+ * * Display Name: Secondary Scopes
65897
+ * * SQL Data Type: nvarchar(MAX)
65898
+ * * Description: JSON object of additional scope dimensions (e.g. {"ChannelID":"..."}). Empty/NULL with PrimaryScopeRecordID set = primary-scope-only; populated = fully-scoped. Matched (cascading or strict) against the run's SecondaryScopes.
65899
+ */
65900
+ get SecondaryScopes(): string | null;
65901
+ set SecondaryScopes(value: string | null);
65902
+ /**
65903
+ * * Field Name: Status
65904
+ * * Display Name: Status
65905
+ * * SQL Data Type: nvarchar(20)
65906
+ * * Default Value: Active
65907
+ * * Value List Type: List
65908
+ * * Possible Values
65909
+ * * Active
65910
+ * * Archived
65911
+ * * Provisional
65912
+ * * Description: Lifecycle: Active (live), Provisional (staged; eligible but flaggable as not-yet-final), Archived (excluded from resolution). Only Active and Provisional are eligible for resolution.
65913
+ */
65914
+ get Status(): 'Active' | 'Archived' | 'Provisional';
65915
+ set Status(value: 'Active' | 'Archived' | 'Provisional');
65916
+ /**
65917
+ * * Field Name: Priority
65918
+ * * Display Name: Priority
65919
+ * * SQL Data Type: int
65920
+ * * Default Value: 0
65921
+ * * Description: Precedence / tie-break for resolution. Higher wins when two rows tie on scope specificity. Default 0.
65922
+ */
65923
+ get Priority(): number;
65924
+ set Priority(value: number);
65925
+ /**
65926
+ * * Field Name: ModelID
65927
+ * * Display Name: Model ID
65928
+ * * SQL Data Type: uniqueidentifier
65929
+ * * Related Entity/Foreign Key: MJ: AI Models (vwAIModels.ID)
65930
+ * * Description: Optional model override for this scope. NULL = use the prompt's own model selection. Applied as AIPromptParams.override.modelId.
65931
+ */
65932
+ get ModelID(): string | null;
65933
+ set ModelID(value: string | null);
65934
+ /**
65935
+ * * Field Name: VendorID
65936
+ * * Display Name: Vendor ID
65937
+ * * SQL Data Type: uniqueidentifier
65938
+ * * Related Entity/Foreign Key: MJ: AI Vendors (vwAIVendors.ID)
65939
+ * * Description: Optional vendor override paired with ModelID (which inference provider serves the model). NULL = let MJ pick. Applied as AIPromptParams.override.vendorId.
65940
+ */
65941
+ get VendorID(): string | null;
65942
+ set VendorID(value: string | null);
65943
+ /**
65944
+ * * Field Name: ConfigurationID
65945
+ * * Display Name: Configuration ID
65946
+ * * SQL Data Type: uniqueidentifier
65947
+ * * Related Entity/Foreign Key: MJ: AI Configurations (vwAIConfigurations.ID)
65948
+ * * Description: Optional AI Configuration (environment) override for this scope. NULL = inherit. Applied as AIPromptParams.configurationId.
65949
+ */
65950
+ get ConfigurationID(): string | null;
65951
+ set ConfigurationID(value: string | null);
65952
+ /**
65953
+ * * Field Name: Temperature
65954
+ * * Display Name: Temperature
65955
+ * * SQL Data Type: decimal(3, 2)
65956
+ * * Description: Sampling temperature override. NULL = inherit the prompt default. Applied via AIPromptParams.additionalParameters.
65957
+ */
65958
+ get Temperature(): number | null;
65959
+ set Temperature(value: number | null);
65960
+ /**
65961
+ * * Field Name: TopP
65962
+ * * Display Name: Top P
65963
+ * * SQL Data Type: decimal(3, 2)
65964
+ * * Description: Nucleus-sampling (top-p) override. NULL = inherit. Applied via additionalParameters.
65965
+ */
65966
+ get TopP(): number | null;
65967
+ set TopP(value: number | null);
65968
+ /**
65969
+ * * Field Name: TopK
65970
+ * * Display Name: Top K
65971
+ * * SQL Data Type: int
65972
+ * * Description: Top-k sampling override. NULL = inherit. Applied via additionalParameters.
65973
+ */
65974
+ get TopK(): number | null;
65975
+ set TopK(value: number | null);
65976
+ /**
65977
+ * * Field Name: MinP
65978
+ * * Display Name: Min P
65979
+ * * SQL Data Type: decimal(3, 2)
65980
+ * * Description: Min-p sampling override. NULL = inherit. Applied via additionalParameters.
65981
+ */
65982
+ get MinP(): number | null;
65983
+ set MinP(value: number | null);
65984
+ /**
65985
+ * * Field Name: FrequencyPenalty
65986
+ * * Display Name: Frequency Penalty
65987
+ * * SQL Data Type: decimal(3, 2)
65988
+ * * Description: Frequency-penalty override. NULL = inherit. Applied via additionalParameters.
65989
+ */
65990
+ get FrequencyPenalty(): number | null;
65991
+ set FrequencyPenalty(value: number | null);
65992
+ /**
65993
+ * * Field Name: PresencePenalty
65994
+ * * Display Name: Presence Penalty
65995
+ * * SQL Data Type: decimal(3, 2)
65996
+ * * Description: Presence-penalty override. NULL = inherit. Applied via additionalParameters.
65997
+ */
65998
+ get PresencePenalty(): number | null;
65999
+ set PresencePenalty(value: number | null);
66000
+ /**
66001
+ * * Field Name: Seed
66002
+ * * Display Name: Seed
66003
+ * * SQL Data Type: int
66004
+ * * Description: Deterministic sampling seed override. NULL = inherit. Applied via additionalParameters.
66005
+ */
66006
+ get Seed(): number | null;
66007
+ set Seed(value: number | null);
66008
+ /**
66009
+ * * Field Name: StopSequences
66010
+ * * Display Name: Stop Sequences
66011
+ * * SQL Data Type: nvarchar(1000)
66012
+ * * Description: Comma-delimited stop sequences override. NULL = inherit. Applied via additionalParameters.
66013
+ */
66014
+ get StopSequences(): string | null;
66015
+ set StopSequences(value: string | null);
66016
+ /**
66017
+ * * Field Name: ResponseFormat
66018
+ * * Display Name: Response Format
66019
+ * * SQL Data Type: nvarchar(20)
66020
+ * * Value List Type: List
66021
+ * * Possible Values
66022
+ * * Any
66023
+ * * JSON
66024
+ * * Markdown
66025
+ * * ModelSpecific
66026
+ * * Text
66027
+ * * Description: Response-format override: Any, JSON, Markdown, ModelSpecific, or Text. NULL = inherit. Applied via additionalParameters.
66028
+ */
66029
+ get ResponseFormat(): 'Any' | 'JSON' | 'Markdown' | 'ModelSpecific' | 'Text' | null;
66030
+ set ResponseFormat(value: 'Any' | 'JSON' | 'Markdown' | 'ModelSpecific' | 'Text' | null);
66031
+ /**
66032
+ * * Field Name: EffortLevel
66033
+ * * Display Name: Effort Level
66034
+ * * SQL Data Type: int
66035
+ * * Description: Reasoning/effort level override (1-100). NULL = inherit the prompt default. Applied as AIPromptParams.effortLevel.
66036
+ */
66037
+ get EffortLevel(): number | null;
66038
+ set EffortLevel(value: number | null);
66039
+ /**
66040
+ * * Field Name: __mj_CreatedAt
66041
+ * * Display Name: Created At
66042
+ * * SQL Data Type: datetimeoffset
66043
+ * * Default Value: getutcdate()
66044
+ */
66045
+ get __mj_CreatedAt(): Date;
66046
+ /**
66047
+ * * Field Name: __mj_UpdatedAt
66048
+ * * Display Name: Updated At
66049
+ * * SQL Data Type: datetimeoffset
66050
+ * * Default Value: getutcdate()
66051
+ */
66052
+ get __mj_UpdatedAt(): Date;
66053
+ /**
66054
+ * * Field Name: Prompt
66055
+ * * Display Name: Prompt Name
66056
+ * * SQL Data Type: nvarchar(255)
66057
+ */
66058
+ get Prompt(): string;
66059
+ /**
66060
+ * * Field Name: PrimaryScopeEntity
66061
+ * * Display Name: Primary Scope Entity
66062
+ * * SQL Data Type: nvarchar(255)
66063
+ */
66064
+ get PrimaryScopeEntity(): string | null;
66065
+ /**
66066
+ * * Field Name: Model
66067
+ * * Display Name: Model
66068
+ * * SQL Data Type: nvarchar(50)
66069
+ */
66070
+ get Model(): string | null;
66071
+ /**
66072
+ * * Field Name: Vendor
66073
+ * * Display Name: Vendor
66074
+ * * SQL Data Type: nvarchar(50)
66075
+ */
66076
+ get Vendor(): string | null;
66077
+ /**
66078
+ * * Field Name: Configuration
66079
+ * * Display Name: Configuration
66080
+ * * SQL Data Type: nvarchar(100)
66081
+ */
66082
+ get Configuration(): string | null;
66083
+ }
65702
66084
  /**
65703
66085
  * Secondary scope dimensions for AI scoping.
65704
66086
  *