mirror of
https://github.com/openclaw/lobster.git
synced 2026-07-21 11:55:25 -04:00
[PR #1] [MERGED] chore: migrate Lobster to TypeScript + oxlint (type-aware) #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/openclaw/lobster/pull/1
Author: @vignesh07
Created: 1/22/2026
Status: ✅ Merged
Merged: 1/22/2026
Merged by: @vignesh07
Base:
main← Head:feat/ts-oxlint📝 Commits (2)
d748672chore: add TS build + oxlint scaffolding5f8a64efeat: migrate lobster to TypeScript and oxlint📊 Changes
53 files changed (+253 additions, -48 deletions)
View changed files
➕
.oxlintrc.json(+12 -0)📝
bin/lobster.js(+21 -2)📝
package.json(+15 -5)➕
pnpm-lock.yaml(+122 -0)📝
src/cli.ts(+9 -4)📝
src/commands/registry.ts(+0 -0)📝
src/commands/stdlib/approve.ts(+0 -0)📝
src/commands/stdlib/clawd_invoke.ts(+3 -3)📝
src/commands/stdlib/diff_last.ts(+0 -0)📝
src/commands/stdlib/exec.ts(+1 -1)📝
src/commands/stdlib/head.ts(+0 -0)📝
src/commands/stdlib/json.ts(+0 -0)📝
src/commands/stdlib/pick.ts(+0 -0)📝
src/commands/stdlib/state.ts(+0 -0)📝
src/commands/stdlib/table.ts(+0 -0)📝
src/commands/stdlib/where.ts(+1 -1)📝
src/commands/workflows/workflows_list.ts(+1 -1)📝
src/commands/workflows/workflows_run.ts(+1 -1)📝
src/parser.ts(+0 -0)📝
src/recipes/github/index.ts(+0 -0)...and 33 more files
📄 Description
Summary
Migrates Lobster core to TypeScript and adopts oxlint in type-aware mode for linting/formatting, per Peter’s request.
What changed
Convert + from →
Add TS build ( → ) and run tests against compiled output\n- Add oxlint (type-aware via ) with
Found 0 warnings and 0 errors.
Finished in 11ms on 48 files with 100 rules using 10 threads. /
Found 0 warnings and 0 errors.
Finished in 11ms on 48 files with 100 rules using 10 threads.\n- Keep CLI stable via lobster — Clawdbot-native typed shell
Usage:
lobster ''
lobster run --mode tool ''
lobster resume --token --approve yes|no
lobster doctor
lobster version
lobster help
Modes:
Examples:
lobster 'exec --json "echo [1,2,3]" | json'
lobster run --mode tool 'exec --json "echo [1]" | approve --prompt "ok?"'
Commands:
exec, head, json, pick, table, where, approve, clawd.invoke, state.get, state.set, diff.last, workflows.list, workflows.run shim that prefers when present\n\n### Testing\n-
TAP version 13
Subtest: clawd.invoke posts to /tools/invoke and returns JSON
ok 1 - clawd.invoke posts to /tools/invoke and returns JSON
duration_ms: 13.561667
type: 'test'
...
Subtest: clawd.invoke accepts legacy raw JSON response
ok 2 - clawd.invoke accepts legacy raw JSON response
duration_ms: 18.048834
type: 'test'
...
Subtest: diff.last reports changed on first run and not changed on same input
ok 3 - diff.last reports changed on first run and not changed on same input
duration_ms: 5.498708
type: 'test'
...
Subtest: doctor returns tool-mode ok with version
ok 4 - doctor returns tool-mode ok with version
duration_ms: 46.316042
type: 'test'
...
Subtest: notify message includes repo/pr and changed fields
ok 5 - notify message includes repo/pr and changed fields
duration_ms: 0.374167
type: 'test'
...
Subtest: buildPrChangeSummary reports all fields on first snapshot
ok 6 - buildPrChangeSummary reports all fields on first snapshot
duration_ms: 0.323458
type: 'test'
...
Subtest: buildPrChangeSummary only includes changed fields
ok 7 - buildPrChangeSummary only includes changed fields
duration_ms: 0.484125
type: 'test'
...
Subtest: two approve gates can be resumed sequentially
ok 8 - two approve gates can be resumed sequentially
duration_ms: 86.268875
type: 'test'
...
Subtest: parsePipeline splits stages and args
ok 9 - parsePipeline splits stages and args
duration_ms: 1.361792
type: 'test'
...
Subtest: parsePipeline keeps quoted pipes
ok 10 - parsePipeline keeps quoted pipes
duration_ms: 0.088
type: 'test'
...
Subtest: resume token roundtrip and resume pipeline continues
ok 11 - resume token roundtrip and resume pipeline continues
duration_ms: 29.473791
type: 'test'
...
Subtest: state.set writes and state.get reads
ok 12 - state.set writes and state.get reads
duration_ms: 3.273542
type: 'test'
...
Subtest: state.get returns null for missing key
ok 13 - state.get returns null for missing key
duration_ms: 1.020833
type: 'test'
...
Subtest: tool mode outputs protocolVersion
ok 14 - tool mode outputs protocolVersion
duration_ms: 30.377334
type: 'test'
...
Subtest: approve halts pipeline in tool mode
ok 15 - approve halts pipeline in tool mode
duration_ms: 22.582917
type: 'test'
...
Subtest: approve passes through in human interactive mode only (emit required otherwise)
ok 16 - approve passes through in human interactive mode only (emit required otherwise)
duration_ms: 0.19275
type: 'test'
...
Subtest: workflows.list returns known workflows
ok 17 - workflows.list returns known workflows
duration_ms: 0.908291
type: 'test'
...
1..17
tests 17
suites 0
pass 17
fail 0
cancelled 0
skipped 0
todo 0
duration_ms 125.604416 (build + node --test dist/test/*.test.js)\n-
Found 0 warnings and 0 errors.
Finished in 11ms on 48 files with 100 rules using 10 threads.\n- Manual:\n - [
{
"name": "github.pr.monitor",
"description": "Fetch PR state via gh, diff against last run, emit only on change.",
"argsSchema": {
"type": "object",
"properties": {
"repo": {
"type": "string",
"description": "owner/repo (e.g. clawdbot/clawdbot)"
},
"pr": {
"type": "number",
"description": "Pull request number"
},
"key": {
"type": "string",
"description": "Optional state key override."
},
"changesOnly": {
"type": "boolean",
"description": "If true, suppress output when unchanged."
},
"summaryOnly": {
"type": "boolean",
"description": "If true, return only a compact change summary (smaller output)."
}
},
"required": [
"repo",
"pr"
]
},
"examples": [
{
"args": {
"repo": "clawdbot/clawdbot",
"pr": 1152
},
"description": "Monitor a PR and report when it changes."
}
],
"sideEffects": []
},
{
"name": "github.pr.monitor.notify",
"description": "Monitor a PR and emit a single human-friendly message when it changes.",
"argsSchema": {
"type": "object",
"properties": {
"repo": {
"type": "string",
"description": "owner/repo (e.g. clawdbot/clawdbot)"
},
"pr": {
"type": "number",
"description": "Pull request number"
},
"key": {
"type": "string",
"description": "Optional state key override."
}
},
"required": [
"repo",
"pr"
]
},
"examples": [
{
"args": {
"repo": "clawdbot/clawdbot",
"pr": 1152
},
"description": "Emit "PR updated" message only when changed."
}
],
"sideEffects": []
}
]\n - {
"protocolVersion": 1,
"ok": true,
"status": "ok",
"output": [
{
"kind": "github.pr.monitor.notify",
"suppressed": true
}
],
"requiresApproval": null
}\n - {
"protocolVersion": 1,
"ok": true,
"status": "ok",
"output": [
{
"toolMode": true,
"protocolVersion": 1,
"version": "0.2.0"
}
],
"requiresApproval": null
}\n
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.