@memberjunction/server 5.41.0 → 5.42.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.
Files changed (76) hide show
  1. package/dist/agentSessions/index.d.ts +1 -0
  2. package/dist/agentSessions/index.d.ts.map +1 -1
  3. package/dist/agentSessions/index.js +5 -0
  4. package/dist/agentSessions/index.js.map +1 -1
  5. package/dist/agentSessions/remoteBrowserGoalEngine.d.ts +102 -0
  6. package/dist/agentSessions/remoteBrowserGoalEngine.d.ts.map +1 -0
  7. package/dist/agentSessions/remoteBrowserGoalEngine.js +164 -0
  8. package/dist/agentSessions/remoteBrowserGoalEngine.js.map +1 -0
  9. package/dist/agentSessions/remoteBrowserGoalRegistry.d.ts +66 -0
  10. package/dist/agentSessions/remoteBrowserGoalRegistry.d.ts.map +1 -0
  11. package/dist/agentSessions/remoteBrowserGoalRegistry.js +86 -0
  12. package/dist/agentSessions/remoteBrowserGoalRegistry.js.map +1 -0
  13. package/dist/auth/initializeProviders.d.ts.map +1 -1
  14. package/dist/auth/initializeProviders.js +4 -7
  15. package/dist/auth/initializeProviders.js.map +1 -1
  16. package/dist/config.d.ts +7 -0
  17. package/dist/config.d.ts.map +1 -1
  18. package/dist/config.js +12 -2
  19. package/dist/config.js.map +1 -1
  20. package/dist/generated/generated.d.ts +591 -0
  21. package/dist/generated/generated.d.ts.map +1 -1
  22. package/dist/generated/generated.js +6832 -3610
  23. package/dist/generated/generated.js.map +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +33 -16
  26. package/dist/index.js.map +1 -1
  27. package/dist/integration/CustomColumnPromoter.d.ts +108 -0
  28. package/dist/integration/CustomColumnPromoter.d.ts.map +1 -0
  29. package/dist/integration/CustomColumnPromoter.js +508 -0
  30. package/dist/integration/CustomColumnPromoter.js.map +1 -0
  31. package/dist/logging/StartupLogger.d.ts +57 -1
  32. package/dist/logging/StartupLogger.d.ts.map +1 -1
  33. package/dist/logging/StartupLogger.js +115 -6
  34. package/dist/logging/StartupLogger.js.map +1 -1
  35. package/dist/resolvers/ExecuteRemoteOperationResolver.d.ts +27 -0
  36. package/dist/resolvers/ExecuteRemoteOperationResolver.d.ts.map +1 -0
  37. package/dist/resolvers/ExecuteRemoteOperationResolver.js +136 -0
  38. package/dist/resolvers/ExecuteRemoteOperationResolver.js.map +1 -0
  39. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts +101 -1
  40. package/dist/resolvers/IntegrationDiscoveryResolver.d.ts.map +1 -1
  41. package/dist/resolvers/IntegrationDiscoveryResolver.js +544 -42
  42. package/dist/resolvers/IntegrationDiscoveryResolver.js.map +1 -1
  43. package/dist/resolvers/RealtimeBridgeResolver.d.ts +121 -0
  44. package/dist/resolvers/RealtimeBridgeResolver.d.ts.map +1 -0
  45. package/dist/resolvers/RealtimeBridgeResolver.js +533 -0
  46. package/dist/resolvers/RealtimeBridgeResolver.js.map +1 -0
  47. package/dist/resolvers/RemoteBrowserActionResolver.d.ts +78 -5
  48. package/dist/resolvers/RemoteBrowserActionResolver.d.ts.map +1 -1
  49. package/dist/resolvers/RemoteBrowserActionResolver.js +227 -15
  50. package/dist/resolvers/RemoteBrowserActionResolver.js.map +1 -1
  51. package/dist/resolvers/RunAIAgentResolver.d.ts.map +1 -1
  52. package/dist/resolvers/RunAIAgentResolver.js +0 -7
  53. package/dist/resolvers/RunAIAgentResolver.js.map +1 -1
  54. package/dist/rest/setupRESTEndpoints.d.ts.map +1 -1
  55. package/dist/rest/setupRESTEndpoints.js +5 -3
  56. package/dist/rest/setupRESTEndpoints.js.map +1 -1
  57. package/package.json +83 -78
  58. package/src/__tests__/RealtimeBridgeResolver.test.ts +100 -0
  59. package/src/__tests__/RemoteBrowserAudioStream.test.ts +8 -1
  60. package/src/__tests__/RemoteBrowserGoalEngine.test.ts +144 -0
  61. package/src/__tests__/remoteBrowserGoalRegistry.test.ts +81 -0
  62. package/src/agentSessions/index.ts +5 -0
  63. package/src/agentSessions/remoteBrowserGoalEngine.ts +191 -0
  64. package/src/agentSessions/remoteBrowserGoalRegistry.ts +122 -0
  65. package/src/auth/initializeProviders.ts +4 -7
  66. package/src/config.ts +13 -2
  67. package/src/generated/generated.ts +2444 -205
  68. package/src/index.ts +33 -16
  69. package/src/integration/CustomColumnPromoter.ts +597 -0
  70. package/src/logging/StartupLogger.ts +130 -6
  71. package/src/resolvers/ExecuteRemoteOperationResolver.ts +108 -0
  72. package/src/resolvers/IntegrationDiscoveryResolver.ts +396 -37
  73. package/src/resolvers/RealtimeBridgeResolver.ts +450 -0
  74. package/src/resolvers/RemoteBrowserActionResolver.ts +232 -17
  75. package/src/resolvers/RunAIAgentResolver.ts +1 -9
  76. package/src/rest/setupRESTEndpoints.ts +5 -3
