Pin bun to 1.3.11 for reproducible builds. Add explicit vite build step before publishing. Add --ignore-scripts to npm publish for security.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Node.js v20 does not support the syntax. Replace all patterns with a new helper that wraps the operation in try/finally and explicitly calls Symbol.dispose.
Also rename listBuiltinSkillNames to listBuiltinSkills in generate-review-builtin.ts.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add 30s in-memory cache for favorite item list to reduce API calls
Expand supported MCP server types beyond local/remote to stdio/sse/ws/sdk and more
Change single MCP server conversion to use stdio type with separate command/args/env fields
Reduce page size from 100 to 20 for faster initial load
Switch parallel remote fetching to sequential to avoid rate limiting
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add git status and git diff for debugging visibility during release.
Change git add to -A and append || true to commit/push to prevent workflow failures when there are no changes or push issues.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add verification output after syncing package.json and defines.ts
so the logs clearly show whether the version bump succeeded.
Also replace 'Create tag if missing' with 'Create or recreate tag'
that deletes and recreates the tag when it points to a stale commit,
preventing checkout of outdated code from previous failed runs.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
GitHub Actions workflow_dispatch boolean inputs are strings in
expressions ('true'/'false'). Non-empty strings are always truthy,
so !inputs.dry_run always evaluated to false. Use explicit string
comparison to fix version sync and publish step gating.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add SSH agent setup before build so generate-review-builtin.ts
can clone the private costrict-review repo. Also run the
generator explicitly with continue-on-error to ensure the
bundled review skills file exists before Bun.build.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Use the exact input version for git tags without adding a v prefix.
Also comment out typecheck and test steps to speed up the publish flow.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Remove push tag trigger so the workflow only runs on manual dispatch.
Add steps to automatically sync package.json and scripts/defines.ts
version before publishing, create the git tag, and skip typecheck.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
When triggering the publish workflow manually with a version that does
not yet have a corresponding git tag, automatically create and push
the v-prefixed tag on the current HEAD instead of failing.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add optional dry-run flag to workflow dispatch for validating publishes
without uploading to the registry.
Support version inputs with or without the v prefix by resolving
the correct git ref automatically. Skip changelog generation and
GitHub release creation when running in dry-run mode.
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Change isEnabled() logic so raw dump is on by default unless
explicitly disabled via CSC_DISABLE_RAW_DUMP=1 or
COSTRICT_DISABLE_RAW_DUMP=1.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Add session messages and repo info caching to avoid repeated JSONL
parsing and git subprocess spawning across tasks.
Share state across all tasks in a single batch to minimize file lock
contention and JSON parse overhead.
Convert queue operations from sync to async to prevent event loop
blocking in the main process.
Restore inline batch worker fallback when external spawn fails,
and increase worker interval from 30s to 2min to reduce CPU impact.
Add 5s debounce per session+messageID to prevent duplicate enqueues.
Improve binary mode spawn reliability by falling back to node runtime
when bun is not available.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
Implement the raw dump data reporting module for uploading conversation,
summary, and commit data to the CoStrict endpoint.
Key features:
- Local dump mode for debugging without network
- PID-based file locking to prevent state corruption with multiple csc instances
- 5-minute deduplication window for summary uploads
- Auto-detect sender (user/agent) and conditional user_input
- Repository fields (repo_addr, repo_branch, work_dir) in conversation
- Anonymous interface fallback when auth fails
- Filter commits to current user and limit fetch range
- Skip empty intermediate conversation turns
- Fix worker spawning for build and binary modes
- Remove git diff HEAD fallback to avoid unrelated working tree changes
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>