openclaw/src
max 223eee0a20
refactor: unify peer kind to ChatType, rename dm to direct (#11881)
* fix: use .js extension for ESM imports of RoutePeerKind

The imports incorrectly used .ts extension which doesn't resolve
with moduleResolution: NodeNext. Changed to .js and added 'type'
import modifier.

* fix tsconfig

* refactor: unify peer kind to ChatType, rename dm to direct

- Replace RoutePeerKind with ChatType throughout codebase
- Change 'dm' literal values to 'direct' in routing/session keys
- Keep backward compat: normalizeChatType accepts 'dm' -> 'direct'
- Add ChatType export to plugin-sdk, deprecate RoutePeerKind
- Update session key parsing to accept both 'dm' and 'direct' markers
- Update all channel monitors and extensions to use ChatType

BREAKING CHANGE: Session keys now use 'direct' instead of 'dm'.
Existing 'dm' keys still work via backward compat layer.

* fix tests

* test: update session key expectations for dmdirect migration

- Fix test expectations to expect :direct: in generated output
- Add explicit backward compat test for normalizeChatType('dm')
- Keep input test data with :dm: keys to verify backward compat

* fix: accept legacy 'dm' in session key parsing for backward compat

getDmHistoryLimitFromSessionKey now accepts both :dm: and :direct:
to ensure old session keys continue to work correctly.

* test: add explicit backward compat tests for dmdirect migration

- session-key.test.ts: verify both :dm: and :direct: keys are valid
- getDmHistoryLimitFromSessionKey: verify both formats work

* feat: backward compat for resetByType.dm config key

* test: skip unix-path Nix tests on Windows
2026-02-09 09:20:52 +09:00
..
acp chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
agents refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
auto-reply refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
browser Make openclaw consistent in this file (#8533) 2026-02-04 00:02:25 -05:00
canvas-host fix: use STATE_DIR instead of hardcoded ~/.openclaw for identity and canvas (#4824) 2026-02-07 22:16:59 -05:00
channels refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
cli fix(paths): respect OPENCLAW_HOME for all internal path resolution (#12091) 2026-02-08 16:20:13 -05:00
commands fix(paths): respect OPENCLAW_HOME for all internal path resolution (#12091) 2026-02-08 16:20:13 -05:00
compat refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
config refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
cron fix(paths): respect OPENCLAW_HOME for all internal path resolution (#12091) 2026-02-08 16:20:13 -05:00
daemon fix(runtime): bump minimum Node.js version to 22.12.0 (#5370) 2026-02-05 13:42:52 -08:00
discord refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
docs Docs: landing page revamp (#8885) 2026-02-04 10:37:14 -05:00
gateway refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
hooks fix: use STATE_DIR instead of hardcoded ~/.openclaw for identity and canvas (#4824) 2026-02-07 22:16:59 -05:00
imessage refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
infra refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
line refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
link-understanding chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logging fix: guard resolveUserPath against undefined input (#10176) 2026-02-06 13:16:58 -05:00
macos chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
markdown chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
media fix: add .caf to AUDIO_FILE_EXTENSIONS (#10982) 2026-02-07 18:04:22 -05:00
media-understanding refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
memory refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
node-host fix: harden Windows exec allowlist 2026-02-03 09:34:25 -08:00
pairing fix(paths): respect OPENCLAW_HOME for all internal path resolution (#12091) 2026-02-08 16:20:13 -05:00
plugin-sdk refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
plugins Gateway/Plugins: device pairing + phone control plugins (#11755) 2026-02-08 18:07:13 +01:00
process fix: skip extension append if command already has one 2026-01-31 20:39:33 -06:00
providers chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
routing refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
scripts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
security Tests: harden flake hotspots and consolidate provider-auth suites (#11598) 2026-02-07 21:32:23 -05:00
sessions chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
shared/text chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
signal refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
slack refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
telegram refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
terminal fix: error handling in restore failure reporting 2026-02-03 06:22:51 +00:00
test-helpers fix: use STATE_DIR instead of hardcoded ~/.openclaw for identity and canvas (#4824) 2026-02-07 22:16:59 -05:00
test-utils chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
tts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
tui Centralize date/time formatting utilities (#11831) 2026-02-08 04:53:31 -08:00
types fix: update pi packages to 0.51.0, remove bogus type augmentation 2026-02-02 01:52:33 +01:00
utils chore: fix vitest standalone configs and update package description (#11865) 2026-02-08 05:24:50 -08:00
web refactor: unify peer kind to ChatType, rename dm to direct (#11881) 2026-02-09 09:20:52 +09:00
whatsapp chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
wizard Gateway/Plugins: device pairing + phone control plugins (#11755) 2026-02-08 18:07:13 +01:00
channel-web.barrel.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
channel-web.ts
docker-setup.test.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
entry.ts Centralize date/time formatting utilities (#11831) 2026-02-08 04:53:31 -08:00
extensionAPI.ts chore: Migrate to tsdown, speed up JS bundling by ~10x (thanks @hyf0). 2026-02-03 20:18:16 +09:00
globals.test.ts
globals.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
index.test.ts
index.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logger.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
logger.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
logging.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
polls.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
polls.ts
runtime.ts CLI: restore terminal state on exit 2026-02-03 06:10:19 +00:00
utils.test.ts fix(paths): respect OPENCLAW_HOME for all internal path resolution (#12091) 2026-02-08 16:20:13 -05:00
utils.ts fix(paths): respect OPENCLAW_HOME for all internal path resolution (#12091) 2026-02-08 16:20:13 -05:00
version.test.ts fix: CLI harden update restart imports and fix nested bundle version resolution 2026-02-06 00:09:48 -05:00
version.ts fix: CLI harden update restart imports and fix nested bundle version resolution 2026-02-06 00:09:48 -05:00