@@ -1,3 +1,4 @@
1
+ export * from './remoteBrowserGoalEngine.js';
1
2
  export * from './HostInstance.js';
2
3
  export * from './SessionManager.js';
3
4
  export * from './SessionJanitor.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agentSessions/index.ts"],"names":[],"mappings":"AAwBA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agentSessions/index.ts"],"names":[],"mappings":"AA4BA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
@@ -10,6 +10,7 @@
10
10
  import { LoadWhiteboardChannelServer, LoadMeetingControlsChannelServer } from '@memberjunction/ai-agents';
11
11
  import { LoadRemoteBrowserChannel } from '@memberjunction/remote-browser-server';
12
12
  import { LoadSelfHostRemoteBrowser } from '@memberjunction/remote-browser-selfhost';
13
+ import { BindRemoteBrowserGoalEngine } from './remoteBrowserGoalEngine.js';
13
14
  // Tree-shaking prevention: force the server-side channel plugin registrations
14
15
  // (`@RegisterClass(BaseRealtimeChannelServer, ...)`) to execute on any static path that touches
15
16
  // the session lifecycle — `SessionManager.CreateSession` resolves them via the ClassFactory.
@@ -20,6 +21,10 @@ LoadMeetingControlsChannelServer();
20
21
  // Playwright — pulled in transitively through the SelfHost package, documented and acceptable).
21
22
  LoadRemoteBrowserChannel();
22
23
  LoadSelfHostRemoteBrowser();
24
+ // Bind goal-driven browser control to MJ's computer-use engine (vision-model auto-selection, prompt-run
25
+ // logging, credential resolution). Without this, RunComputerUseGoal falls back to the bare base engine.
26
+ BindRemoteBrowserGoalEngine();
27
+ export * from './remoteBrowserGoalEngine.js';
23
28
  export * from './HostInstance.js';
24
29
  export * from './SessionManager.js';
25
30
  export * from './SessionJanitor.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agentSessions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,2BAA2B,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,8EAA8E;AAC9E,gGAAgG;AAChG,6FAA6F;AAC7F,2BAA2B,EAAE,CAAC;AAC9B,gCAAgC,EAAE,CAAC;AACnC,gGAAgG;AAChG,iGAAiG;AACjG,gGAAgG;AAChG,wBAAwB,EAAE,CAAC;AAC3B,yBAAyB,EAAE,CAAC;AAE5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agentSessions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,2BAA2B,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAE3E,8EAA8E;AAC9E,gGAAgG;AAChG,6FAA6F;AAC7F,2BAA2B,EAAE,CAAC;AAC9B,gCAAgC,EAAE,CAAC;AACnC,gGAAgG;AAChG,iGAAiG;AACjG,gGAAgG;AAChG,wBAAwB,EAAE,CAAC;AAC3B,yBAAyB,EAAE,CAAC;AAC5B,wGAAwG;AACxG,wGAAwG;AACxG,2BAA2B,EAAE,CAAC;AAE9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * @fileoverview **Production binding** of the Remote Browser goal-engine seam to MJ's computer-use engine.
3
+ *
4
+ * The CDP remote-browser session ({@link CdpRemoteBrowserSession}) runs goal-driven browser control through
5
+ * an injectable {@link ComputerUseGoalRun} factory. By default that factory yields a bare
6
+ * `ProgressComputerUseEngine` (base computer-use), which has no model auto-selection — so it can't run a goal
7
+ * unsupervised. This module binds the factory to {@link MJProgressComputerUseEngine}: an MJ-aware engine that
8
+ * routes controller/judge prompts through `AIPromptRunner`, auto-selects a vision-capable model from MJ
9
+ * metadata, persists step media, AND forwards per-step progress for live narration.
10
+ *
11
+ * Called once at server startup from `agentSessions/index.ts` (the realtime composition point), so every
12
+ * goal-driven run on this process uses the MJ engine. Kept here (an application package), not in any library,
13
+ * because it is the seam where the transport-neutral CDP layer is wired to MJ's AI stack.
14
+ *
15
+ * @module @memberjunction/server
16
+ */
17
+ import { UserInfo, IMetadataProvider } from '@memberjunction/core';
18
+ import { MJAIAgentRunStepEntity } from '@memberjunction/core-entities';
19
+ import type { ComputerUseResult, RunComputerUseParams, StepRecord } from '@memberjunction/computer-use';
20
+ import { MJComputerUseEngine, MJRunComputerUseParams } from '@memberjunction/computer-use-engine';
21
+ import type { RemoteBrowserGoalResult } from '@memberjunction/remote-browser-base';
22
+ import { type ComputerUseGoalProgress, type ComputerUseGoalRun } from '@memberjunction/remote-browser-cdp';
23
+ /**
24
+ * Adapts the transport-neutral base computer-use params into {@link MJRunComputerUseParams}, injecting the
25
+ * acting user so the MJ engine can run its controller/judge prompts as that user. Pure + exported for unit
26
+ * testing; {@link MJProgressComputerUseEngine.Run} is a one-liner over it.
27
+ *
28
+ * @param params The base computer-use params the CDP session built (goal + step cap + start url).
29
+ * @param contextUser The acting MJ user (may be undefined; the MJ engine handles the unset case).
30
+ * @param agentRunID Optional parent agent-run id (links the goal's prompt runs to the realtime agent run).
31
+ * @param agentRunStepID Optional parent agent-run-step id (nests a child prompt step per prompt under it).
32
+ * @returns The MJ-aware params to hand to `MJComputerUseEngine.Run`.
33
+ */
34
+ export declare function buildMJGoalParams(params: RunComputerUseParams, contextUser?: UserInfo, agentRunID?: string, agentRunStepID?: string): MJRunComputerUseParams;
35
+ /**
36
+ * The MJ-aware goal engine bound in production. Extends {@link MJComputerUseEngine} (prompt-runner routing,
37
+ * vision-model auto-selection, credential resolution, media persistence) and satisfies the
38
+ * {@link ComputerUseGoalRun} seam:
39
+ *
40
+ * - {@link SetBrowserAdapter} / {@link Stop} are inherited from the base computer-use engine.
41
+ * - {@link OnProgress} + {@link ContextUser} are set by the CDP session before {@link Run}.
42
+ * - {@link Run} adapts the transport-neutral base params into {@link MJRunComputerUseParams} (injecting the
43
+ * acting user) so the MJ engine can run its prompts.
44
+ * - {@link onStepComplete} chains the MJ media-persistence behavior, then forwards a model-safe progress note.
45
+ */
46
+ export declare class MJProgressComputerUseEngine extends MJComputerUseEngine implements ComputerUseGoalRun {
47
+ /** Per-step progress hook the CDP session sets before {@link Run} (drives live narration). */
48
+ OnProgress?: (progress: ComputerUseGoalProgress) => void;
49
+ /** The MJ user the goal run executes as; the CDP session sets it from the session's context user. */
50
+ ContextUser?: UserInfo;
51
+ /** Parent agent-run id the CDP session sets before {@link Run} (links the goal's prompt runs to it). */
52
+ AgentRunID?: string;
53
+ /** Parent agent-run-step id the CDP session sets before {@link Run} (nests child prompt steps under it). */
54
+ AgentRunStepID?: string;
55
+ /**
56
+ * Adapts the transport-neutral base params into {@link MJRunComputerUseParams} (carrying the acting user
57
+ * + the parent run/step linkage) and delegates to the MJ engine, which auto-selects a vision-capable
58
+ * controller model from MJ metadata and nests a child step per prompt when the linkage is present.
59
+ *
60
+ * @param params The base computer-use params the CDP session built (goal + step cap + start url).
61
+ * @returns The computer-use run result.
62
+ */
63
+ Run(params: RunComputerUseParams): Promise<ComputerUseResult>;
64
+ protected onStepComplete(step: StepRecord, params: MJRunComputerUseParams): void;
65
+ }
66
+ /**
67
+ * Extracts the realtime co-agent observability run id from an `AIAgentSession.Config_` JSON blob (the
68
+ * `coAgentRunID` a voice session persists). Returns `undefined` for a missing/non-voice/un-parseable
69
+ * config — goal-run observability is best-effort and degrades to "no parent run" cleanly.
70
+ *
71
+ * @param configJson The session's `Config_` string.
72
+ * @returns The co-agent run id, or `undefined`.
73
+ */
74
+ export declare function extractCoAgentRunID(configJson: string | null | undefined): string | undefined;
75
+ /**
76
+ * Creates the parent `Tool` step ("Browser goal: …") on the realtime co-agent run for a goal-driven browser
77
+ * run — a single top-level timeline node the computer-use prompt steps then nest under. Best-effort: returns
78
+ * `null` (so the goal still runs, just unlinked) when there's no co-agent run to attach to, or on any error.
79
+ * Uses the shared {@link initAgentRunStep} helper so the field shape matches every other agent-run step.
80
+ *
81
+ * @param provider The metadata provider.
82
+ * @param contextUser The acting user.
83
+ * @param coAgentRunID The realtime co-agent run id (the parent run), or `undefined`.
84
+ * @param goal The natural-language goal (becomes the step name).
85
+ * @returns The saved parent step (to finalize + nest under), or `null`.
86
+ */
87
+ export declare function beginBrowserGoalStep(provider: IMetadataProvider, contextUser: UserInfo | undefined, coAgentRunID: string | undefined, goal: string): Promise<MJAIAgentRunStepEntity | null>;
88
+ /**
89
+ * Finalizes the parent browser-goal step from the goal outcome — `Completed`/`Failed` with an `OutputData`
90
+ * envelope of strategy/status/step-count/url. A no-op when `step` is `null`. Best-effort (logged, never thrown).
91
+ *
92
+ * @param step The parent step from {@link beginBrowserGoalStep} (or `null`).
93
+ * @param result The goal outcome.
94
+ */
95
+ export declare function finalizeBrowserGoalStep(step: MJAIAgentRunStepEntity | null, result: RemoteBrowserGoalResult): Promise<void>;
96
+ /**
97
+ * Binds the CDP goal-engine factory to {@link MJProgressComputerUseEngine}. Idempotent and safe to call at
98
+ * startup; failures are logged (never thrown) so a binding hiccup can't abort server boot — goal runs would
99
+ * simply fall back to the base engine.
100
+ */
101
+ export declare function BindRemoteBrowserGoalEngine(): void;
102
+ //# sourceMappingURL=remoteBrowserGoalEngine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remoteBrowserGoalEngine.d.ts","sourceRoot":"","sources":["../../src/agentSessions/remoteBrowserGoalEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAY,iBAAiB,EAAW,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAClG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAA8C,KAAK,uBAAuB,EAAE,KAAK,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAEvJ;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,oBAAoB,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAM5J;AAED;;;;;;;;;;GAUG;AACH,qBAAa,2BAA4B,SAAQ,mBAAoB,YAAW,kBAAkB;IAChG,8FAA8F;IACvF,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAEhE,qGAAqG;IAC9F,WAAW,CAAC,EAAE,QAAQ,CAAC;IAE9B,wGAAwG;IACjG,UAAU,CAAC,EAAE,MAAM,CAAC;IAE3B,4GAA4G;IACrG,cAAc,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;;;OAOG;IACmB,GAAG,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC;cAIhE,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,sBAAsB,GAAG,IAAI;CAI1F;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAU7F;AAQD;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,iBAAiB,EAC3B,WAAW,EAAE,QAAQ,GAAG,SAAS,EACjC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAuBxC;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBjI;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAMlD"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * @fileoverview **Production binding** of the Remote Browser goal-engine seam to MJ's computer-use engine.
3
+ *
4
+ * The CDP remote-browser session ({@link CdpRemoteBrowserSession}) runs goal-driven browser control through
5
+ * an injectable {@link ComputerUseGoalRun} factory. By default that factory yields a bare
6
+ * `ProgressComputerUseEngine` (base computer-use), which has no model auto-selection — so it can't run a goal
7
+ * unsupervised. This module binds the factory to {@link MJProgressComputerUseEngine}: an MJ-aware engine that
8
+ * routes controller/judge prompts through `AIPromptRunner`, auto-selects a vision-capable model from MJ
9
+ * metadata, persists step media, AND forwards per-step progress for live narration.
10
+ *
11
+ * Called once at server startup from `agentSessions/index.ts` (the realtime composition point), so every
12
+ * goal-driven run on this process uses the MJ engine. Kept here (an application package), not in any library,
13
+ * because it is the seam where the transport-neutral CDP layer is wired to MJ's AI stack.
14
+ *
15
+ * @module @memberjunction/server
16
+ */
17
+ import { LogError, RunView } from '@memberjunction/core';
18
+ import { initAgentRunStep, finalizeAgentRunStep } from '@memberjunction/ai-core-plus';
19
+ import { MJComputerUseEngine, MJRunComputerUseParams } from '@memberjunction/computer-use-engine';
20
+ import { buildProgressNote, CdpRemoteBrowserSession } from '@memberjunction/remote-browser-cdp';
21
+ /**
22
+ * Adapts the transport-neutral base computer-use params into {@link MJRunComputerUseParams}, injecting the
23
+ * acting user so the MJ engine can run its controller/judge prompts as that user. Pure + exported for unit
24
+ * testing; {@link MJProgressComputerUseEngine.Run} is a one-liner over it.
25
+ *
26
+ * @param params The base computer-use params the CDP session built (goal + step cap + start url).
27
+ * @param contextUser The acting MJ user (may be undefined; the MJ engine handles the unset case).
28
+ * @param agentRunID Optional parent agent-run id (links the goal's prompt runs to the realtime agent run).
29
+ * @param agentRunStepID Optional parent agent-run-step id (nests a child prompt step per prompt under it).
30
+ * @returns The MJ-aware params to hand to `MJComputerUseEngine.Run`.
31
+ */
32
+ export function buildMJGoalParams(params, contextUser, agentRunID, agentRunStepID) {
33
+ const mjParams = Object.assign(new MJRunComputerUseParams(), params);
34
+ mjParams.ContextUser = contextUser;
35
+ mjParams.AgentRunId = agentRunID;
36
+ mjParams.AgentRunStepID = agentRunStepID;
37
+ return mjParams;
38
+ }
39
+ /**
40
+ * The MJ-aware goal engine bound in production. Extends {@link MJComputerUseEngine} (prompt-runner routing,
41
+ * vision-model auto-selection, credential resolution, media persistence) and satisfies the
42
+ * {@link ComputerUseGoalRun} seam:
43
+ *
44
+ * - {@link SetBrowserAdapter} / {@link Stop} are inherited from the base computer-use engine.
45
+ * - {@link OnProgress} + {@link ContextUser} are set by the CDP session before {@link Run}.
46
+ * - {@link Run} adapts the transport-neutral base params into {@link MJRunComputerUseParams} (injecting the
47
+ * acting user) so the MJ engine can run its prompts.
48
+ * - {@link onStepComplete} chains the MJ media-persistence behavior, then forwards a model-safe progress note.
49
+ */
50
+ export class MJProgressComputerUseEngine extends MJComputerUseEngine {
51
+ /**
52
+ * Adapts the transport-neutral base params into {@link MJRunComputerUseParams} (carrying the acting user
53
+ * + the parent run/step linkage) and delegates to the MJ engine, which auto-selects a vision-capable
54
+ * controller model from MJ metadata and nests a child step per prompt when the linkage is present.
55
+ *
56
+ * @param params The base computer-use params the CDP session built (goal + step cap + start url).
57
+ * @returns The computer-use run result.
58
+ */
59
+ async Run(params) {
60
+ return super.Run(buildMJGoalParams(params, this.ContextUser, this.AgentRunID, this.AgentRunStepID));
61
+ }
62
+ onStepComplete(step, params) {
63
+ super.onStepComplete(step, params); // keep MJ media persistence
64
+ this.OnProgress?.(buildProgressNote(step)); // shared note shape with the base ProgressComputerUseEngine
65
+ }
66
+ }
67
+ /**
68
+ * Extracts the realtime co-agent observability run id from an `AIAgentSession.Config_` JSON blob (the
69
+ * `coAgentRunID` a voice session persists). Returns `undefined` for a missing/non-voice/un-parseable
70
+ * config — goal-run observability is best-effort and degrades to "no parent run" cleanly.
71
+ *
72
+ * @param configJson The session's `Config_` string.
73
+ * @returns The co-agent run id, or `undefined`.
74
+ */
75
+ export function extractCoAgentRunID(configJson) {
76
+ if (!configJson) {
77
+ return undefined;
78
+ }
79
+ try {
80
+ const parsed = JSON.parse(configJson);
81
+ return typeof parsed.coAgentRunID === 'string' ? parsed.coAgentRunID : undefined;
82
+ }
83
+ catch {
84
+ return undefined;
85
+ }
86
+ }
87
+ /** Truncates a goal to a step-name-friendly length. */
88
+ function goalStepName(goal) {
89
+ const trimmed = goal.trim();
90
+ return `Browser goal: ${trimmed.length > 120 ? `${trimmed.slice(0, 120)}…` : trimmed}`;
91
+ }
92
+ /**
93
+ * Creates the parent `Tool` step ("Browser goal: …") on the realtime co-agent run for a goal-driven browser
94
+ * run — a single top-level timeline node the computer-use prompt steps then nest under. Best-effort: returns
95
+ * `null` (so the goal still runs, just unlinked) when there's no co-agent run to attach to, or on any error.
96
+ * Uses the shared {@link initAgentRunStep} helper so the field shape matches every other agent-run step.
97
+ *
98
+ * @param provider The metadata provider.
99
+ * @param contextUser The acting user.
100
+ * @param coAgentRunID The realtime co-agent run id (the parent run), or `undefined`.
101
+ * @param goal The natural-language goal (becomes the step name).
102
+ * @returns The saved parent step (to finalize + nest under), or `null`.
103
+ */
104
+ export async function beginBrowserGoalStep(provider, contextUser, coAgentRunID, goal) {
105
+ if (!coAgentRunID) {
106
+ return null;
107
+ }
108
+ try {
109
+ const rv = new RunView();
110
+ const countResult = await rv.RunView({ EntityName: 'MJ: AI Agent Run Steps', ExtraFilter: `AgentRunID='${coAgentRunID.replace(/'/g, "''")}'`, Fields: ['ID'], ResultType: 'simple' }, contextUser);
111
+ const stepNumber = (countResult.Success ? (countResult.Results?.length ?? 0) : 0) + 1;
112
+ const step = await provider.GetEntityObject('MJ: AI Agent Run Steps', contextUser);
113
+ step.NewRecord();
114
+ initAgentRunStep(step, { AgentRunID: coAgentRunID, StepNumber: stepNumber, StepType: 'Tool', StepName: goalStepName(goal) });
115
+ if (await step.Save()) {
116
+ return step;
117
+ }
118
+ LogError(`[RemoteBrowserGoalEngine] beginBrowserGoalStep save failed: ${step.LatestResult?.CompleteMessage ?? 'unknown error'}`);
119
+ return null;
120
+ }
121
+ catch (err) {
122
+ LogError(`[RemoteBrowserGoalEngine] beginBrowserGoalStep threw: ${err instanceof Error ? err.message : String(err)}`);
123
+ return null;
124
+ }
125
+ }
126
+ /**
127
+ * Finalizes the parent browser-goal step from the goal outcome — `Completed`/`Failed` with an `OutputData`
128
+ * envelope of strategy/status/step-count/url. A no-op when `step` is `null`. Best-effort (logged, never thrown).
129
+ *
130
+ * @param step The parent step from {@link beginBrowserGoalStep} (or `null`).
131
+ * @param result The goal outcome.
132
+ */
133
+ export async function finalizeBrowserGoalStep(step, result) {
134
+ if (!step) {
135
+ return;
136
+ }
137
+ try {
138
+ finalizeAgentRunStep(step, {
139
+ success: result.Success,
140
+ errorMessage: result.Success ? undefined : result.Detail,
141
+ outputData: { strategy: result.Strategy, status: result.Status, stepCount: result.StepCount, currentUrl: result.CurrentUrl },
142
+ });
143
+ if (!(await step.Save())) {
144
+ LogError(`[RemoteBrowserGoalEngine] finalizeBrowserGoalStep save failed: ${step.LatestResult?.CompleteMessage ?? 'unknown error'}`);
145
+ }
146
+ }
147
+ catch (err) {
148
+ LogError(`[RemoteBrowserGoalEngine] finalizeBrowserGoalStep threw: ${err instanceof Error ? err.message : String(err)}`);
149
+ }
150
+ }
151
+ /**
152
+ * Binds the CDP goal-engine factory to {@link MJProgressComputerUseEngine}. Idempotent and safe to call at
153
+ * startup; failures are logged (never thrown) so a binding hiccup can't abort server boot — goal runs would
154
+ * simply fall back to the base engine.
155
+ */
156
+ export function BindRemoteBrowserGoalEngine() {
157
+ try {
158
+ CdpRemoteBrowserSession.SetGoalEngineFactory(() => new MJProgressComputerUseEngine());
159
+ }
160
+ catch (err) {
161
+ LogError(`[RemoteBrowserGoalEngine] Failed to bind MJ computer-use goal engine: ${err instanceof Error ? err.message : String(err)}`);
162
+ }
163
+ }
164
+ //# sourceMappingURL=remoteBrowserGoalEngine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remoteBrowserGoalEngine.js","sourceRoot":"","sources":["../../src/agentSessions/remoteBrowserGoalEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAY,QAAQ,EAAqB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,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AY,EAAE,eAAe,IAAI,eAAe,EAAE,CAAC,CAAC;QACtI,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,QAAQ,CAAC,4DAA4D,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC3H,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B;IACzC,IAAI,CAAC;QACH,uBAAuB,CAAC,oBAAoB,CAAC,GAAG,EAAE,CAAC,IAAI,2BAA2B,EAAE,CAAC,CAAC;IACxF,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,QAAQ,CAAC,yEAAyE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACxI,CAAC;AACH,CAAC"}
@@ -0,0 +1,66 @@
1
+ import { BaseSingleton } from '@memberjunction/global';
2
+ /**
3
+ * Terminal/structural outcome of a remote-browser goal run — the fields the client needs to render
4
+ * the result, decoupled from the GraphQL `RemoteBrowserGoalResultType` (avoids a resolver↔registry
5
+ * import cycle) and from the engine's `RemoteBrowserGoalResult` (whose `Strategy` is a string union).
6
+ */
7
+ export interface RemoteBrowserGoalOutcome {
8
+ Success: boolean;
9
+ Strategy?: string;
10
+ CurrentUrl?: string;
11
+ Status?: string;
12
+ StepCount?: number;
13
+ Detail?: string;
14
+ }
15
+ type GoalRunStatus = 'Running' | 'Complete';
16
+ /** One tracked goal run: its lifecycle status plus the terminal outcome once it finishes. */
17
+ export interface GoalRunRecord {
18
+ GoalRunID: string;
19
+ /** Lowercased `AIAgentSession` id the goal runs against (one in-flight goal per session). */
20
+ AgentSessionID: string;
21
+ Status: GoalRunStatus;
22
+ Outcome?: RemoteBrowserGoalOutcome;
23
+ StartedAt: number;
24
+ CompletedAt?: number;
25
+ }
26
+ /**
27
+ * Process-local registry of in-flight + recently-completed remote-browser GOAL runs.
28
+ *
29
+ * ## Why this exists
30
+ * A goal-driven browser run (computer-use loop) can take many minutes. Running it inside a single
31
+ * synchronous GraphQL mutation means the client holds one long-lived HTTP request open for the whole
32
+ * loop — fragile against browser fetch timeouts, proxy/ngrok idle limits, and session-janitor churn.
33
+ * Observed symptom: the loop completes successfully server-side but the client's request has already
34
+ * died, so the agent gets "no response from the server" and never learns the outcome.
35
+ *
36
+ * The fix is async: the start mutation kicks the goal off and registers it here (status `Running`),
37
+ * returning a `GoalRunID` immediately; the client then POLLS a short query that reads this registry
38
+ * until the run is `Complete`. Every request stays short, so no transport boundary times out.
39
+ *
40
+ * Keyed by `AIAgentSession` id (at most one in-flight goal per session, mirroring the engine's
41
+ * per-session abort registry). Process-local is correct: the browser session — and thus the goal —
42
+ * is pinned to the MJAPI instance hosting its CDP connection, the same instance the client's
43
+ * session-scoped mutations already target.
44
+ */
45
+ export declare class RemoteBrowserGoalRegistry extends BaseSingleton<RemoteBrowserGoalRegistry> {
46
+ private runs;
47
+ protected constructor();
48
+ static get Instance(): RemoteBrowserGoalRegistry;
49
+ private key;
50
+ /** Registers a newly-started goal as `Running`, replacing any prior record for the session. */
51
+ Begin(agentSessionID: string, goalRunID: string): void;
52
+ /**
53
+ * Marks a goal run `Complete` with its terminal outcome. No-op when the session's current record is
54
+ * for a DIFFERENT `goalRunID` (a newer goal superseded it) — the stale completion is dropped.
55
+ */
56
+ Complete(agentSessionID: string, goalRunID: string, outcome: RemoteBrowserGoalOutcome): void;
57
+ /**
58
+ * Returns the tracked record for a session, or `undefined` when none exists or `goalRunID` is
59
+ * supplied and doesn't match the current run (so a poll for an expired/superseded id reads nothing).
60
+ */
61
+ Get(agentSessionID: string, goalRunID?: string): GoalRunRecord | undefined;
62
+ /** Drops completed records past their TTL and never-completing records past the safety cap. */
63
+ private sweep;
64
+ }
65
+ export {};
66
+ //# sourceMappingURL=remoteBrowserGoalReg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G,aAAa,GAAG,SAAS;IAYjF,+FAA+F;IAC/F,OAAO,CAAC,KAAK;CAWd"}
@@ -0,0 +1,86 @@
1
+ import { BaseSingleton } from '@memberjunction/global';
2
+ /** Default time a COMPLETED record is retained so a slow poller can still read it (then swept). */
3
+ const COMPLETED_TTL_MS = 5 * 60 * 1000;
4
+ /** Safety cap: a record that never completes (e.g. a crashed loop) is swept after this long. */
5
+ const RUNNING_MAX_MS = 30 * 60 * 1000;
6
+ /**
7
+ * Process-local registry of in-flight + recently-completed remote-browser GOAL runs.
8
+ *
9
+ * ## Why this exists
10
+ * A goal-driven browser run (computer-use loop) can take many minutes. Running it inside a single
11
+ * synchronous GraphQL mutation means the client holds one long-lived HTTP request open for the whole
12
+ * loop — fragile against browser fetch timeouts, proxy/ngrok idle limits, and session-janitor churn.
13
+ * Observed symptom: the loop completes successfully server-side but the client's request has already
14
+ * died, so the agent gets "no response from the server" and never learns the outcome.
15
+ *
16
+ * The fix is async: the start mutation kicks the goal off and registers it here (status `Running`),
17
+ * returning a `GoalRunID` immediately; the client then POLLS a short query that reads this registry
18
+ * until the run is `Complete`. Every request stays short, so no transport boundary times out.
19
+ *
20
+ * Keyed by `AIAgentSession` id (at most one in-flight goal per session, mirroring the engine's
21
+ * per-session abort registry). Process-local is correct: the browser session — and thus the goal —
22
+ * is pinned to the MJAPI instance hosting its CDP connection, the same instance the client's
23
+ * session-scoped mutations already target.
24
+ */
25
+ export class RemoteBrowserGoalRegistry extends BaseSingleton {
26
+ constructor() {
27
+ super();
28
+ this.runs = new Map();
29
+ }
30
+ static get Instance() {
31
+ return super.getInstance();
32
+ }
33
+ key(agentSessionID) {
34
+ return (agentSessionID ?? '').toLowerCase();
35
+ }
36
+ /** Registers a newly-started goal as `Running`, replacing any prior record for the session. */
37
+ Begin(agentSessionID, goalRunID) {
38
+ this.sweep();
39
+ this.runs.set(this.key(agentSessionID), {
40
+ GoalRunID: goalRunID,
41
+ AgentSessionID: this.key(agentSessionID),
42
+ Status: 'Running',
43
+ StartedAt: Date.now(),
44
+ });
45
+ }
46
+ /**
47
+ * Marks a goal run `Complete` with its terminal outcome. No-op when the session's current record is
48
+ * for a DIFFERENT `goalRunID` (a newer goal superseded it) — the stale completion is dropped.
49
+ */
50
+ Complete(agentSessionID, goalRunID, outcome) {
51
+ const rec = this.runs.get(this.key(agentSessionID));
52
+ if (!rec || rec.GoalRunID !== goalRunID) {
53
+ return;
54
+ }
55
+ rec.Status = 'Complete';
56
+ rec.Outcome = outcome;
57
+ rec.CompletedAt = Date.now();
58
+ }
59
+ /**
60
+ * Returns the tracked record for a session, or `undefined` when none exists or `goalRunID` is
61
+ * supplied and doesn't match the current run (so a poll for an expired/superseded id reads nothing).
62
+ */
63
+ Get(agentSessionID, goalRunID) {
64
+ this.sweep();
65
+ const rec = this.runs.get(this.key(agentSessionID));
66
+ if (!rec) {
67
+ return undefined;
68
+ }
69
+ if (goalRunID && rec.GoalRunID !== goalRunID) {
70
+ return undefined;
71
+ }
72
+ return rec;
73
+ }
74
+ /** Drops completed records past their TTL and never-completing records past the safety cap. */
75
+ sweep() {
76
+ const now = Date.now();
77
+ for (const [k, rec] of this.runs) {
78
+ const expired = (rec.Status === 'Complete' && rec.CompletedAt != null && now - rec.CompletedAt > COMPLETED_TTL_MS) ||
79
+ now - rec.StartedAt > RUNNING_MAX_MS;
80
+ if (expired) {
81
+ this.runs.delete(k);
82
+ }
83
+ }
84
+ }
85
+ }
86
+ //# sourceMappingURL=remoteBrowserGoalRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remoteBrowserGoalRegistry.js","sourceRoot":"","sources":["../../src/agentSessions/remoteBrowserGoalRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AA6BvD,mGAAmG;AACnG,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AACvC,gGAAgG;AAChG,MAAM,cAAc,GAAG,EAAE,GAAG,EAA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M,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;QACpD,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,IAAI,SAAS,IAAI,GAAG,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YAC7C,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,+FAA+F;IACvF,KAAK;QACX,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,KAAK,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,MAAM,OAAO,GACX,CAAC,GAAG,CAAC,MAAM,KAAK,UAAU,IAAI,GAAG,CAAC,WAAW,IAAI,IAAI,IAAI,GAAG,GAAG,GAAG,CAAC,WAAW,GAAG,gBAAgB,CAAC;gBAClG,GAAG,GAAG,GAAG,CAAC,SAAS,GAAG,cAAc,CAAC;YACvC,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializeProviders.d.ts","sourceRoot":"","sources":["../../src/auth/initializeProviders.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CA2B9C"}
1
+ {"version":3,"file":"initializeProviders.d.ts","sourceRoot":"","sources":["../../src/auth/initializeProviders.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAyB9C"}
@@ -1,7 +1,6 @@
1
1
  import { configInfo } from '../config.js';
2
- import { LogError, LogStatus } from '@memberjunction/core';
2
+ import { LogError } from '@memberjunction/core';
3
3
  import { AuthProviderFactory } from '@memberjunction/auth-providers';
4
- import { StartupLogger } from '../logging/StartupLogger.js';
5
4
  /**
6
5
  * Initialize authentication providers from configuration
7
6
  */
@@ -14,12 +13,10 @@ export function initializeAuthProviders() {
14
13
  for (const providerConfig of configInfo.authProviders) {
15
14
  try {
16
15
  const provider = AuthProviderFactory.createProvider(providerConfig);
16
+ // register() emits the verbose-only "Registered auth provider: … with issuer: …" line
17
+ // (gated by the global verbose flag). Provider NAMES are surfaced compactly in the
18
+ // startup summary `Auth` line at `standard`.
17
19
  factory.register(provider);
18
- // Per-provider registration detail — verbose-only. The provider NAMES are
19
- // surfaced compactly in the startup summary `Auth` line at `standard`.
20
- if (new StartupLogger().IsAtLeast('verbose')) {
21
- LogStatus(`Registered auth provider: ${provider.name} (type: ${providerConfig.type})`);
22
- }
23
20
  }
24
21
  catch (error) {
25
22
  LogError(`Failed to initialize auth provider ${providerConfig.name}: ${error}`);
@@ -1 +1 @@
1
- {"version":3,"file":"initializeProviders.js","sourceRoot":"","sources":["../../src/auth/initializeProviders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAsB,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC;IAE7C,+BAA+B;IAC/B,OAAO,CAAC,KAAK,EAAE,CAAC;IAEhB,iDAAiD;IACjD,IAAI,UAAU,CAAC,aAAa,IAAI,UAAU,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpE,KAAK,MAAM,cAAc,IAAI,UAAU,CAAC,aAAa,EAAE,CAAC;YACtD,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,mBAAmB,CAA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BACtF,mFAAmF;gBACnF,6CAA6C;gBAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,QAAQ,CAAC,sCAAsC,cAAc,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC;YAClF,CAAC;QACH,CAAC;IACH,CAAC;IAED,yCAAyC;IACzC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;QAC5B,QAAQ,CAAC,+FAA+F,CAAC,CAAC;IAC5G,CAAC;AACH,CAAC"}
package/dist/config.d.ts CHANGED
@@ -2136,6 +2136,13 @@ export type ConfigInfo = z.infer<typeof configInfoSchema>;
2136
2136
  * than both the environment variable AND the default value.
2137
2137
  */
2138
2138
  export declare const DEFAULT_SERVER_CONFIG: Partial<ConfigInfo>;
2139
+ /**
2140
+ * Absolute path to the resolved config file, captured during {@link loadConfig}.
2141
+ * `undefined` when no config file was found (defaults in use). Rendered in the
2142
+ * startup summary `Config` line. Declared before `configInfo` so the assignment
2143
+ * inside `loadConfig()` (invoked below) is not in its temporal dead zone.
2144
+ */
2145
+ export declare let configFilePath: string | undefined;
2139
2146
  export declare const configInfo: ConfigInfo;
2140
2147
  export declare const dbUsername: string, dbPassword: string, dbHost: string, dbDatabase: string, dbPort: number, dbTrustServerCertificate: "Y" | "N", dbInstanceName: string, graphqlPort: number, ___codeGenAPIURL: string, ___codeGenAPIPort: number, ___codeGenAPISubmissionDelay: number, graphqlRootPath: string, enableIntrospection: boolean, websiteRunFromPackage: number, userEmailMap: Record<string, string>, apiKey: string, baseUrl: string, publicUrl: string, mj_core_schema: string, dbReadOnlyUsername: string, dbReadOnlyPassword: string, RESTApiOptions: {
2141
2148
  enabled?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BzB"}
package/dist/config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { cosmiconfigSync } from 'cosmiconfig';
3
- import { LogError, LogStatus } from '@memberjunction/core';
3
+ import { LogError, LogStatus, LogStatusEx } from '@memberjunction/core';
4
4
  import { mergeConfigs, parseBooleanEnv } from '@memberjunction/config';
5
5
  const explorer = cosmiconfigSync('mj', { searchStrategy: 'global' });
6
6
  const userHandlingInfoSchema = z.object({
@@ -520,6 +520,13 @@ export const DEFAULT_SERVER_CONFIG = {
520
520
  } : null,
521
521
  ].filter(Boolean),
522
522
  };
523
+ /**
524
+ * Absolute path to the resolved config file, captured during {@link loadConfig}.
525
+ * `undefined` when no config file was found (defaults in use). Rendered in the
526
+ * startup summary `Config` line. Declared before `configInfo` so the assignment
527
+ * inside `loadConfig()` (invoked below) is not in its temporal dead zone.
528
+ */
529
+ export let configFilePath;
523
530
  export const configInfo = loadConfig();
524
531
  export const { dbUsername, dbPassword, dbHost, dbDatabase, dbPort, dbTrustServerCertificate, dbInstanceName, graphqlPort, ___codeGenAPIURL, ___codeGenAPIPort, ___codeGenAPISubmissionDelay, graphqlRootPath, enableIntrospection, websiteRunFromPackage, userEmailMap, apiKey, baseUrl, publicUrl, mjCoreSchema: mj_core_schema, dbReadOnlyUsername, dbReadOnlyPassword, restApiOptions: RESTApiOptions, } = configInfo;
525
532
  export function loadConfig() {
@@ -528,7 +535,10 @@ export function loadConfig() {
528
535
  let mergedConfig = DEFAULT_SERVER_CONFIG;
529
536
  // If user config exists, merge it with defaults
530
537
  if (configSearchResult && !configSearchResult.isEmpty) {
531
- LogStatus(`Config file found at ${configSearchResult.filepath}`);
538
+ // Resolved config-file path. Surfaced in the startup summary `Config` line at standard
539
+ // level (see StartupLogger). Demoted to verbose-only here to avoid a duplicate inline line.
540
+ configFilePath = configSearchResult.filepath;
541
+ LogStatusEx({ message: `Config file found at ${configSearchResult.filepath}`, verboseOnly: true });
532
542
  // Merge user config with defaults (user config takes precedence)
533
543
  mergedConfig = mergeConfigs(DEFAULT_SERVER_CONFIG, configSearchResult.config);
534
544
  }