Skip to content

release: v1.0.5-jp — 本家 virattt/dexter v1.0.5 追従 - #17

Merged
edinetdb merged 60 commits into
mainfrom
upstream-sync-v1.0.5
Sep 4, 2026
Merged

edinetdb merged 60 commits into
mainfrom
upstream-sync-v1.0.5

Conversation

@edinetdb

@edinetdb edinetdb commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Dexter JP v1.0.5-jp — upstream sync (virattt/dexter v1.0.0 → v1.0.5)

Dexter JP を本家 virattt/dexter の最新リリース v1.0.5 に追従させました。前回の同期基準は v1.0.0(JP v1.0.0-jp)でした。

本家から取り込んだ機能

  • Bash ツール: 人間承認ゲート付きのシェル実行ツール(allow-once / allow-session / allow-always / deny)。新設の permission engine(src/permissions/)がコマンドを分類し、危険なコマンドは承認を要求します。CLI 専用(CLI_ONLY_TOOLS)。
  • サブエージェント委譲の system prompt 拡充: 独立したサブタスクは同一ターンで並列に spawn_subagent を呼べるというガイダンスを追加。
  • 検索プロバイダ選択 UI(/search コマンド、SearchSelectionController): Exa / Perplexity / Tavily / LangSearch から優先プロバイダを選択可能に。
  • Microcompact(src/agent/microcompact.ts): 会話が肥大化する前に古いツール結果を軽量にクリアする仕組み。JP のツール名(get_financials / get_stock_price / read_filings / company_screener 等)に合わせて対象ツール名を調整済み。
  • Permission rules 永続化(.dexter/settings.json の permissions セクション)。
  • スピナー描画の高頻度化(フレーム前進を tick と分離、体感の滑らかさ向上)。
  • OpenAI モデルラインナップを gpt-5.6-sol / gpt-5.6-terra / gpt-5.6-luna に更新(デフォルトモデルも gpt-5.6-sol に追従)。
  • Ollama Cloud プロバイダ追加。

意図的に取り込まなかったもの(米国固有・EDINET DB非対応)

以下は本家 v1.0.1〜v1.0.5 で追加/変更された米国株向け機能で、EDINET DB (日本市場) には対応するデータ源がないため見送りました:

  • get_market_data / stock_screener(米国株価・スクリーニング。JP は get_stock_price(J-Quants) / company_screener(EDINET DB) を継続使用)
  • insider_ownership.ts / institutional_holdings.ts / beneficial_ownership.ts(SEC の Form 3/4/5, 13F, 13D/G ベースの米国固有ツール。CIK 前提で EDINET DB では提供不可)
  • formatters.ts(米国データ整形ロジック、以前から未使用)
  • getStockPrices(Financial Datasets 提供の米国ティッカー向け価格取得。JP は J-Quants 専用実装 getStockPrice を継続)
  • get_earnings のノーティッカー "latest earnings feed" モード(EDINET DB 側に全社横断フィード API が無いため見送り。将来 API 対応があれば再検討)

JP オリジナル機能(今回のマージで保持を確認したもの)

  • EDINET DB / J-Quants 連携全般(get_financials, read_filings, company_screener, get_stock_price, get_earnings (TDNet 決算短信), getShareholders (大量保有報告書))
  • メッセージングゲートウェイ(Slack / Discord / LINE / WhatsApp)と DEXTER_PUBLIC_GATEWAY による公開ゲートウェイモード(危険なツール群を除外するセキュリティゲート)
  • /rules 直接ファイル読み込み(.dexter/RULES.md)
  • Claude Agent SDK モード(claude-agent-sdk プロバイダ)
  • 識別子整合性・上場状態確認の system prompt ルール(誤った証券コード/EDINET codeの記憶からの捏造を防止)
  • DCF バリュエーションスキルの日本市場向けパラメータ(JGB金利、EDINET DB ベースのデータ取得)

既知の残課題

  • src/skills/write-memo/SKILL.md は本家からそのまま移植された未ローカライズのスキルで、米国ティッカー・SEC 前提のままです(TODO コメントで明示済み、今回のマージ対象外)。

ゲート結果

  • bun install: 成功(lockfile 再生成)
  • bun run typecheck: 成功(エラーなし)
  • bun test: 362 pass / 0 fail(src/evals/dataset.test.ts の閾値・期待値を JP データセット規模に合わせて調整)
  • CLI 起動スモークテスト: 成功(Welcome to Dexter v1.0.5-jp、モデル表示 GPT 5.6 Sol を確認)。EDINET DB API キー未設定環境のため実データ呼び出しは未実施。

virattt and others added 30 commits April 25, 2026 08:39
Bump CalVer version for the next release cut.

Made-with: Cursor
… (#235)

* feat(deepseek): add support for DeepSeek V4 models with thinking mode

- Update DeepSeek provider to use V4 models (deepseek-v4-pro and deepseek-v4-flash)
- Add thinking mode configuration for V4 models with high reasoning effort

* feat(deepseek): increase context window to 1M tokens for V4 models

- Update DeepSeek V4 context window from 128K to 1M tokens
Made-with: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ol cascades (#262)

* fix(prompt) explain RULES.md

* read the file directly
* fix(cli): add state tracking for pendingApproval

* add unit tests

* await promise

* remove dead code

* test: sync model id to gpt-5.5 in createController helper

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: virattt <virat.dot@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: add LangSearch API integration and update search provider options

* refactor: drop misleading restart message, fix naming and description nits

The per-query Agent.create call invokes getToolRegistry, which reads
process.env fresh. saveApiKeyToEnv reloads .env into process.env via
dotenv override. So no provider needs a restart — replace the misleading
"Restart Dexter to use X" message (carved out only for perplexity, now
also langsearch) with a single accurate "X is now active" confirmation.

Also:
- Rename langSearchTool -> langSearch to match exaSearch/tavilySearch/
  perplexitySearch
- Sync description "content summaries" -> "content snippets" for
  consistency with other web_search providers
- Add trailing newline to langsearch.ts

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix: drop API-key-saved confirmation that misused onError

The previous commit replaced "Restart Dexter to use X" with
"X is now active" but kept routing through onError, which logs at
ERROR level and renders as "Error: ..." in red. Removing the
confirmation entirely matches perplexity's longstanding silent-success
path; the selector overlay closes on commit and /search shows the
active provider with a checkmark, so implicit feedback is sufficient.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: virattt <virat.dot@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
virattt and others added 27 commits June 9, 2026 20:43
Co-authored-by: Cursor <cursoragent@cursor.com>
Let the agent pause mid-turn to ask 1-4 multiple-choice questions with
inline UI, graceful degradation on non-CLI channels, and subagent exclusion.

Co-authored-by: Cursor <cursoragent@cursor.com>
Switch from CalVer to SemVer starting at 1.0.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
* Add ollama cloud support

* Revert unrelated package-lock.json changes

Reset lockfile to match main — this PR has no package.json
changes, so the lockfile should be unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Rename OLLAMA_CLOUD_KEY to OLLAMA_CLOUD_API_KEY for consistency

All other providers use the _API_KEY suffix convention.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: virattt <virat.dot@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…g (#281)

X search threw immediately on HTTP 429, terminating multi-page searches
mid-run even though the X-Rate-Limit-Reset header was already parsed and
a wait time computed. Now wait for the reset window and retry, bounding
both the wait duration and retry count so an unusually long reset window
can't hang the agent indefinitely.

Fixes #246
…rict schema error (#280)

With @langchain/openai@1.3.1 + zod@4.3.6, any field wrapped with .default()
in a schema passed as outputSchema to withStructuredOutput gets converted by
z.toJSONSchema({reused:'ref'}) into a $ref with sibling default/description/title
keywords. OpenAI rejects this in strict structured-output mode with:

  400 Invalid schema for response_format 'extract':
  $ref cannot have keywords {'default', 'description', 'title'}

This causes every stock_screener call to fail with "Failed to parse screening
criteria" on any gpt-4o / gpt-5.x model (all models that use jsonSchema mode).

Fix: drop .default() from currency and limit. Both fields remain required in
the strict schema, so the LLM still provides them (defaulting to USD/25 per
the prompt instructions).
Introduce src/permissions/{types,engine}.ts with evaluatePermission() and
sessionKey(), and route AgentToolExecutor's approval gate through the engine
instead of a hardcoded TOOLS_REQUIRING_APPROVAL list.

Behavior-preserving (Phase 0): write_file/edit_file ask, everything else
allows; allow-session uses a shared file:write key so approving one file-writer
covers both, matching the prior bulk-grant behavior. Foundation for per-command
bash permissions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CLI-only `bash` tool behind the permission engine. No OS sandbox yet (Phase 3),
so every command is human-approved; a strict-syntax gate marks commands with shell
metacharacters or interpreters as non-session-cacheable, so an allow-session grant
can never silently skip a deceptive command.

- src/tools/bash/shell-runner.ts: node:child_process spawn (detached) with
  process-group tree-kill on timeout/abort, absolute timeout, 256KB output cap,
  StringDecoder output, graceful spawn-failure handling, post-SIGKILL watchdog.
- src/tools/bash/{bash-tool,prompt}.ts: createBash tool + description.
- src/permissions/engine.ts: bash gate (always ask; sessionCacheable via a
  conservative simple-command check) + exact-command session key.
- src/agent/tool-executor.ts: sessionCacheable gating (non-cacheable always reprompts).
- Approval prompt shows the command (approval-prompt / agent-runner / cli).
- Registered CLI-only + non-Windows; excluded from gateway and subagents.

53 tests pass (tree-kill, timeout, abort, output-cap, spawn-failure, bash gate);
typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…assifier

Replaces Phase-1's heuristic with a real, fail-closed permission engine. No OS
sandbox yet (Phase 3), so read-only commands do NOT auto-allow; out of the box
every command still asks, except commands matching an explicit user allow rule
(auto-run) or a deny rule / the built-in security floor (silently blocked).

- command-parser.ts: vendored quote-aware fail-closed tokenizer (the keystone) —
  decomposes compounds, strips env/wrappers, handles fd redirects (2>&1) and
  line continuations, and fails closed to `unknown` on substitution, backticks,
  subshells, here-docs, process substitution, brace/glob expansion.
- read-only.ts: conservative classifier (allowlist + safe-flag tables + denylist).
- rules.ts: Tool(content) grammar (exact / :* prefix / tool-wide) parsed to
  structured rules; matchSegment; loadRuleSet/addRule over .dexter/settings.json;
  a non-overridable security floor (env-injection + secret-path reads); proposeRule
  (read-only → wildcard, mutating → exact, so "always allow" can't widen).
- engine.ts: parse → classify → match (deny > ask > allow > default-ask); a
  write-redirect segment is never auto-allowed; session key is the exact command.
- allow-always wired end-to-end (decision union, executor persist, 4th selector
  item, label, prompt, cli); bash allow-session grants pruned per query.

Adversarially red-teamed; the review's verified bypasses (env-wrapper injection,
glob/multi-dot/case secret reads, backslash-newline, 2>&1 mis-lex, ask-rule cache
over-approval) are all fixed with regression tests. 205 permission tests incl. a
40+ case adversarial fuzz corpus (none reaches allow); 249 total green; tsc clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sync Dexter JP with upstream virattt/dexter v1.0.5 (previous base: v1.0.0).

Merged in from upstream:
- Bash tool with human-gated permission engine (allow-once/allow-session/allow-always/deny)
- Search provider selection UI (/search: Exa/Perplexity/Tavily/LangSearch)
- Microcompact (lightweight old-tool-result clearing), adapted to JP tool names
- Subagent delegation parallel-call guidance in system prompt
- OpenAI model lineup bump to gpt-5.6-sol/terra/luna (new default: gpt-5.6-sol)
- Ollama Cloud provider, spinner frame-rate decoupling

Deliberately not carried over (US-specific, no EDINET DB equivalent):
- get_market_data / stock_screener / formatters.ts (removed, JP already has
  get_stock_price via J-Quants and company_screener via EDINET DB)
- insider_ownership.ts / institutional_holdings.ts / beneficial_ownership.ts
  (new upstream tools built on SEC CIK/13F/13D-G data; deleted, not exposed)
- getStockPrices and the tickerless "latest earnings feed" mode (no EDINET DB
  equivalent endpoint)

Preserved JP originals: EDINET DB / J-Quants tool set, messaging gateways
(Slack/Discord/LINE/WhatsApp) with DEXTER_PUBLIC_GATEWAY security gating,
/rules local file reading, Claude Agent SDK mode, identifier-integrity and
listing-status prompt rules, JP-localized DCF skill.

Adjusted src/evals/dataset.test.ts assertions to match the JP eval dataset's
actual size/content (JP dataset is a smaller, Japan-market-specific set,
not the upstream US dataset).

Gates: bun install (lockfile regenerated), bun run typecheck (clean),
bun test (362 pass / 0 fail), CLI boot smoke test (Welcome banner + model
display confirmed; no live EDINET DB API calls, no key configured in this
environment).

Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
@edinetdb
edinetdb merged commit 188a146 into main Sep 4, 2026
2 checks passed
@edinetdb
edinetdb deleted the upstream-sync-v1.0.5 branch September 4, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants