Commit Graph

34 Commits

Author SHA1 Message Date
Peter Steinberger
1f484a8dbd test: speed up and stabilize full suite 2026-07-05 08:00:23 -04:00
Peter Steinberger
062f88e3e3 refactor: extract reusable AI runtime package (#99059)
* refactor: extract reusable AI runtime package

* refactor: complete AI provider relocation

* refactor: keep llm core internal

* refactor(ai): make @openclaw/ai self-contained with host policy ports

Move pure transport helpers (tool projections, strict-schema normalization,
prompt-cache boundary, stream guards, anthropic/openai compat, request
activity) from src into packages/ai; move utf16-slice into
normalization-core. Inject host policy (guarded fetch, redaction,
strict-tool defaults, diagnostics logging) through AiTransportHost with
inert library defaults installed by src/llm/stream.ts. Narrow the public
barrel to instance-scoped createApiRegistry/createLlmRuntime; the
process-default runtime moves behind internal/ and
registerBuiltInApiProviders takes an explicit registry. Delete the
src/llm/api-registry re-export facade.

* fix(ai): teach node, jiti, and vite resolvers the @openclaw/ai and utf16-slice subpaths

The workspace alias tables in root-alias.cjs, plugin-sdk-native-resolver,
sdk-alias, the shared vitest config, and the Control UI vite config only
knew @openclaw/llm-core; Node-side plugin loading resolved @openclaw/ai
through the pnpm symlink to the unbuilt dist (checks-node-compact CI
failures), and the Control UI build broke on the new
normalization-core/utf16-slice subpath.

* chore(ui): drop leftover service-worker debug logging

* build(release): ship @openclaw/ai with its own shrinkwrap and honest dependency set

packages/ai declares only its six real runtime deps (kysely, chalk, json5,
tslog, zod, fs-safe, and proxyline were never imported); orphaned root deps
removed. generate-npm-shrinkwrap now treats publishable packages/* like
publishable plugins so the AI tarball pins its transitive tree even though
workspace deps are omitted from the root shrinkwrap. knip learns the
package entry points; the tsdown dts neverBundle option moves to its
documented deps.dts home; the README documents the no-semver internal/*
contract and host ports.

* docs(ai): add minimal external-consumer example app

examples/ai-chat consumes only the public @openclaw/ai surface (built dist
via the workspace link): isolated runtime, built-in provider registration,
one streamed completion. Supports Anthropic/OpenAI via env keys and a
keyless local Ollama target; live-verified against Ollama.

* docs(ai): document the @openclaw/ai package and workspace shrinkwrap boundary

* chore(check): include examples/ in duplicate-scan targets

* fix: emit normalization package subpaths

* fix: complete AI package boundary artifacts

* fix: align AI package boundary contracts

* fix(ci): stabilize package release contracts

* test: align documentation contract checks

* test: keep cron docs guard aligned

* test: align restored docs contract guards

* test: follow upstream docs contracts

* docs: drop superseded talk wording
2026-07-05 01:56:40 -04:00
tayoun
73930764e6 fix(build): allow tsdown heap override
Merges the Clownfish-repaired contributor branch for #94622. Clownfish preflight cleared security/comments/review, accepted pnpm check:changed, and the PR is clean/mergeable on head 8de57351f7.
2026-06-22 20:36:42 +08:00
Vincent Koc
675cae58d7 fix(build): resolve taskkill in tsdown wrapper 2026-06-21 09:40:53 +02:00
Vincent Koc
83785a6e79 fix(build): kill tsdown trees on windows 2026-06-21 07:09:21 +02:00
Vincent Koc
ad049ef083 fix(build): clean tsdown child trees on parent signal 2026-06-20 15:03:37 +02:00
Vincent Koc
8b8d791472 fix(build): preserve tsdown timeout grace 2026-06-20 10:52:51 +02:00
Vincent Koc
45971784c9 test(scripts): stabilize tsdown process group timeout 2026-06-19 23:05:48 +02:00
Vincent Koc
2c71e71833 fix(scripts): wait for tsdown process groups 2026-06-17 21:19:25 +02:00
Peter Steinberger
58c663920d docs: document script tests 2026-06-04 20:49:50 -04:00
Vincent Koc
a86a1de849 fix(tooling): reject malformed tsdown watchdog limits 2026-06-02 23:43:09 +02:00
Vincent Koc
6ba25c10dc fix(build): cap tsdown heap on native Windows 2026-06-02 06:25:27 +02:00
Peter Steinberger
00399d6c75 test(release): repair beta validation blockers 2026-06-01 06:27:02 +01:00
Vincent Koc
ef9e9bf6b9 fix(build): preserve fresh startup metadata across rebuilds 2026-05-31 07:16:13 +02:00
keshavbotagent
371a8abe9d fix(build): avoid stale agent-core dts warnings (#87915)
* fix(build): avoid stale agent-core dts warnings

* test(secrets): secure plugin entrypoint fixtures

* fix(agent-core): normalize compaction summary timestamps

* test(secrets): secure platform preset fixture

* fix(build): preserve tracked package dts on skip builds

* test(secrets): secure platform preset resolver fixture

* fix(build): keep declarations during skip dts clean

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-30 21:03:49 +01:00
Vincent Koc
f5f829db79 fix(test): guard tsdown runner help 2026-05-30 13:00:32 +02:00
Vincent Koc
e35db953eb fix(build): raise inherited tsdown heap caps 2026-05-30 08:45:43 +02:00
Vincent Koc
dc5671edae fix(install): harden Windows git installs 2026-05-28 11:47:05 +02:00
Vincent Koc
e8dde305e2 fix(build): cap tsdown heap in containers 2026-05-27 10:32:53 +02:00
Vincent Koc
84929e4265 fix(test): harden bundled plugin install sweep 2026-05-26 01:17:12 +02:00
Vincent Koc
9be760fb37 test(qa): add collector-backed otel smoke 2026-05-25 23:51:17 +02:00
Vincent Koc
9ff1a4371f fix(build): preserve tsdown heap floor 2026-05-23 08:39:17 +02:00
Peter Steinberger
fea89cd384 ci(release): bypass pnpm for tsdown package build 2026-05-22 14:16:37 +01:00
Kevin Lin
b79de62b3c fix(codex): remove dynamic tools profile option 2026-05-09 21:34:33 -07:00
Peter Steinberger
aac9ebd4f3 fix: prune stale generated declarations before tsdown build 2026-05-10 05:09:26 +01:00
Peter Steinberger
e697ee354f test: tighten tsdown cleanup assertions 2026-05-09 09:05:54 +01:00
Peter Steinberger
c0e6475a25 test: tighten tsdown cleanup absence assertions 2026-05-09 01:47:19 +01:00
Peter Steinberger
249e58b939 test: clarify tooling accepted assertions 2026-05-08 13:23:23 +01:00
Peter Steinberger
ed8f50f240 refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
2026-05-01 21:32:22 +01:00
Peter Steinberger
8b4a5d70e4 fix(build): preserve staged runtime deps on rebuild 2026-04-28 08:45:11 +01:00
Peter Steinberger
4cb4aad7b1 build: harden tsdown wrapper 2026-04-22 21:54:56 +01:00
Peter Steinberger
1795a426c9 fix: prune stale root chunks before rebuilds 2026-04-14 15:19:31 +01:00
Ayaan Zaidi
17e6ef4076 fix(build): keep tsdown prune best-effort 2026-04-08 21:16:49 +05:30
Peter Steinberger
4f5c137f88 fix: unblock windows update build 2026-04-08 07:18:31 +01:00