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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
雷峰网
雷峰网
博客园_首页
小众软件
小众软件
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
U
Unit 42
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗

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
Agents: simplify inferred commitment config (#74189) · op...
vignesh07 · 2026-04-30 · via Recent Commits to openclaw:main

@@ -1,6 +1,5 @@

11

import { resolveUserTimezone } from "../agents/date-time.js";

22

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

3-

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

4354

export const DEFAULT_COMMITMENT_EXTRACTION_DEBOUNCE_MS = 15_000;

65

export const DEFAULT_COMMITMENT_BATCH_MAX_ITEMS = 8;

@@ -9,29 +8,18 @@ export const DEFAULT_COMMITMENT_CARE_CONFIDENCE_THRESHOLD = 0.86;

98

export const DEFAULT_COMMITMENT_EXTRACTION_TIMEOUT_SECONDS = 45;

109

export const DEFAULT_COMMITMENT_MAX_PER_HEARTBEAT = 3;

1110

export const DEFAULT_COMMITMENT_EXPIRE_AFTER_HOURS = 72;

11+

export const DEFAULT_COMMITMENT_MAX_PER_DAY = 3;

12121313

export type ResolvedCommitmentsConfig = {

1414

enabled: boolean;

15-

store?: string;

16-

categories: {

17-

eventCheckIns: boolean;

18-

deadlineCheckIns: boolean;

19-

openLoops: boolean;

20-

careCheckIns: false | "gentle" | true;

21-

};

15+

maxPerDay: number;

2216

extraction: {

23-

enabled: boolean;

24-

model?: string;

2517

debounceMs: number;

2618

batchMaxItems: number;

2719

confidenceThreshold: number;

2820

careConfidenceThreshold: number;

2921

timeoutSeconds: number;

3022

};

31-

delivery: {

32-

maxPerHeartbeat: number;

33-

expireAfterHours: number;

34-

};

3523

};

36243725

function positiveInt(value: unknown, fallback: number): number {

@@ -40,63 +28,17 @@ function positiveInt(value: unknown, fallback: number): number {

4028

: fallback;

4129

}

423043-

function nonnegativeNumber(value: unknown, fallback: number): number {

44-

return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : fallback;

45-

}

46-47-

function resolveCareCheckIns(

48-

value: CommitmentsConfig["categories"] | undefined,

49-

): false | "gentle" | true {

50-

const raw = value?.careCheckIns;

51-

if (raw === false) {

52-

return false;

53-

}

54-

if (raw === true) {

55-

return true;

56-

}

57-

return "gentle";

58-

}

59-6031

export function resolveCommitmentsConfig(cfg?: OpenClawConfig): ResolvedCommitmentsConfig {

6132

const raw = cfg?.commitments;

62-

const extraction = raw?.extraction;

63-

const delivery = raw?.delivery;

6433

return {

65-

enabled: raw?.enabled !== false,

66-

store: raw?.store,

67-

categories: {

68-

eventCheckIns: raw?.categories?.eventCheckIns !== false,

69-

deadlineCheckIns: raw?.categories?.deadlineCheckIns !== false,

70-

openLoops: raw?.categories?.openLoops !== false,

71-

careCheckIns: resolveCareCheckIns(raw?.categories),

72-

},

34+

enabled: raw?.enabled === true,

35+

maxPerDay: positiveInt(raw?.maxPerDay, DEFAULT_COMMITMENT_MAX_PER_DAY),

7336

extraction: {

74-

enabled: extraction?.enabled !== false,

75-

model: extraction?.model?.trim() || undefined,

76-

debounceMs: nonnegativeNumber(

77-

extraction?.debounceMs,

78-

DEFAULT_COMMITMENT_EXTRACTION_DEBOUNCE_MS,

79-

),

80-

batchMaxItems: positiveInt(extraction?.batchMaxItems, DEFAULT_COMMITMENT_BATCH_MAX_ITEMS),

81-

confidenceThreshold: nonnegativeNumber(

82-

extraction?.confidenceThreshold,

83-

DEFAULT_COMMITMENT_CONFIDENCE_THRESHOLD,

84-

),

85-

careConfidenceThreshold: nonnegativeNumber(

86-

extraction?.careConfidenceThreshold,

87-

DEFAULT_COMMITMENT_CARE_CONFIDENCE_THRESHOLD,

88-

),

89-

timeoutSeconds: positiveInt(

90-

extraction?.timeoutSeconds,

91-

DEFAULT_COMMITMENT_EXTRACTION_TIMEOUT_SECONDS,

92-

),

93-

},

94-

delivery: {

95-

maxPerHeartbeat: positiveInt(delivery?.maxPerHeartbeat, DEFAULT_COMMITMENT_MAX_PER_HEARTBEAT),

96-

expireAfterHours: positiveInt(

97-

delivery?.expireAfterHours,

98-

DEFAULT_COMMITMENT_EXPIRE_AFTER_HOURS,

99-

),

37+

debounceMs: DEFAULT_COMMITMENT_EXTRACTION_DEBOUNCE_MS,

38+

batchMaxItems: DEFAULT_COMMITMENT_BATCH_MAX_ITEMS,

39+

confidenceThreshold: DEFAULT_COMMITMENT_CONFIDENCE_THRESHOLD,

40+

careConfidenceThreshold: DEFAULT_COMMITMENT_CARE_CONFIDENCE_THRESHOLD,

41+

timeoutSeconds: DEFAULT_COMMITMENT_EXTRACTION_TIMEOUT_SECONDS,

10042

},

10143

};

10244

}