Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cft0808/edict
/ functions
Functions
535 in github.com/cft0808/edict
⨍
Functions
535
◇
Types & classes
85
↳
Endpoints
28
↓ 2 callers
Method
claim_stale
认领超时的 pending 事件(消费者崩溃恢复)。
edict/backend/app/services/event_bus.py:160
↓ 2 callers
Function
cmd_flow
添加流转记录(原子操作)
scripts/kanban_update.py:416
↓ 2 callers
Function
cmd_state
更新任务状态(原子操作,含流转合法性校验 + 高风险拦截)
scripts/kanban_update.py:366
↓ 2 callers
Function
doReview
(action: string)
edict/frontend/src/components/TaskModal.tsx:139
↓ 2 callers
Method
ensure_consumer_group
确保消费者组存在(幂等)。
edict/backend/app/services/event_bus.py:106
↓ 2 callers
Function
get_channel
(channel_type: str)
edict/backend/app/channels/__init__.py:26
↓ 2 callers
Function
get_remote_skills_list
列表所有已添加的远程 skills 及其源信息
dashboard/server.py:475
↓ 2 callers
Function
get_skills
(workspace: str)
scripts/sync_agent_config.py:60
↓ 2 callers
Function
handle_scheduler_scan
Periodic stall scanner — runs in a background thread. Uses ``modify_tasks`` to hold the file lock during the mutation phase, preventing concu
dashboard/server.py:1254
↓ 2 callers
Function
humanTitle
(t: Task, labelMap: Record<string, string>)
edict/frontend/src/components/SessionsPanel.tsx:26
↓ 2 callers
Function
is_configured
是否已设置密码。
dashboard/auth.py:39
↓ 2 callers
Method
list_tasks
( self, state: TaskState | None = None, assignee_org: str | None = None, prior
edict/backend/app/services/task_service.py:246
↓ 2 callers
Function
load_activity
(session_file, limit=12)
scripts/sync_from_openclaw_runtime.py:62
↓ 2 callers
Function
migrate_notification_config
自动迁移旧配置 (feishu_webhook) 到新结构 (notification)
dashboard/server.py:591
↓ 2 callers
Function
modify_tasks
Atomically read-modify-write the tasks file. ``modifier(tasks)`` receives the current task list, mutates it in place (or returns a new list),
dashboard/server.py:163
↓ 2 callers
Function
ms_to_str
(ts_ms)
scripts/sync_from_openclaw_runtime.py:25
↓ 2 callers
Function
openSkill
(agentId: string, skillName: string)
edict/frontend/src/components/SkillsConfig.tsx:100
↓ 2 callers
Function
parseDashboardTimestamp
(value: number | string | undefined | null)
edict/frontend/src/time.ts:5
↓ 2 callers
Function
parse_old_task
将旧版 task JSON 转换为 Edict Task 参数。
edict/migration/migrate_json_to_pg.py:55
↓ 2 callers
Function
tabBadge
(key: string)
edict/frontend/src/App.tsx:38
↓ 2 callers
Method
transition_state
执行状态流转。SELECT FOR UPDATE 防止并发 flow_log 丢失。
edict/backend/app/services/task_service.py:108
↓ 2 callers
Method
update_todos
( self, task_id: uuid.UUID, todos: list[dict], )
edict/backend/app/services/task_service.py:219
↓ 2 callers
Function
validate_url
校验 URL 合法性,防 SSRF
scripts/utils.py:48
↓ 2 callers
Method
validate_webhook
(cls, webhook: str)
edict/backend/app/channels/qq.py:92
↓ 2 callers
Function
write_status
(**kwargs)
scripts/sync_from_openclaw_runtime.py:21
↓ 1 callers
Function
_api_available
检查 Edict API 是否可用。
edict/scripts/kanban_update_edict.py:107
↓ 1 callers
Function
_api_put
向 Edict API 发送 PUT 请求。
edict/scripts/kanban_update_edict.py:142
↓ 1 callers
Function
_build_memory_context
分层注入三级记忆:全局规则 → Agent 经验 → 任务上下文。
edict/backend/app/workers/dispatch_worker.py:186
↓ 1 callers
Function
_build_reminder
在 prompt 尾部注入动态提醒(借鉴 Claude 的 reminderInstructions)。
edict/backend/app/workers/dispatch_worker.py:147
↓ 1 callers
Function
_build_task_context
从 dispatch 事件 payload 中提取结构化任务上下文。
edict/backend/app/workers/dispatch_worker.py:98
↓ 1 callers
Method
_call_openclaw
异步调用 OpenClaw CLI — 在线程池中执行,带富上下文注入。
edict/backend/app/workers/dispatch_worker.py:542
↓ 1 callers
Function
_check_agent_process
检测是否有该 Agent 的 openclaw-agent 进程正在运行。
dashboard/server.py:869
↓ 1 callers
Function
_check_permission
检查 Agent 是否有权执行该命令。未知 Agent 不拦截(向前兼容)。
scripts/kanban_update.py:176
↓ 1 callers
Method
_check_stalled
扫描数据库中 Doing/Next 状态超过阈值未更新的任务。
edict/backend/app/workers/orchestrator_worker.py:345
↓ 1 callers
Function
_collect_message_text
收集消息中的可检索文本,用于 task_id/关键词过滤。
dashboard/server.py:1459
↓ 1 callers
Function
_collect_openclaw_models
从 openclaw.json 中收集所有已配置的 model id,与 KNOWN_MODELS 合并去重。 解决 #127: 自定义 provider 的 model 不在下拉列表中。
scripts/sync_agent_config.py:84
↓ 1 callers
Function
_compute_checksum
计算内容的简单校验和
scripts/skill_manager.py:67
↓ 1 callers
Function
_compute_checksum
(content: str)
dashboard/server.py:586
↓ 1 callers
Function
_compute_phase_durations
从 flow_log 计算每个阶段的停留时长。
dashboard/server.py:1754
↓ 1 callers
Function
_compute_todos_diff
计算两个 todos 快照之间的差异。
dashboard/server.py:1819
↓ 1 callers
Function
_compute_todos_summary
计算 todos 完成率汇总。
dashboard/server.py:1801
↓ 1 callers
Function
_download_file
从 URL 下载文件内容(文本格式),支持重试
scripts/skill_manager.py:34
↓ 1 callers
Function
_extract_keywords
从任务标题中提取有意义的关键词(用于 session 内容匹配)。
dashboard/server.py:1599
↓ 1 callers
Function
_get_access_token
Get access_token with local cache (7200s TTL, refresh 300s early).
edict/backend/app/channels/qq.py:18
↓ 1 callers
Function
_get_agent_session_status
读取 Agent 的 sessions.json 获取活跃状态。 返回: (last_active_ts_ms, session_count, is_busy)
dashboard/server.py:844
↓ 1 callers
Method
_get_bucket
根据 agent 类型返回对应桶的信号量。
edict/backend/app/workers/dispatch_worker.py:330
↓ 1 callers
Function
_get_configured_hub_base
Return a user-provided skills hub base URL, if configured.
scripts/skill_manager.py:225
↓ 1 callers
Function
_get_hub_url
获取 skill 的 Hub URL,支持环境变量/本地配置覆盖
scripts/skill_manager.py:235
↓ 1 callers
Function
_get_llm_config
从 openclaw 配置读取 LLM 设置,支持环境变量覆盖。 优先级: 环境变量 > github-copilot token > 本地 copilot-proxy > anthropic > 其他 provider
dashboard/court_discuss.py:322
↓ 1 callers
Function
_handle_client_messages
处理客户端发送的消息(心跳、订阅过滤等)。
edict/backend/app/api/websocket.py:80
↓ 1 callers
Function
_is_today_done
(t)
scripts/refresh_live_data.py:68
↓ 1 callers
Function
_is_valid_task_title
(title)
edict/scripts/kanban_update_edict.py:78
↓ 1 callers
Function
_is_valid_task_title
校验标题是否足够作为一个旨意任务。
scripts/kanban_update.py:271
↓ 1 callers
Function
_iter_task_data_dirs
返回可用的任务数据目录候选(优先 workspace,其次本地 data)。
dashboard/server.py:92
↓ 1 callers
Function
_llm_discuss
使用 LLM 生成多官员讨论。
dashboard/court_discuss.py:498
↓ 1 callers
Function
_llm_summarize
用 LLM 总结讨论结果。
dashboard/court_discuss.py:597
↓ 1 callers
Function
_load_agent_skills
按任务特征动态加载 Agent Skills(延迟能力加载)。
edict/backend/app/workers/dispatch_worker.py:277
↓ 1 callers
Function
_load_canonical_transitions
从 edict/backend 源码解析状态转换表,无需 import(避免 SQLAlchemy 依赖)。
scripts/kanban_update.py:49
↓ 1 callers
Function
_load_openclaw_cfg
()
scripts/sync_officials_stats.py:51
↓ 1 callers
Function
_load_sync_agent_config
()
tests/test_sync_agent_config.py:6
↓ 1 callers
Function
_lock_shared
获取共享锁(读锁)。
scripts/file_lock.py:32
↓ 1 callers
Method
_on_task_completed
任务完成 → 记录日志。
edict/backend/app/workers/orchestrator_worker.py:227
↓ 1 callers
Method
_on_task_created
任务创建 → 派发给太子 agent 起草。
edict/backend/app/workers/orchestrator_worker.py:166
↓ 1 callers
Method
_on_task_stalled
任务停滞 → 自动重试或升级。 恢复策略: 1. 第一次停滞:在当前状态重新派发 agent(重试) 2. 重试耗尽:向上级升级(如六部→尚书省→门下省) 3. 升级到顶(太子)仍失败:标记 Blocked + 通知人工介入
edict/backend/app/workers/orchestrator_worker.py:232
↓ 1 callers
Method
_on_task_status
状态变更 → 自动派发下一个 agent。
edict/backend/app/workers/orchestrator_worker.py:185
↓ 1 callers
Function
_pick_chat_model
从 provider 的模型列表中选一个适合聊天的轻量模型。
dashboard/court_discuss.py:291
↓ 1 callers
Method
_poll_cycle
(self)
edict/backend/app/workers/dispatch_worker.py:371
↓ 1 callers
Method
_poll_cycle
一次轮询周期:多 topic 同时消费,按 task_id 分组并行处理。
edict/backend/app/workers/orchestrator_worker.py:120
↓ 1 callers
Function
_read_copilot_token
读取 openclaw 管理的 GitHub Copilot token。
dashboard/court_discuss.py:301
↓ 1 callers
Method
_recover_pending
(self)
edict/backend/app/workers/dispatch_worker.py:362
↓ 1 callers
Method
_recover_pending
恢复崩溃前未 ACK 的事件。
edict/backend/app/workers/orchestrator_worker.py:109
↓ 1 callers
Method
_relay_cycle
处理一批未投递事件。返回本轮处理数量。
edict/backend/app/workers/outbox_relay.py:54
↓ 1 callers
Function
_relay_events
从 Redis Pub/Sub 接收事件,推送到 WebSocket。
edict/backend/app/api/websocket.py:58
↓ 1 callers
Function
_resolve_api_url_and_token
Resolve final API URL and access token from webhook URL params. Supports two modes: - appid + secret: auto-fetch token from QQ API -
edict/backend/app/channels/qq.py:48
↓ 1 callers
Function
_resolve_openclaw_bin
Return the OpenClaw CLI path used by dashboard dispatch. On Windows, npm-installed CLIs are commonly exposed as .cmd shims. Using shutil.whi
dashboard/server.py:1102
↓ 1 callers
Function
_resolve_project_root
定位项目根目录。
edict/backend/app/workers/dispatch_worker.py:178
↓ 1 callers
Function
_safe_parse_xml
安全解析 XML:限制大小,禁用外部实体(防 XXE)。
scripts/fetch_morning_news.py:58
↓ 1 callers
Function
_sanitize_agent_output
检测 Agent 输出中的注入模式。返回 (原始文本, 告警列表)。
edict/backend/app/workers/dispatch_worker.py:265
↓ 1 callers
Function
_sanitize_title
(raw)
edict/scripts/kanban_update_edict.py:70
↓ 1 callers
Function
_sanitize_title
清洗标题(最长 80 字符)。
scripts/kanban_update.py:225
↓ 1 callers
Method
_serve_static
从 dist/ 目录提供静态文件。
dashboard/server.py:2379
↓ 1 callers
Function
_short_uuid
生成短 UUID 后缀。
scripts/kanban_update.py:822
↓ 1 callers
Function
_simulated_discuss
无 LLM 时的规则生成讨论内容。
dashboard/court_discuss.py:677
↓ 1 callers
Method
_stall_check_loop
定时扫描 Doing/Next 状态超时任务,发布 task.stalled 事件。
edict/backend/app/workers/orchestrator_worker.py:333
↓ 1 callers
Function
_task_source_score
给任务源打分:优先非 demo 任务,其次任务数,再按文件更新时间。
dashboard/server.py:101
↓ 1 callers
Function
_todo_counts
返回 (completed, total) 便于完成态校验。
scripts/kanban_update.py:235
↓ 1 callers
Function
_todo_progress
(task)
dashboard/server.py:732
↓ 1 callers
Function
_try_repair_truncated_discuss
尝试从被截断的 JSON 中提取已完成的 messages 条目。
dashboard/court_discuss.py:411
↓ 1 callers
Function
add_skill_to_agent
Create a new skill for an agent with a standardised SKILL.md template.
dashboard/server.py:315
↓ 1 callers
Function
applyModel
(agentId: string)
edict/frontend/src/components/ModelConfig.tsx:73
↓ 1 callers
Function
build_task
(agent_id, session_key, row, now_ms)
scripts/sync_from_openclaw_runtime.py:132
↓ 1 callers
Function
calc_cost
(s, model)
scripts/sync_officials_stats.py:131
↓ 1 callers
Function
cleanup_backups
只保留最近 MAX_BACKUPS 个备份
scripts/apply_model_changes.py:26
↓ 1 callers
Function
cmd_block
(task_id, reason)
edict/scripts/kanban_update_edict.py:277
↓ 1 callers
Function
cmd_block
标记阻塞(原子操作)
scripts/kanban_update.py:489
↓ 1 callers
Function
cmd_confirm
确认或驳回 PendingConfirm 状态的高风险操作。 action: approve / reject
scripts/kanban_update.py:506
↓ 1 callers
Function
cmd_create
(task_id, title, state, org, official, remark=None)
edict/scripts/kanban_update_edict.py:190
↓ 1 callers
Function
cmd_delegate
创建委派子任务,由目标 Agent 独立执行。 防死锁:记录 delegation_depth 和 delegation_path,超过 3 层或循环委派时拒绝。
scripts/kanban_update.py:828
↓ 1 callers
Function
cmd_delegate_result
提交委派子任务结果,回写到父任务的 task_memory。
scripts/kanban_update.py:894
↓ 1 callers
Function
cmd_done
(task_id, output_path='', summary='')
edict/scripts/kanban_update_edict.py:260
← previous
next →
101–200 of 535, ranked by callers