Skip to content

feat(contrib/dashboard): DUODUO.md manifest, scripts/, and sample descriptor#38

Open
6m1w wants to merge 1 commit into
openduo:mainfrom
6m1w:contrib/dashboard-v2
Open

feat(contrib/dashboard): DUODUO.md manifest, scripts/, and sample descriptor#38
6m1w wants to merge 1 commit into
openduo:mainfrom
6m1w:contrib/dashboard-v2

Conversation

@6m1w

@6m1w 6m1w commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to PR #25, addressing antmanler's review feedback:

  • DUODUO.md with full YAML frontmatter manifest (name, type, version, requires, installs, scripts) — ready for future duoduo contrib install tooling
  • scripts/ subdirectory — organized helper scripts:
    • sync-channels.sh: cron wrapper for automated channel refresh
    • fill-empty-descriptors.py: populates stub descriptors from template when bot joins new groups
    • refresh-channel-map.py and save-api.py moved into scripts/
  • config/sample-descriptor.md — default channel descriptor template with participation rules framework

Design notes

  • Uses DUODUO.md (not CLAUDE.md) per antmanler's guidance to avoid prompt injection
  • YAML frontmatter is program-parseable for future CLI tooling
  • Markdown body is agent-readable for self-service installation
  • All scripts are standalone with proper shebangs
  • Original flat files (refresh-channel-map.py, save-api.py) can be removed from contrib/dashboard/ root after merge

Test plan

  • Verify DUODUO.md YAML frontmatter parses correctly
  • Verify scripts/sync-channels.sh runs refresh + fill-empty-descriptors
  • Verify config/sample-descriptor.md has correct placeholder format

🤖 Generated with Claude Code

… descriptor

- DUODUO.md: full YAML frontmatter manifest per antmanler's spec
  (name, type, version, requires, installs, scripts)
- scripts/sync-channels.sh: cron wrapper for channel refresh + descriptor fill
- scripts/fill-empty-descriptors.py: populates stub descriptors from template
- scripts/refresh-channel-map.py: moved into scripts/ subdirectory
- scripts/save-api.py: moved into scripts/ subdirectory
- config/sample-descriptor.md: default channel descriptor template with
  participation rules framework

Follows up on PR openduo#25 review feedback.

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

Copy link
Copy Markdown
Contributor

Thanks for the follow-up! Good instincts on organizing scripts and adding the sample descriptor. A few things need to be addressed before we can merge.

Must fix

1. Hardcoded paths

All scripts hardcode ~/ENG/openduo/openduo. Extensions must discover paths at runtime via the system.runtime.info RPC, which returns runtime_dir and kernel_dir. Example:

import json, urllib.request
def get_runtime_paths(daemon_url="http://localhost:20233"):
    req = urllib.request.Request(f"{daemon_url}/rpc",
        data=json.dumps({"jsonrpc":"2.0","id":1,"method":"system.runtime.info"}).encode(),
        headers={"Content-Type": "application/json"})
    with urllib.request.urlopen(req) as r:
        result = json.loads(r.read())["result"]
    return result["runtime_dir"], result["kernel_dir"]

Same for dashboard.html — loadFile("/home/duoduo/aladuo/config/sample-descriptor.md") must use a path derived from the RPC response, not hardcoded.

See contrib/README.md for the full convention.

2. Rebase on current main

Your branch is based on an older version. The current main already has:

  • shortActor(k, evt) with sessionDisplayNames map, display_name support, and subconscious partition name resolution (sub:<name>)
  • Signal bar tooltips showing display_name and last_error

Your PR reverts all of these back to the old shortActor(k). Please rebase on current main and preserve these changes.

3. Title "WATU" → "Duoduo"

The dashboard title and brand name must stay "Duoduo", not "WATU".

4. Remove hardcoded entity skip

if (ent.file === "antmanler.md" || ent.file === "feishu-user-primary.md") return;

This is instance-specific. Remove it.

5. No sudo in scripts

fill-empty-descriptors.py uses os.system(f'sudo cp ...') — this is a security concern and won't work in most environments. Use standard file I/O. If there's a permissions issue, document it as a prerequisite rather than working around it with sudo.

Frontmatter

We've finalized the contrib frontmatter convention (see updated contrib/README.md). Please simplify to:

---
name: dashboard-channels-entities
type: dashboard
version: 0.1.0
author: 6m1w
description: Enhanced dashboard with Channels and Entities tabs
requires:
  - python3
  - feishu-credentials
---

The installs and scripts blocks should move into the Markdown body — the agent reads the body for installation steps.

New files

The scripts/ reorganization and config/sample-descriptor.md are good additions. Just fix the path hardcoding and they're ready.

Looking forward to the update!

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.

2 participants