mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-09-14 14:01:28 +08:00
0f3c45101b
Bug fixes
- #3045 statusline.cjs: getGitInfo() runs the 5-command git chain per render;
on large repos with concurrent Claude Code sessions this queued subprocesses
faster than they finished (reporter observed hundreds of orphan children +
load-avg in the hundreds). Added a per-cwd tmp file cache with 5s TTL —
dirty status still feels live, pileup is bounded.
- #3064 hooks post-task: the narrow ad-hoc regex /^[a-zA-Z0-9_-]+$/ silently
dropped every colon-namespaced plugin agent (ruflo-core:reviewer,
feature-dev:code-explorer, ...) — i.e. every Claude Code plugin agent. The
canonical validateIdentifier() upstream already allows ':' and '.', so the
redundant regex is removed. Regression test locks in 4 agent-shape cases,
proven to catch the bug: 2 pass / 2 fail on revert, 4 pass with fix.
- #3065 harness-gepa SKILL.md: unquoted colon in `description` broke YAML
parsing in `npx skills add`. Quoted the description; rephrased the bare
"(default:" to avoid the leading colon.
New plugin: ruflo-deepseek-harness
- plugins/ruflo-deepseek-harness/: sibling to ruflo-metaharness (ADR-150
shape). Two skills: `deepseek-chat` (non-reasoning) and `deepseek-reason`
(surfaces reasoning_content separately). Reads DEEPSEEK_API_KEY from env;
degrades gracefully (exit 0 with `{status: 'degraded', reason, hint}`)
when the key is missing or the API is unreachable. `--alert-on-error`
flag opts into hard exit 1 for CI gates. Smoke-tested locally.
Release
- Bump @claude-flow/cli, claude-flow, ruflo: 3.38.12 → 3.38.13 (PATCH:
bug fixes; the new plugin is scaffolding under plugins/ and not part of
the npm-published CLI packages).
Not fixed
- #3051 memory_store tags: current source's memory_store handler passes
tags straight through to storeEntry; a maintainer already verified live
round-trip works on fa13ee4ad. Reporter has not yet supplied the
ruflo/@claude-flow/cli version that hosted the affected MCP server,
so the affected release path is unknown. Left as-is pending that reply.
Claude-Session: https://claude.ai/code/session_0118jMsYhwHD5dx2vStENsEB
67 lines
2.0 KiB
JavaScript
67 lines
2.0 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* DeepSeek chat completion — non-reasoning model (`deepseek-chat`).
|
|
*
|
|
* Usage:
|
|
* node plugins/ruflo-deepseek-harness/scripts/chat.mjs \
|
|
* --prompt "Summarize the following in one sentence: ..." \
|
|
* [--system "You are a concise assistant."] \
|
|
* [--model deepseek-chat] \
|
|
* [--temperature 0.7] \
|
|
* [--max-tokens 1024] \
|
|
* [--format table|json] \
|
|
* [--alert-on-error]
|
|
*/
|
|
|
|
import { parseArgs, emitAndExit, deepseekChat, extractCompletion } from './_deepseek.mjs';
|
|
|
|
const args = parseArgs(process.argv.slice(2));
|
|
const alertOnError = args['alert-on-error'] === true;
|
|
|
|
const prompt = args.prompt;
|
|
if (!prompt || prompt === true) {
|
|
emitAndExit(
|
|
{ status: 'error', reason: '--prompt is required (a string of at least 1 char)' },
|
|
{ alertOnError: true } // hard-error even without the flag: this is a usage bug
|
|
);
|
|
}
|
|
|
|
const messages = [];
|
|
if (args.system && args.system !== true) messages.push({ role: 'system', content: args.system });
|
|
messages.push({ role: 'user', content: prompt });
|
|
|
|
const model = (args.model && args.model !== true) ? args.model : 'deepseek-chat';
|
|
const temperature = args.temperature !== undefined ? Number(args.temperature) : undefined;
|
|
const maxTokens = args['max-tokens'] !== undefined ? Number(args['max-tokens']) : undefined;
|
|
|
|
const result = await deepseekChat({ model, messages, temperature, maxTokens });
|
|
|
|
if (!result.ok) {
|
|
emitAndExit(
|
|
{ status: 'degraded', model, reason: result.reason, hint: result.hint || null },
|
|
{ alertOnError }
|
|
);
|
|
}
|
|
|
|
const { content, finishReason } = extractCompletion(result.data);
|
|
const usage = result.data.usage || {};
|
|
|
|
const payload = {
|
|
status: 'ok',
|
|
model,
|
|
content,
|
|
finishReason,
|
|
usage: {
|
|
promptTokens: usage.prompt_tokens ?? null,
|
|
completionTokens: usage.completion_tokens ?? null,
|
|
totalTokens: usage.total_tokens ?? null,
|
|
},
|
|
};
|
|
|
|
if (args.format === 'table') {
|
|
process.stdout.write(content + '\n');
|
|
process.exit(0);
|
|
}
|
|
|
|
emitAndExit(payload);
|