惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
T
Tailwind CSS Blog
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
博客园 - 叶小钗
N
Netflix TechBlog - Medium
罗磊的独立博客
量子位
MyScale Blog
MyScale Blog
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
B
Blog
腾讯CDC
爱范儿
爱范儿
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
F
Fortinet All Blogs
雷峰网
雷峰网
G
Google Developers Blog
Google DeepMind News
Google DeepMind News

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(cron): clarify no-delivery previews · openclaw/opencl...
steipete · 2026-05-04 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -37,6 +37,7 @@ Docs: https://docs.openclaw.ai

3737

- Channels/streaming: expose `streaming.progress.label`, `labels`, `maxLines`, and `toolProgress` in bundled channel config metadata so progress draft settings appear in config, docs, and control surfaces. Thanks @vincentkoc.

3838

- Channels/streaming: normalize whitespace and case for `streaming.progress.label: "auto"` so progress draft labels keep using the built-in label pool instead of rendering a literal `auto` title. Thanks @vincentkoc.

3939

- Gateway/install: prefer supported system Node over nvm/fnm/volta/asdf/mise when regenerating managed gateway services, so `gateway install --force` no longer recreates service definitions that doctor immediately flags as version-manager-backed. Fixes #76339. Thanks @brokemac79.

40+

- Cron/status: render explicit `delivery.mode: "none"` jobs as no-delivery previews and label cron session history distinctly instead of showing fallback delivery or direct-session rows. Fixes #76945.

4041

- Gateway/usage: serve `usage.cost` and `sessions.usage` from a durable transcript aggregate cache with lock-safe background refreshes and localized stale-cache status, so large usage views avoid repeated full scans. (#76650) Thanks @Marvinthebored.

4142

- Plugins/hooks: let `plugins.entries.<id>.hooks.timeoutMs` and `plugins.entries.<id>.hooks.timeouts` bound plugin typed hooks from operator config, so slow hooks can be tuned without patching installed plugin code. Fixes #76778. Thanks @vincentkoc.

4243

- Telegram: add `channels.telegram.mediaGroupFlushMs` at the top level and per account so operators can tune album buffering instead of being stuck with the hard-coded 500ms media-group flush window. Fixes #76149. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

@@ -103,10 +103,13 @@ struct SessionRow: Identifiable {

103103

}

104104
105105

enum SessionKind {

106-

case direct, group, global, unknown

106+

case cron, direct, group, global, unknown

107107
108108

static func from(key: String) -> SessionKind {

109109

if key == "global" { return .global }

110+

let parts = key.lowercased().split(separator: ":").filter { !$0.isEmpty }

111+

if parts.first == "cron" { return .cron }

112+

if parts.count >= 3, parts[0] == "agent", parts[2] == "cron" { return .cron }

110113

if key.hasPrefix("group:") { return .group }

111114

if key.contains(":group:") { return .group }

112115

if key.contains(":channel:") { return .group }

@@ -116,6 +119,7 @@ enum SessionKind {

116119
117120

var label: String {

118121

switch self {

122+

case .cron: "Cron"

119123

case .direct: "Direct"

120124

case .group: "Group"

121125

case .global: "Global"

@@ -125,6 +129,7 @@ enum SessionKind {

125129
126130

var tint: Color {

127131

switch self {

132+

case .cron: .green

128133

case .direct: .accentColor

129134

case .group: .orange

130135

case .global: .purple

Original file line numberDiff line numberDiff line change

@@ -5,6 +5,8 @@ import Testing

55

struct SessionDataTests {

66

@Test func `session kind from key detects common kinds`() {

77

#expect(SessionKind.from(key: "global") == .global)

8+

#expect(SessionKind.from(key: "cron:daily") == .cron)

9+

#expect(SessionKind.from(key: "agent:main:cron:daily") == .cron)

810

#expect(SessionKind.from(key: "discord:group:engineering") == .group)

911

#expect(SessionKind.from(key: "unknown") == .unknown)

1012

#expect(SessionKind.from(key: "user@example.com") == .direct)

Original file line numberDiff line numberDiff line change

@@ -5,6 +5,7 @@ import { loadSessionStore, resolveSessionTotalTokens } from "../config/sessions.

55

import { info } from "../globals.js";

66

import { parseAgentSessionKey } from "../routing/session-key.js";

77

import { type RuntimeEnv, writeRuntimeJson } from "../runtime.js";

8+

import { isCronSessionKey } from "../sessions/session-key-utils.js";

89

import { createLazyImportLoader } from "../shared/lazy-promise.js";

910

import { isRich, theme } from "../terminal/theme.js";

1011

import { resolveSessionStoreTargetsOrExit } from "./session-store-targets.js";

@@ -27,7 +28,7 @@ import {

2728
2829

type SessionRow = SessionDisplayRow & {

2930

agentId: string;

30-

kind: "direct" | "group" | "global" | "unknown";

31+

kind: "cron" | "direct" | "group" | "global" | "unknown";

3132

agentRuntime: ReturnType<typeof resolveAgentRuntimeMetadata>;

3233

};

3334

@@ -84,6 +85,9 @@ function classifySessionKey(key: string, entry?: { chatType?: string | null }):

8485

if (key === "unknown") {

8586

return "unknown";

8687

}

88+

if (isCronSessionKey(key)) {

89+

return "cron";

90+

}

8791

if (entry?.chatType === "group" || entry?.chatType === "channel") {

8892

return "group";

8993

}

Original file line numberDiff line numberDiff line change

@@ -70,6 +70,19 @@ describe("status.command-sections", () => {

7070

contextTokens: null,

7171

flags: [],

7272

},

73+

{

74+

key: "agent:main:cron:daily-digest",

75+

kind: "cron",

76+

updatedAt: 2,

77+

age: 7_000,

78+

model: "gpt-5.5",

79+

totalTokens: null,

80+

totalTokensFresh: false,

81+

remainingTokens: null,

82+

percentUsed: null,

83+

contextTokens: null,

84+

flags: [],

85+

},

7386

],

7487

verbose: true,

7588

shortenText: (value) => value.slice(0, 8),

@@ -88,6 +101,14 @@ describe("status.command-sections", () => {

88101

Tokens: "12k",

89102

Cache: "cache ok",

90103

},

104+

{

105+

Key: "agent:ma",

106+

Kind: "cron",

107+

Age: "7000ms",

108+

Model: "gpt-5.5",

109+

Tokens: "12k",

110+

Cache: "cache ok",

111+

},

91112

]);

92113
93114

const emptyRows = buildStatusSessionsRows({

Original file line numberDiff line numberDiff line change

@@ -41,6 +41,15 @@ describe("statusSummaryRuntime.resolveContextTokensForModel", () => {

4141

});

4242

});

4343
44+

describe("statusSummaryRuntime.classifySessionKey", () => {

45+

it("classifies cron history sessions distinctly", () => {

46+

expect(statusSummaryRuntime.classifySessionKey("agent:main:cron:daily-digest")).toBe("cron");

47+

expect(

48+

statusSummaryRuntime.classifySessionKey("agent:avery:cron:daily-digest:run:abc123"),

49+

).toBe("cron");

50+

});

51+

});

52+
4453

describe("statusSummaryRuntime.resolveSessionModelRef", () => {

4554

const cfg = {

4655

agents: {

Original file line numberDiff line numberDiff line change

@@ -5,6 +5,7 @@ import { normalizeProviderId } from "../agents/provider-id.js";

55

import { resolveAgentModelPrimaryValue } from "../config/model-input.js";

66

import type { SessionEntry } from "../config/sessions/types.js";

77

import type { OpenClawConfig } from "../config/types.js";

8+

import { isCronSessionKey } from "../sessions/session-key-utils.js";

89

import {

910

normalizeLowercaseStringOrEmpty,

1011

normalizeOptionalString,

@@ -129,6 +130,9 @@ function classifySessionKey(key: string, entry?: SessionEntry) {

129130

if (key === "unknown") {

130131

return "unknown";

131132

}

133+

if (isCronSessionKey(key)) {

134+

return "cron";

135+

}

132136

if (entry?.chatType === "group" || entry?.chatType === "channel") {

133137

return "group";

134138

}

Original file line numberDiff line numberDiff line change

@@ -5,7 +5,7 @@ import type { TaskRegistrySummary } from "../tasks/task-registry.types.js";

55

export type SessionStatus = {

66

agentId?: string;

77

key: string;

8-

kind: "direct" | "group" | "global" | "unknown";

8+

kind: "cron" | "direct" | "group" | "global" | "unknown";

99

sessionId?: string;

1010

updatedAt: number | null;

1111

age: number | null;

Original file line numberDiff line numberDiff line change

@@ -51,4 +51,19 @@ describe("resolveCronDeliveryPreview", () => {

5151

"resolved from last, session agent:avery:telegram:direct:direct-123",

5252

);

5353

});

54+
55+

it("does not resolve routes for explicit no-delivery jobs", async () => {

56+

const job = makeCronJob({

57+

delivery: { mode: "none" },

58+

sessionTarget: "isolated",

59+

});

60+
61+

const preview = await resolveCronDeliveryPreview({

62+

cfg: {} as never,

63+

job,

64+

});

65+
66+

expect(preview).toEqual({ label: "not requested", detail: "not requested" });

67+

expect(mocks.resolveDeliveryTarget).not.toHaveBeenCalled();

68+

});

5469

});

Original file line numberDiff line numberDiff line change

@@ -40,7 +40,7 @@ export async function resolveCronDeliveryPreview(params: {

4040

job: CronJob;

4141

}): Promise<CronDeliveryPreview> {

4242

const plan = resolveCronDeliveryPlan(params.job);

43-

if (!plan.requested && plan.mode === "none" && !params.job.delivery) {

43+

if (plan.mode === "none") {

4444

return { label: "not requested", detail: "not requested" };

4545

}

4646

if (plan.mode === "webhook") {