Skip to content

YujunZhou/tellonce / codex

tellonce

Verified

Use to view, explain, correct, delete or reorganize the user's saved preferences, or to record one by hand when automatic recording is off; learning and rule injection otherwise run automatically through Codex hooks.

FileKindSize
.codex-plugin/plugin.jsonconfig1.3 KB
SKILL.mdskill md12.0 KB
dashboard.shexecutablescript348 B
docs/CC_PARITY_MATRIX.mdmarkdown7.3 KB
docs/README.mdmarkdown3.4 KB
doctor.shexecutablescript345 B
hooks/hooks.jsonconfig714 B
hooks/posttooluse-deterministic-block.shexecutablescript2.0 KB
hooks/sessionstart-init.shexecutablescript1.9 KB
hooks/userpromptsubmit-dispatch.pyscript2.6 KB
hooks/userpromptsubmit-memory-upsert.shscript326 B
hooks/userpromptsubmit-pending-inject.shexecutablescript2.0 KB
hooks/userpromptsubmit-retrieve-inject.shexecutablescript3.1 KB
hooks/userpromptsubmit-shadow-alert-inject.shexecutablescript1.2 KB
install.shexecutablescript13.9 KB
shared_lib/_install_merge_settings.pyscript12.1 KB
shared_lib/_pt_hooks.txtmarkdown407 B
shared_lib/correction_interpretation.pyscript8.5 KB
shared_lib/detect_user_prefer.pyscript7.2 KB
shared_lib/deterministic_block.pyscript9.3 KB
shared_lib/event_obligations.pyscript19.8 KB
shared_lib/execution_support.pyscript75.8 KB
shared_lib/fingerprints.yamlconfig1.1 KB
shared_lib/learning_policy.pyscript4.6 KB
shared_lib/memory_judge.pyscript84.8 KB
shared_lib/memory_publication.pyscript14.9 KB
shared_lib/memory_runtime.pyscript12.2 KB
shared_lib/memory_store.pyscript99.6 KB
shared_lib/memory_upsert.pyscript57.1 KB
shared_lib/memory_upsert_hook.pyscript4.6 KB
shared_lib/model_requests.pyscript5.8 KB
shared_lib/path_config.pyscript13.3 KB
shared_lib/pending_queue_manager.pyscript23.4 KB
shared_lib/pt_platform.pyscript1.5 KB
shared_lib/redaction.pyscript3.4 KB
shared_lib/retrieve_inject.pyexecutablescript57.9 KB
shared_lib/rule_selection.pyscript18.9 KB
shared_lib/shadow_alert_inject.pyscript6.1 KB
shared_lib/training_memory.pyscript17.8 KB
shared_lib/transcript_adapter.pyscript13.7 KB
shared_lib/verify_compliance.pyexecutablescript24.5 KB
shared_lib/verify_retry_shadow.pyscript27.4 KB
tellonce_codex/__init__.pyscript52 B
tellonce_codex/__main__.pyscript49 B
tellonce_codex/cli.pyscript6.8 KB
tellonce_codex/codex_posttooluse_block.pyscript11.2 KB
tellonce_codex/dashboard.pyscript3.4 KB
tellonce_codex/doctor.pyscript10.9 KB
tellonce_codex/index.pyscript1.8 KB
tellonce_codex/install.pyscript3.1 KB
tellonce_codex/install_codex_hooks.pyscript15.1 KB
tellonce_codex/ledger.pyscript17.1 KB
tellonce_codex/memory.pyscript5.3 KB
tellonce_codex/migrate.pyscript1.3 KB
tellonce_codex/mode.pyscript2.3 KB
tellonce_codex/paths.pyscript8.6 KB
tellonce_codex/promote.pyscript4.4 KB
tellonce_codex/scan.pyscript2.6 KB
tellonce_codex/uninstall.pyscript1.7 KB
tellonce_codex/verify.pyscript5.3 KB
tellonce_codex/wrapper.pyscript12.0 KB
uninstall.shexecutablescript4.6 KB

uninstall.sh

View on GitHub
#!/usr/bin/env bash
# Codex tellonce uninstall.
#   - Removes per-project state marker (managed_runtime.txt) — keeps logs/state
#     by default; `--purge-state` wipes the project's tellonce state.
#   - Optionally removes hook registrations from ~/.codex/hooks.json
#     (--purge-hooks). Default: keep registered, just disable per project.
#   - Optionally removes global skill dir from ~/.codex/skills/tellonce/
#     (--purge-skill). Default: leave global runtime so other projects can use it.

set -euo pipefail

SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "${SKILL_DIR}/.." && pwd)"
PYTHON="${PYTHON:-python3}"

GLOBAL_DIR="${HOME}/.codex/skills/tellonce"
HOOKS_JSON="${HOME}/.codex/hooks.json"

# Match install.sh's clone detection (both conditions): when the user's
# clone/checkout occupies the default path, the generated runtime lives in
# the sibling -runtime dir. Never rm -rf the user's source tree via
# --purge-skill.
if [[ -d "${GLOBAL_DIR}" ]]; then
    GLOBAL_DIR_REAL_PRE="$(cd "${GLOBAL_DIR}" && pwd -P)"
    REPO_ROOT_REAL="$(cd "${REPO_ROOT}" && pwd -P)"
    if [[ "${GLOBAL_DIR_REAL_PRE}" == "${REPO_ROOT_REAL}" || -e "${GLOBAL_DIR}/.git" ]]; then
        GLOBAL_DIR="${HOME}/.codex/skills/tellonce-runtime"
    fi
fi

# Resolve where tellonce_codex module lives — prefer global install (most
# common), fall back to repo-local source layout (development).
if [[ -d "${GLOBAL_DIR}/tellonce_codex" ]]; then
    PYTHON_PATH_ROOT="${GLOBAL_DIR}"
elif [[ -d "${SKILL_DIR}/tellonce_codex" ]]; then
    PYTHON_PATH_ROOT="${SKILL_DIR}"
else
    PYTHON_PATH_ROOT="${REPO_ROOT}/codex"
fi

PURGE_STATE=false
PURGE_HOOKS=false
PURGE_SKILL=false
PASSTHRU=()
while [[ $# -gt 0 ]]; do
    case "$1" in
        --purge-state) PURGE_STATE=true; PASSTHRU+=("$1"); shift ;;
        --purge-hooks) PURGE_HOOKS=true; shift ;;
        --purge-skill) PURGE_SKILL=true; shift ;;
        *) PASSTHRU+=("$1"); shift ;;
    esac
done

# --purge-skill implies --purge-hooks: deleting the runtime while keeping the
# hooks.json registrations would leave every Codex event firing 5 missing
# commands.
if [[ "${PURGE_SKILL}" == true && "${PURGE_HOOKS}" != true ]]; then
    echo "(--purge-skill implies --purge-hooks: registrations must not outlive the scripts they point to)"
    PURGE_HOOKS=true
fi

# 1. Project-level uninstall via tellonce_codex. Cleanup requested for global
# hooks/runtime must still run if project state is corrupt, but the final exit
# code must report the failure.
PROJECT_RC=0
PYTHONPATH="${PYTHON_PATH_ROOT}" "${PYTHON}" -m tellonce_codex uninstall \
    ${PASSTHRU[@]+"${PASSTHRU[@]}"} || PROJECT_RC=$?
if [[ "${PROJECT_RC}" -ne 0 ]]; then
    echo "⚠ project-level uninstall failed (rc=${PROJECT_RC}); continuing with requested global cleanup" >&2
fi

# 2. Optionally drop hook registrations from ~/.codex/hooks.json
HOOK_RC=0
if [[ "${PURGE_HOOKS}" == true ]]; then
    if [[ -f "${HOOKS_JSON}" ]]; then
        echo "Removing Tellonce hook registrations from ${HOOKS_JSON}"
        PYTHONPATH="${PYTHON_PATH_ROOT}" "${PYTHON}" -m tellonce_codex.install_codex_hooks \
            --hooks-json "${HOOKS_JSON}" \
            --remove || HOOK_RC=$?
    fi
else
    echo "(skipping hook registration removal — pass --purge-hooks to drop ~/.codex/hooks.json entries)"
fi

# 3. Optionally remove global skill dir + shell wrapper
if [[ "${PURGE_SKILL}" == true && "${HOOK_RC}" -eq 0 ]]; then
    if [[ -d "${GLOBAL_DIR}" ]]; then
        RESOLVED_GLOBAL="$(cd "${GLOBAL_DIR}" && pwd -P)"
        if [[ "${RESOLVED_GLOBAL}" == "/" ]] || [[ "${RESOLVED_GLOBAL}" == "${HOME}" ]]; then
            echo "❌ refusing to remove suspicious skill dir: ${RESOLVED_GLOBAL}"
            exit 1
        fi
        if [[ "${PURGE_SKILL}" == true && "${HOOK_RC}" -ne 0 ]]; then
            echo "⚠ preserving ${GLOBAL_DIR} because hook registration removal failed" >&2
        fi
        echo "Removing global skill dir ${GLOBAL_DIR}"
        rm -rf "${GLOBAL_DIR}"
    fi
    # Also remove the shell wrapper installed at ~/.local/bin/tellonce_codex
    WRAPPER="${HOME}/.local/bin/tellonce_codex"
    if [[ -f "${WRAPPER}" ]]; then
        # Defensive: only delete if the file looks like ours
        if grep -q "tellonce_codex — shell wrapper installed by codex/install.sh" "${WRAPPER}" 2>/dev/null; then
            rm -f "${WRAPPER}"
            echo "Removing shell wrapper ${WRAPPER}"
        fi
    fi
fi

echo ""
if [[ "${PROJECT_RC}" -ne 0 || "${HOOK_RC}" -ne 0 ]]; then
    echo "⚠ codex tellonce cleanup completed with errors" >&2
    [[ "${PROJECT_RC}" -ne 0 ]] && exit "${PROJECT_RC}"
    exit "${HOOK_RC}"
fi
echo "✓ codex tellonce uninstall complete"
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall