@online-tools/work-agent-runner 0.0.1-alpha-5 → 0.0.2-alpha-2

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.
@@ -0,0 +1,525 @@
1
+ // The work-agent repository on this machine: the Skill source for every job,
2
+ // and the optional AscendC knowledge pool (lib/config.mjs owns the paths):
3
+ //
4
+ // ~/.work-agent-runner/work-agent/ the clone, tracking origin/main
5
+ // ~/.work-agent-runner/work-agent.lock lock: a terminal `update` vs the service
6
+ // ~/.work-agent/ work-agent's own home = the
7
+ // WORK_AGENT_HOME of every job
8
+ // ├ ascend-repos/ the repository pool, built by
9
+ // │ scripts/work-agent.py
10
+ // ├ essential-repos.txt which repositories init clones
11
+ // └ logs/ tmp/ docs/ the only part a job may write
12
+ // ~/.work-agent-runner/.work-agent symlink to it
13
+ //
14
+ // The home is work-agent's own default location, so it is the same workspace
15
+ // and the same repositories the user's own work-agent use sees.
16
+ //
17
+ // The website never names the repository, a branch or a commit — a website that
18
+ // could would be choosing which code runs on the user's machine. The URL is
19
+ // fixed here; only the machine's own config (or WORK_AGENT_REPO, for
20
+ // development and tests) may point it at a mirror, and clone() logs the URL it
21
+ // used.
22
+ //
23
+ // Jobs read the clone (a copy per run) while the hourly refresh may rewrite it,
24
+ // and `update` in a terminal is a second process, so every operation runs
25
+ // inside both the in-process queue and the file lock.
26
+
27
+ import { spawn, spawnSync } from 'node:child_process';
28
+ import fs from 'node:fs';
29
+ import os from 'node:os';
30
+ import path from 'node:path';
31
+
32
+ import { LockedError, acquireLock } from './lock.mjs';
33
+ import { CA_VARIABLES, PROXY_VARIABLES, prepareWorkAgentHome } from './sandbox.mjs';
34
+ import { copyTreeDetached, rewriteSkillPaths } from './skill-tree.mjs';
35
+
36
+ export const REPO_URL = 'https://gitcode.com/pingchuantang/work-agent.git';
37
+ export const REPO_BRANCH = 'main';
38
+ /**
39
+ * The two repositories the AscendC domain of 代码检视 reads. They are part of
40
+ * the essential list; this is only how the website is told whether that domain
41
+ * can be covered.
42
+ */
43
+ export const ASCEND_REPOS = ['asc-devkit', 'cann-samples'];
44
+ // A file that only exists in a complete clone: work-agent.py leaves a half
45
+ // clone behind when it is killed, and then skips it forever as "already there".
46
+ const ASCEND_ENTRY = {
47
+ 'asc-devkit': 'docs/zh/api/README.md',
48
+ 'cann-samples': 'Samples/2_Performance/README.md',
49
+ };
50
+ // The Skill tree inside the repository. A clone counts as usable when this is a
51
+ // directory with something in it — not a particular Skill, which work-agent is
52
+ // free to rename.
53
+ const SKILLS_SUBDIR = path.join('.claude', 'skills');
54
+ const GIT_TIMEOUT_MS = 10 * 60_000;
55
+ // The essential list is large and grows with upstream, cloned 8 at a time;
56
+ // work-agent.py gives each git operation 1800 s, so never be the one that kills
57
+ // it first. The free-space figure is a floor, not a claim about the list's size.
58
+ const POOL_TIMEOUT_MS = 240 * 60_000;
59
+ export const POOL_FREE_BYTES = 10 * 1024 * 1024 * 1024;
60
+ const ESSENTIAL_FILE = 'essential-repos.txt';
61
+ const KILL_GRACE_MS = 5000;
62
+ // work-agent.py cleanup: tmp/ is emptied and logs older than this are dropped.
63
+ const LOG_DAYS = 30;
64
+
65
+ function realpathOr(value) {
66
+ try {
67
+ return fs.realpathSync(value);
68
+ } catch {
69
+ return path.resolve(value);
70
+ }
71
+ }
72
+
73
+ function exists(file) {
74
+ try {
75
+ fs.statSync(file);
76
+ return true;
77
+ } catch {
78
+ return false;
79
+ }
80
+ }
81
+
82
+ /**
83
+ * git's environment: PATH and HOME (for ~/.gitconfig), the proxy and CA
84
+ * variables this machine passes through (corporate machines need them, and the
85
+ * program's own HTTPS already honours them), and no terminal prompting.
86
+ */
87
+ function gitEnv(env) {
88
+ const passed = {
89
+ PATH: env.PATH || '/usr/local/bin:/usr/bin:/bin',
90
+ HOME: env.HOME || os.homedir(),
91
+ LANG: 'C.UTF-8',
92
+ GIT_TERMINAL_PROMPT: '0',
93
+ };
94
+ for (const name of [...PROXY_VARIABLES, ...CA_VARIABLES]) if (env[name]) passed[name] = env[name];
95
+ return passed;
96
+ }
97
+
98
+ // -c on every call: a credential helper must never open a prompt or a keychain,
99
+ // and submodule.recurse=true in the user's config would pull ~1 GB of CANN
100
+ // repos into the Skill tree (work-agent has submodules inside .claude/skills).
101
+ const GIT_CONFIG = ['-c', 'credential.helper=', '-c', 'submodule.recurse=false'];
102
+
103
+ function git(args, { cwd, env = process.env, timeout = GIT_TIMEOUT_MS } = {}) {
104
+ const result = spawnSync('git', [...GIT_CONFIG, ...args], {
105
+ cwd,
106
+ env: gitEnv(env),
107
+ encoding: 'utf8',
108
+ timeout,
109
+ stdio: ['ignore', 'pipe', 'pipe'],
110
+ });
111
+ const stderr = String(result.stderr || '').trim();
112
+ return {
113
+ ok: !result.error && result.status === 0,
114
+ stdout: String(result.stdout || '').trim(),
115
+ stderr,
116
+ reason: result.error ? result.error.message : stderr.split('\n').filter(Boolean).pop() || `git ${args[0]} 退出码 ${result.status}`,
117
+ };
118
+ }
119
+
120
+ /** Bytes free on the filesystem holding `dir` (its nearest existing parent); 0 when unknown. */
121
+ export function freeBytes(dir) {
122
+ let target = path.resolve(dir);
123
+ for (let depth = 0; depth < 40; depth += 1) {
124
+ try {
125
+ const stat = fs.statfsSync(target);
126
+ return Number(stat.bavail) * Number(stat.bsize);
127
+ } catch {
128
+ const parent = path.dirname(target);
129
+ if (parent === target) return 0;
130
+ target = parent;
131
+ }
132
+ }
133
+ return 0;
134
+ }
135
+
136
+ function killGroup(child, signal) {
137
+ if (!child?.pid) return;
138
+ try {
139
+ process.kill(-child.pid, signal);
140
+ } catch {
141
+ // Gone already.
142
+ }
143
+ }
144
+
145
+ export class WorkAgent {
146
+ /** `paths` from configPaths(); `repoUrl` only from the machine's own config. */
147
+ constructor({ paths, env = process.env, log = null, repoUrl = REPO_URL } = {}) {
148
+ this.paths = paths;
149
+ this.env = env;
150
+ this.log = log;
151
+ this.repoUrl = repoUrl || REPO_URL;
152
+ this.queue = Promise.resolve();
153
+ this.child = null;
154
+ this.stopped = false;
155
+ }
156
+
157
+ get repoDir() {
158
+ return this.paths.repoDir;
159
+ }
160
+
161
+ get lockFile() {
162
+ return this.paths.repoLockFile;
163
+ }
164
+
165
+ get skillsDir() {
166
+ return path.join(this.paths.repoDir, SKILLS_SUBDIR);
167
+ }
168
+
169
+ /** Runs `fn` alone: after anything queued here, and not while another process holds the lock. */
170
+ run(fn) {
171
+ const next = this.queue.then(async () => {
172
+ let lock;
173
+ try {
174
+ // First run: the data directory does not exist yet.
175
+ fs.mkdirSync(path.dirname(this.paths.repoLockFile), { recursive: true, mode: 0o700 });
176
+ lock = acquireLock(this.paths.repoLockFile);
177
+ } catch (error) {
178
+ if (error instanceof LockedError) {
179
+ throw new Error(`work-agent 仓库正被另一个进程使用(pid ${error.pid}),请稍后再试`);
180
+ }
181
+ throw error;
182
+ }
183
+ try {
184
+ return await fn();
185
+ } finally {
186
+ lock.release();
187
+ }
188
+ });
189
+ // Keep the chain alive whatever this call does.
190
+ this.queue = next.then(
191
+ () => {},
192
+ () => {},
193
+ );
194
+ return next;
195
+ }
196
+
197
+ /**
198
+ * What this machine has, read without the lock (callers display it):
199
+ * { ok, reason, commit, committedAt, repos, ascend, incomplete, poolFetchedAt }.
200
+ */
201
+ state() {
202
+ const { repoDir } = this.paths;
203
+ const pool = { ...this.poolState(), poolFetchedAt: this.poolFetchedAt() };
204
+ if (!exists(path.join(repoDir, '.git'))) {
205
+ return { ok: false, reason: '未下载 work-agent 仓库', commit: '', committedAt: '', ...pool };
206
+ }
207
+ if (!this.hasSkills()) {
208
+ return { ok: false, reason: 'work-agent 仓库不完整(没有 .claude/skills)', commit: '', committedAt: '', ...pool };
209
+ }
210
+ const head = git(['rev-parse', 'HEAD'], { cwd: repoDir, env: this.env, timeout: 30_000 });
211
+ if (!head.ok || !/^[0-9a-f]{40}$/.test(head.stdout)) {
212
+ return { ok: false, reason: 'work-agent 仓库损坏', commit: '', committedAt: '', ...pool };
213
+ }
214
+ const when = git(['log', '-1', '--format=%cI'], { cwd: repoDir, env: this.env, timeout: 30_000 });
215
+ return { ok: true, reason: '', commit: head.stdout, committedAt: when.ok ? when.stdout : '', ...pool };
216
+ }
217
+
218
+ /** Whether the clone holds a Skill tree to copy. */
219
+ hasSkills() {
220
+ try {
221
+ return fs.readdirSync(this.skillsDir).some((name) => !name.startsWith('.'));
222
+ } catch {
223
+ return false;
224
+ }
225
+ }
226
+
227
+ /** The repositories the pool holds, by name. */
228
+ poolRepos() {
229
+ const { poolDir } = this.paths;
230
+ let names = [];
231
+ try {
232
+ names = fs
233
+ .readdirSync(poolDir, { withFileTypes: true })
234
+ .filter((entry) => entry.isDirectory() || entry.isSymbolicLink())
235
+ .map((entry) => entry.name);
236
+ } catch {
237
+ return [];
238
+ }
239
+ return names.filter((name) => !name.startsWith('.') && exists(path.join(poolDir, name, '.git'))).sort();
240
+ }
241
+
242
+ /** { repos, ascend, incomplete }: how many repos the pool holds and whether the AscendC pair is complete. */
243
+ poolState() {
244
+ const { poolDir } = this.paths;
245
+ const repos = this.poolRepos();
246
+ const incomplete = ASCEND_REPOS.filter(
247
+ (name) => repos.includes(name) && !exists(path.join(poolDir, name, ASCEND_ENTRY[name])),
248
+ );
249
+ const ascend = ASCEND_REPOS.every((name) => repos.includes(name)) && incomplete.length === 0;
250
+ return { repos: repos.length, ascend, incomplete };
251
+ }
252
+
253
+ /**
254
+ * When the pool was last cloned or fetched (ms, 0 = never/no pool). .git/HEAD
255
+ * is written by a clone, FETCH_HEAD by every fetch, so the newer of the two
256
+ * also counts an update the user ran themselves with work-agent.py.
257
+ */
258
+ poolFetchedAt() {
259
+ const { poolDir } = this.paths;
260
+ let names = [];
261
+ try {
262
+ names = fs.readdirSync(poolDir);
263
+ } catch {
264
+ return 0;
265
+ }
266
+ let newest = 0;
267
+ for (const name of names) {
268
+ if (name.startsWith('.')) continue;
269
+ for (const file of ['FETCH_HEAD', 'HEAD']) {
270
+ try {
271
+ newest = Math.max(newest, fs.statSync(path.join(poolDir, name, '.git', file)).mtimeMs);
272
+ } catch {
273
+ // Not there: a repo may never have been fetched since its clone.
274
+ }
275
+ }
276
+ }
277
+ return newest;
278
+ }
279
+
280
+ /** The pool to mount for a run: '' when it holds no repository at all. */
281
+ mountablePool() {
282
+ return this.poolState().repos > 0 ? this.paths.poolDir : '';
283
+ }
284
+
285
+ /** What the website is told (small, and only changes when the clone or the pool does). */
286
+ capabilities() {
287
+ const state = this.state();
288
+ const fetchedAt = this.poolFetchedAt();
289
+ return {
290
+ commit: state.commit,
291
+ committedAt: state.committedAt,
292
+ repos: state.repos,
293
+ ascend: state.ascend,
294
+ // So the website can show how stale the knowledge pool is.
295
+ poolUpdatedAt: fetchedAt ? new Date(fetchedAt).toISOString() : '',
296
+ };
297
+ }
298
+
299
+ /**
300
+ * Makes the clone current: clone when missing or broken, otherwise fetch and
301
+ * fast-forward. A fetch that fails keeps the commit the machine already has.
302
+ * A fast-forward that fails (dirty tree, rewritten upstream) re-clones rather
303
+ * than `reset --hard`, which would silently adopt a force-push. Never throws
304
+ * — returns state() with a reason. Only through run(), so a job's copy never
305
+ * sees a tree being rewritten.
306
+ */
307
+ refresh() {
308
+ return this.run(() => this.refreshNow());
309
+ }
310
+
311
+ refreshNow() {
312
+ const { repoDir } = this.paths;
313
+ const before = this.state();
314
+ if (!before.ok) {
315
+ return this.clone(before.reason === '未下载 work-agent 仓库' ? '' : before.reason);
316
+ }
317
+ const fetched = git(['fetch', '--no-recurse-submodules', '--prune', 'origin', REPO_BRANCH], { cwd: repoDir, env: this.env });
318
+ if (!fetched.ok) {
319
+ this.note('warn', `无法从 ${REPO_URL} 拉取更新(${fetched.reason}),继续使用本地的 ${before.commit.slice(0, 7)}`);
320
+ return { ...before, fetchReason: fetched.reason };
321
+ }
322
+ const merged = git(['merge', '--ff-only', '--no-recurse-submodules', 'FETCH_HEAD'], { cwd: repoDir, env: this.env });
323
+ if (!merged.ok) {
324
+ // Dirty tree or rewritten history: re-clone rather than reset --hard, which
325
+ // would silently accept a force-push.
326
+ this.note('warn', `work-agent 仓库无法快进(${merged.reason}),重新克隆`);
327
+ return this.clone(merged.reason);
328
+ }
329
+ const after = this.state();
330
+ if (after.commit && after.commit !== before.commit) {
331
+ this.note('info', `work-agent 已更新:${before.commit.slice(0, 7)} → ${after.commit.slice(0, 7)}`);
332
+ }
333
+ return after;
334
+ }
335
+
336
+ /** Replaces the clone. `why` only appears in the log. */
337
+ clone(why = '') {
338
+ const { repoDir } = this.paths;
339
+ fs.mkdirSync(path.dirname(repoDir), { recursive: true, mode: 0o700 });
340
+ fs.rmSync(repoDir, { recursive: true, force: true });
341
+ this.note('info', `正在下载 work-agent 仓库(${this.repoUrl})${why ? `:${why}` : ''}`);
342
+ const cloned = git(
343
+ ['clone', '--quiet', '--single-branch', '--branch', REPO_BRANCH, '--no-recurse-submodules', this.repoUrl, repoDir],
344
+ { env: this.env },
345
+ );
346
+ if (!cloned.ok) {
347
+ fs.rmSync(repoDir, { recursive: true, force: true });
348
+ return { ok: false, reason: `下载 work-agent 仓库失败:${cloned.reason}`, commit: '', committedAt: '', ...this.poolState() };
349
+ }
350
+ // A rewritten URL (url.<x>.insteadOf) means the code came from somewhere else.
351
+ const origin = git(['remote', 'get-url', 'origin'], { cwd: repoDir, env: this.env, timeout: 30_000 });
352
+ if (origin.ok && origin.stdout !== this.repoUrl) {
353
+ fs.rmSync(repoDir, { recursive: true, force: true });
354
+ return {
355
+ ok: false,
356
+ reason: `git 把仓库地址改写成了 ${origin.stdout}(检查 ~/.gitconfig 的 url.*.insteadOf),已删除`,
357
+ commit: '',
358
+ committedAt: '',
359
+ ...this.poolState(),
360
+ };
361
+ }
362
+ const state = this.state();
363
+ if (state.ok) this.note('info', `work-agent 仓库就绪:${state.commit.slice(0, 7)}`);
364
+ else fs.rmSync(repoDir, { recursive: true, force: true });
365
+ return state;
366
+ }
367
+
368
+ /**
369
+ * Copies the whole repository into `targetDir` — the job's working directory,
370
+ * so it runs inside a work-agent repository of its own — and points the
371
+ * Skills' `/tmp/work-agent` at `scratchDir` (the persistent WORK_AGENT_HOME).
372
+ * `.git` is left out: the copy is for reading and running, not for pushing.
373
+ * Returns the commit that was copied.
374
+ */
375
+ copyRepoInto(targetDir, scratchDir) {
376
+ return this.run(() => {
377
+ const state = this.state();
378
+ if (!state.ok) throw new Error(state.reason);
379
+ copyTreeDetached(this.paths.repoDir, targetDir);
380
+ rewriteSkillPaths(path.join(targetDir, SKILLS_SUBDIR), scratchDir);
381
+ return { commit: state.commit };
382
+ });
383
+ }
384
+
385
+ /** `python3 -I <clone>/scripts/work-agent.py <args>` with the workspace it manages. */
386
+ python(args, { say, timeoutMs = POOL_TIMEOUT_MS }) {
387
+ const script = path.join(this.paths.repoDir, 'scripts', 'work-agent.py');
388
+ if (!exists(script)) throw new Error(`work-agent 仓库里没有 ${script},请先运行 work-agent-runner update`);
389
+ return new Promise((resolve, reject) => {
390
+ if (this.stopped) {
391
+ reject(new Error('程序正在退出'));
392
+ return;
393
+ }
394
+ const child = spawn('python3', ['-I', script, ...args], {
395
+ cwd: this.paths.repoDir,
396
+ detached: true,
397
+ stdio: ['ignore', 'inherit', 'inherit'],
398
+ env: {
399
+ ...gitEnv(this.env),
400
+ WORK_AGENT_HOME: this.paths.workAgentHome,
401
+ // CANN repos carry LFS objects; the repo's own sync script skips them
402
+ // too. Never set this for the work-agent clone itself, where an
403
+ // LFS-tracked Skill file would arrive as a pointer.
404
+ GIT_LFS_SKIP_SMUDGE: '1',
405
+ },
406
+ });
407
+ this.child = child;
408
+ const timer = setTimeout(() => {
409
+ say?.(`已超过 ${Math.round(timeoutMs / 60_000)} 分钟,正在停止`);
410
+ killGroup(child, 'SIGTERM');
411
+ setTimeout(() => killGroup(child, 'SIGKILL'), KILL_GRACE_MS).unref();
412
+ }, timeoutMs);
413
+ timer.unref();
414
+ child.once('error', (error) => {
415
+ clearTimeout(timer);
416
+ this.child = null;
417
+ reject(new Error(error.code === 'ENOENT' ? '没有找到 python3' : error.message));
418
+ });
419
+ child.once('close', (code, signal) => {
420
+ clearTimeout(timer);
421
+ this.child = null;
422
+ if (code === 0) resolve();
423
+ else reject(new Error(signal ? `work-agent.py 被 ${signal} 终止` : `work-agent.py 退出码 ${code}`));
424
+ });
425
+ });
426
+ }
427
+
428
+ /** The repositories named in work-agent's essential list ([] when it has none yet). */
429
+ essentialRepos() {
430
+ try {
431
+ return fs
432
+ .readFileSync(path.join(this.paths.workAgentHome, ESSENTIAL_FILE), 'utf8')
433
+ .split('\n')
434
+ .map((line) => line.split('#')[0].trim())
435
+ .filter(Boolean);
436
+ } catch {
437
+ return [];
438
+ }
439
+ }
440
+
441
+ /** Where that list lives, for messages that have to point at it. */
442
+ get essentialFile() {
443
+ return path.join(this.paths.workAgentHome, ESSENTIAL_FILE);
444
+ }
445
+
446
+ /**
447
+ * Clones the repositories of work-agent's own essential list
448
+ * ($WORK_AGENT_HOME/essential-repos.txt, which init creates and the user may
449
+ * edit) into the pool, or the ones `repos` names. Only ever from a terminal:
450
+ * the list is large. `work-agent.py` skips repos that are already there, so
451
+ * this is safe to re-run.
452
+ */
453
+ initPool({ repos = null, say = () => {}, requireFreeBytes = POOL_FREE_BYTES } = {}) {
454
+ return this.run(async () => {
455
+ const state = this.state();
456
+ if (!state.ok) throw new Error(state.reason);
457
+ const free = freeBytes(this.paths.poolDir);
458
+ if (free && free < requireFreeBytes) {
459
+ throw new Error(
460
+ `${this.paths.poolDir} 所在磁盘只剩 ${(free / 1073741824).toFixed(1)} GB,` +
461
+ `知识仓需要 ${Math.round(requireFreeBytes / 1073741824)} GB 以上`,
462
+ );
463
+ }
464
+ say(`正在下载知识仓到 ${this.paths.poolDir}(${repos ? repos.join('、') : '必要仓清单里的仓'}),可能要很久`);
465
+ say('如果你自己也在运行 work-agent 的 init/update,这里会先等它结束(它们共用一把锁)');
466
+ // work-agent.py clones into $WORK_AGENT_HOME/ascend-repos (a symlink when
467
+ // the pool was put on another disk).
468
+ fs.mkdirSync(this.paths.poolDir, { recursive: true, mode: 0o700 });
469
+ prepareWorkAgentHome(this.paths.workAgentHome, { poolDir: this.paths.poolDir, link: this.paths.workAgentLink });
470
+ await this.python(repos ? ['init', '--repos', repos.join(',')] : ['init', '--essential'], { say });
471
+ const after = this.poolState();
472
+ if (after.incomplete.length) {
473
+ throw new Error(`${after.incomplete.join('、')} 下载不完整:请删除 ${this.paths.poolDir} 下这些目录后重试`);
474
+ }
475
+ const names = this.poolRepos();
476
+ say(`知识仓就绪:${this.paths.poolDir}(${after.repos} 个仓:${names.join('、')})`);
477
+ return after;
478
+ });
479
+ }
480
+
481
+ /**
482
+ * Updates every repository the pool holds — whatever they are, no names
483
+ * involved (`work-agent.py update` pulls each local repo's master and skips
484
+ * anything dirty or not from the CANN organisation). Never clones a new one.
485
+ * Callers run it only when no job is running: `git pull` must not replace
486
+ * files while a review reads them.
487
+ */
488
+ updatePool({ say = () => {} } = {}) {
489
+ return this.run(async () => {
490
+ if (!this.poolState().repos) {
491
+ say('没有知识仓可更新(运行 work-agent-runner setup 可以下载)');
492
+ return this.poolState();
493
+ }
494
+ say(`正在更新知识仓:${this.paths.poolDir}`);
495
+ await this.python(['update'], { say });
496
+ return this.poolState();
497
+ });
498
+ }
499
+
500
+ /**
501
+ * work-agent's own housekeeping: empties `$WORK_AGENT_HOME/tmp` and drops logs
502
+ * older than 30 days. Only safe when no job is running (it deletes all of
503
+ * tmp/), so `start` calls it before it connects.
504
+ */
505
+ cleanup({ say = () => {} } = {}) {
506
+ return this.run(async () => {
507
+ if (!this.state().ok) return false;
508
+ await this.python(['cleanup', '--log-days', String(LOG_DAYS)], { say, timeoutMs: 10 * 60_000 });
509
+ return true;
510
+ });
511
+ }
512
+
513
+ /** Ends a running work-agent.py (program shutdown). */
514
+ stop() {
515
+ this.stopped = true;
516
+ if (this.child) {
517
+ killGroup(this.child, 'SIGTERM');
518
+ setTimeout(() => killGroup(this.child, 'SIGKILL'), KILL_GRACE_MS).unref();
519
+ }
520
+ }
521
+
522
+ note(level, message) {
523
+ this.log?.[level]?.(message);
524
+ }
525
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@online-tools/work-agent-runner",
3
- "version": "0.0.1-alpha-5",
3
+ "version": "0.0.2-alpha-2",
4
4
  "description": "GitCode 在线工具的 Agent 执行机器:在自己的机器上运行 work-agent 的 Skill(PR 描述、代码检视)",
5
5
  "license": "MIT",
6
6
  "type": "module",