@gendigital/sage-openclaw 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -21050,7 +21050,7 @@ function createOpenClawScanHandler(logger, context, branding2 = defaultBranding,
21050
21050
  branding: branding2,
21051
21051
  onResult,
21052
21052
  // No onNotices: OpenClaw delivers the one-time notice from
21053
- // `before_agent_start` (a different process/turn than this scan) via
21053
+ // `before_prompt_build` (a different process/turn than this scan) via
21054
21054
  // takePendingNotices, so the scan-time callback would never fire.
21055
21055
  modelDownloadWorkerPath: (0, import_node_path28.resolve)(__dirname, "model-download-worker.cjs"),
21056
21056
  skillUploadWorkerPath: (0, import_node_path28.resolve)(__dirname, "skill-upload-worker.cjs"),
@@ -21065,15 +21065,15 @@ function createStartupScanHandler(logger, branding2 = defaultBranding, onResult,
21065
21065
  function createSessionScanHandler(logger, branding2 = defaultBranding, onResult, announceCleanScans = true) {
21066
21066
  return createOpenClawScanHandler(logger, "session", branding2, onResult, announceCleanScans);
21067
21067
  }
21068
- function createBeforeAgentStartHandler(getSecurityFindings, clearFindings, logger, branding2 = defaultBranding) {
21068
+ function createPromptContextHandler(getSecurityFindings, clearFindings, logger, branding2 = defaultBranding) {
21069
21069
  return (notices) => {
21070
21070
  const findings = getSecurityFindings();
21071
21071
  if (!notices && !findings) {
21072
- logger.debug(`${branding2.name}: before_agent_start - nothing pending to surface`);
21072
+ logger.debug(`${branding2.name}: before_prompt_build - nothing pending to surface`);
21073
21073
  return void 0;
21074
21074
  }
21075
21075
  if (findings) clearFindings();
21076
- logger.debug(`${branding2.name}: surfacing context via before_agent_start`, {
21076
+ logger.debug(`${branding2.name}: surfacing context via before_prompt_build`, {
21077
21077
  hasNotices: Boolean(notices),
21078
21078
  hasFindings: Boolean(findings)
21079
21079
  });
@@ -21326,7 +21326,7 @@ ${notice}` : notice;
21326
21326
  pendingScanFindings = msg;
21327
21327
  };
21328
21328
  const getPendingSecurityFindings = () => [pendingConfigurationWarnings, pendingScanFindings].filter(Boolean).join("\n\n") || null;
21329
- const beforeAgentStartHandler = createBeforeAgentStartHandler(
21329
+ const promptContextHandler = createPromptContextHandler(
21330
21330
  getPendingSecurityFindings,
21331
21331
  () => {
21332
21332
  pendingConfigurationWarnings = null;
@@ -21362,10 +21362,10 @@ ${notice}` : notice;
21362
21362
  "session_start",
21363
21363
  createSessionScanHandler(scanLogger, branding, onFindings, config.announce_clean_scans)
21364
21364
  );
21365
- api.on("before_agent_start", async () => {
21365
+ api.on("before_prompt_build", async () => {
21366
21366
  await migrationCheckPromise;
21367
21367
  const notices = await resolveNoticeText();
21368
- return beforeAgentStartHandler(notices);
21368
+ return promptContextHandler(notices);
21369
21369
  });
21370
21370
  }
21371
21371
  };