sophhub 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/compact-context/skill.json +20 -0
- package/skills/compact-context/src/SKILL.md +133 -0
- package/skills/compact-context/src/scripts/check.sh +381 -0
- package/skills/compact-context/src/scripts/set-keep-recent.mjs +1337 -0
- package/skills/compact-context/src/scripts/setup.sh +96 -0
- package/skills/feishu-notes-assistant-universal/skill.json +20 -0
- package/skills/feishu-notes-assistant-universal/src/README.md +55 -0
- package/skills/feishu-notes-assistant-universal/src/SKILL.md +159 -0
- package/skills/feishu-notes-assistant-universal/src/bin/linux-amd64/lark-cli-openclaw +0 -0
- package/skills/feishu-notes-assistant-universal/src/bin/linux-arm64/lark-cli-openclaw +0 -0
- package/skills/feishu-notes-assistant-universal/src/scripts/_resolve_lark_cli.py +58 -0
- package/skills/feishu-notes-assistant-universal/src/scripts/openclaw_meeting_minutes.py +462 -0
- package/skills/feishu-notes-assistant-universal/src/scripts/openclaw_notes_crud.py +547 -0
- package/skills/feishu-notes-assistant-universal/src/scripts/openclaw_notes_crud_test.py +181 -0
- package/skills/feishu-notes-assistant-universal/src/scripts/run_meeting_minutes.py +80 -0
- package/skills/feishu-notes-assistant-universal/src/scripts/run_meeting_minutes.sh +5 -0
- package/skills/feishu-notes-assistant-universal/src/scripts/run_note_crud.py +32 -0
- package/skills/feishu-notes-assistant-universal/src/scripts/run_note_crud.sh +5 -0
- package/skills/flight-booking/skill.json +9 -2
- package/skills/flight-booking/src/scripts/flight_booking.py +2 -1
- package/skills/image-classify/skill.json +5 -5
- package/skills/image-classify/src/SKILL.md +60 -67
- package/skills/image-classify/src/scripts/face_search.py +400 -15
- package/skills/image-classify/src/scripts/send_dm_message.py +332 -0
- package/skills/md2pdf-converter/skill.json +20 -0
- package/skills/md2pdf-converter/src/SKILL.md +244 -0
- package/skills/md2pdf-converter/src/_meta.json +6 -0
- package/skills/md2pdf-converter/src/scripts/generate_emoji_mapping.py +74 -0
- package/skills/md2pdf-converter/src/scripts/md2pdf-local.sh +291 -0
- package/skills/sophnet-bot-client/skill.json +20 -0
- package/skills/sophnet-bot-client/src/SKILL.md +255 -0
- package/skills/sophnet-bot-client/src/pyproject.toml +13 -0
- package/skills/sophnet-bot-client/src/scripts/__init__.py +0 -0
- package/skills/sophnet-bot-client/src/scripts/bot_client_proxy.py +165 -0
- package/skills/sophnet-bot-client/src/scripts/bot_client_safe.sh +29 -0
- package/skills/sophnet-bot-client/src/scripts/bot_client_setup.py +502 -0
- package/skills/sophnet-bot-client/src/tests/__init__.py +0 -0
- package/skills/sophnet-bot-client/src/tests/test_bot_client_proxy.py +255 -0
- package/skills/sophnet-bot-client/src/tests/test_bot_client_setup.py +679 -0
- package/skills/sophnet-bot-client/src/uv.lock +8 -0
- package/skills/sophnet-docx/skill.json +20 -0
- package/skills/sophnet-docx/src/SKILL.md +463 -0
- package/skills/sophnet-docx/src/package-lock.json +208 -0
- package/skills/sophnet-docx/src/package.json +16 -0
- package/skills/sophnet-docx/src/pyproject.toml +11 -0
- package/skills/sophnet-docx/src/scripts/__init__.py +1 -0
- package/skills/sophnet-docx/src/scripts/accept_changes.py +135 -0
- package/skills/sophnet-docx/src/scripts/comment.py +318 -0
- package/skills/sophnet-docx/src/scripts/ensure_uv_env.sh +68 -0
- package/skills/sophnet-docx/src/scripts/office/helpers/__init__.py +0 -0
- package/skills/sophnet-docx/src/scripts/office/helpers/merge_runs.py +199 -0
- package/skills/sophnet-docx/src/scripts/office/helpers/simplify_redlines.py +197 -0
- package/skills/sophnet-docx/src/scripts/office/pack.py +159 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/mce/mc.xsd +75 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/sophnet-docx/src/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/sophnet-docx/src/scripts/office/soffice.py +183 -0
- package/skills/sophnet-docx/src/scripts/office/unpack.py +132 -0
- package/skills/sophnet-docx/src/scripts/office/validate.py +111 -0
- package/skills/sophnet-docx/src/scripts/office/validators/__init__.py +15 -0
- package/skills/sophnet-docx/src/scripts/office/validators/base.py +847 -0
- package/skills/sophnet-docx/src/scripts/office/validators/docx.py +446 -0
- package/skills/sophnet-docx/src/scripts/office/validators/pptx.py +275 -0
- package/skills/sophnet-docx/src/scripts/office/validators/redlining.py +247 -0
- package/skills/sophnet-docx/src/scripts/templates/comments.xml +3 -0
- package/skills/sophnet-docx/src/scripts/templates/commentsExtended.xml +3 -0
- package/skills/sophnet-docx/src/scripts/templates/commentsExtensible.xml +3 -0
- package/skills/sophnet-docx/src/scripts/templates/commentsIds.xml +3 -0
- package/skills/sophnet-docx/src/scripts/templates/people.xml +3 -0
- package/skills/sophnet-docx/src/scripts/upload_file.sh +96 -0
- package/skills/sophnet-docx/src/uv.lock +320 -0
- package/skills/sophnet-pdf/skill.json +20 -0
- package/skills/sophnet-pdf/src/SKILL.md +413 -0
- package/skills/sophnet-pdf/src/forms.md +297 -0
- package/skills/sophnet-pdf/src/pyproject.toml +14 -0
- package/skills/sophnet-pdf/src/reference.md +612 -0
- package/skills/sophnet-pdf/src/scripts/check_bounding_boxes.py +65 -0
- package/skills/sophnet-pdf/src/scripts/check_fillable_fields.py +11 -0
- package/skills/sophnet-pdf/src/scripts/convert_pdf_to_images.py +33 -0
- package/skills/sophnet-pdf/src/scripts/create_validation_image.py +37 -0
- package/skills/sophnet-pdf/src/scripts/enhance_tutorial.py +558 -0
- package/skills/sophnet-pdf/src/scripts/ensure_uv_env.sh +68 -0
- package/skills/sophnet-pdf/src/scripts/extract_form_field_info.py +122 -0
- package/skills/sophnet-pdf/src/scripts/extract_form_structure.py +115 -0
- package/skills/sophnet-pdf/src/scripts/extract_pdf_content.py +35 -0
- package/skills/sophnet-pdf/src/scripts/fill_fillable_fields.py +98 -0
- package/skills/sophnet-pdf/src/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/skills/sophnet-pdf/src/scripts/upload_file.sh +88 -0
- package/skills/sophnet-pdf/src/uv.lock +537 -0
- package/skills/sophnet-xlsx/skill.json +20 -0
- package/skills/sophnet-xlsx/src/SKILL.md +399 -0
- package/skills/sophnet-xlsx/src/pyproject.toml +11 -0
- package/skills/sophnet-xlsx/src/scripts/ensure_uv_env.sh +68 -0
- package/skills/sophnet-xlsx/src/scripts/office/helpers/__init__.py +0 -0
- package/skills/sophnet-xlsx/src/scripts/office/helpers/merge_runs.py +199 -0
- package/skills/sophnet-xlsx/src/scripts/office/helpers/simplify_redlines.py +197 -0
- package/skills/sophnet-xlsx/src/scripts/office/pack.py +159 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/mce/mc.xsd +75 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/sophnet-xlsx/src/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/sophnet-xlsx/src/scripts/office/soffice.py +183 -0
- package/skills/sophnet-xlsx/src/scripts/office/unpack.py +132 -0
- package/skills/sophnet-xlsx/src/scripts/office/validate.py +111 -0
- package/skills/sophnet-xlsx/src/scripts/office/validators/__init__.py +15 -0
- package/skills/sophnet-xlsx/src/scripts/office/validators/base.py +847 -0
- package/skills/sophnet-xlsx/src/scripts/office/validators/docx.py +446 -0
- package/skills/sophnet-xlsx/src/scripts/office/validators/pptx.py +275 -0
- package/skills/sophnet-xlsx/src/scripts/office/validators/redlining.py +247 -0
- package/skills/sophnet-xlsx/src/scripts/recalc.py +184 -0
- package/skills/sophnet-xlsx/src/scripts/upload_file.sh +96 -0
- package/skills/sophnet-xlsx/src/uv.lock +319 -0
- package/skills/wechat-article-publisher/skill.json +20 -0
- package/skills/wechat-article-publisher/src/SKILL.md +60 -0
- package/skills/wechat-article-publisher/src/config.json +7 -0
- package/skills/wechat-article-publisher/src/pyproject.toml +12 -0
- package/skills/wechat-article-publisher/src/scripts/publish_wechat.py +825 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Set up post-compaction context refresh rules in personal ~/.agents/AGENTS.md
|
|
3
|
+
# Usage: bash setup.sh
|
|
4
|
+
# Safe to run multiple times.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
|
|
8
|
+
PERSONAL_AGENTS="$HOME/.agents/AGENTS.md"
|
|
9
|
+
|
|
10
|
+
GREEN='\033[0;32m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
CYAN='\033[0;36m'
|
|
13
|
+
BOLD='\033[1m'
|
|
14
|
+
RESET='\033[0m'
|
|
15
|
+
|
|
16
|
+
echo ""
|
|
17
|
+
echo -e "${BOLD}━━━ Compact Context Setup ━━━${RESET}"
|
|
18
|
+
echo ""
|
|
19
|
+
|
|
20
|
+
mkdir -p "$HOME/.agents"
|
|
21
|
+
[ -f "$PERSONAL_AGENTS" ] || : > "$PERSONAL_AGENTS"
|
|
22
|
+
|
|
23
|
+
PYTHON_OUTPUT="$(python3 - "$PERSONAL_AGENTS" <<'PY'
|
|
24
|
+
import pathlib
|
|
25
|
+
import re
|
|
26
|
+
import sys
|
|
27
|
+
|
|
28
|
+
path = pathlib.Path(sys.argv[1])
|
|
29
|
+
text = path.read_text(encoding="utf-8") if path.exists() else ""
|
|
30
|
+
|
|
31
|
+
startup_block = """## Session Startup
|
|
32
|
+
|
|
33
|
+
Context may have been compacted. When you see `[Post-compaction context refresh]` in your context:
|
|
34
|
+
1. Re-read any task files mentioned in the conversation before responding.
|
|
35
|
+
2. Treat missing earlier conversation details as incomplete context, not as proof they never happened.
|
|
36
|
+
3. If you need to mention compaction to the user, describe it naturally; do not force a fixed reply prefix.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
red_lines_block = """## Red Lines
|
|
40
|
+
|
|
41
|
+
- After compaction, re-read task context files before proceeding.
|
|
42
|
+
- Never assume conversation history is complete after a `[Post-compaction context refresh]`.
|
|
43
|
+
- Do not force a fixed reply prefix after compaction.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
legacy = "(已压缩,从摘要恢复)" in text or "Start your reply with:" in text
|
|
47
|
+
|
|
48
|
+
def upsert_section(source: str, title: str, block: str) -> tuple[str, bool]:
|
|
49
|
+
pattern = rf"(?ms)^## {re.escape(title)}\n.*?(?=^## |\Z)"
|
|
50
|
+
if re.search(pattern, source):
|
|
51
|
+
return re.sub(pattern, block + "\n", source), True
|
|
52
|
+
source = source.rstrip()
|
|
53
|
+
if source:
|
|
54
|
+
source += "\n\n"
|
|
55
|
+
source += block + "\n"
|
|
56
|
+
return source, False
|
|
57
|
+
|
|
58
|
+
updated, startup_exists = upsert_section(text, "Session Startup", startup_block)
|
|
59
|
+
updated, red_lines_exists = upsert_section(updated, "Red Lines", red_lines_block)
|
|
60
|
+
updated = updated.rstrip() + "\n"
|
|
61
|
+
path.write_text(updated, encoding="utf-8")
|
|
62
|
+
|
|
63
|
+
print(f"startup_exists={'1' if startup_exists else '0'}")
|
|
64
|
+
print(f"red_lines_exists={'1' if red_lines_exists else '0'}")
|
|
65
|
+
print(f"legacy={'1' if legacy else '0'}")
|
|
66
|
+
PY
|
|
67
|
+
)"
|
|
68
|
+
|
|
69
|
+
STARTUP_EXISTS="$(printf '%s\n' "$PYTHON_OUTPUT" | awk -F= '/^startup_exists=/{print $2}')"
|
|
70
|
+
RED_LINES_EXISTS="$(printf '%s\n' "$PYTHON_OUTPUT" | awk -F= '/^red_lines_exists=/{print $2}')"
|
|
71
|
+
LEGACY_FOUND="$(printf '%s\n' "$PYTHON_OUTPUT" | awk -F= '/^legacy=/{print $2}')"
|
|
72
|
+
|
|
73
|
+
if [ "$STARTUP_EXISTS" = "1" ]; then
|
|
74
|
+
echo -e "${GREEN}✔ ## Session Startup updated${RESET} in $PERSONAL_AGENTS"
|
|
75
|
+
else
|
|
76
|
+
echo -e "${GREEN}✔ ## Session Startup added${RESET} to $PERSONAL_AGENTS"
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
if [ "$RED_LINES_EXISTS" = "1" ]; then
|
|
80
|
+
echo -e "${GREEN}✔ ## Red Lines updated${RESET} in $PERSONAL_AGENTS"
|
|
81
|
+
else
|
|
82
|
+
echo -e "${GREEN}✔ ## Red Lines added${RESET} to $PERSONAL_AGENTS"
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
if [ "$LEGACY_FOUND" = "1" ]; then
|
|
86
|
+
echo -e "${YELLOW}○ Legacy fixed-prefix rules were replaced with safer recovery guidance.${RESET}"
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
echo ""
|
|
90
|
+
echo -e "${BOLD}Done.${RESET} Verify with: ${CYAN}bash check.sh${RESET}"
|
|
91
|
+
echo ""
|
|
92
|
+
echo -e "What happens next:"
|
|
93
|
+
echo -e " • Every auto-compact can still re-inject your recovery rules"
|
|
94
|
+
echo -e " • Agent will re-read task files after a context refresh"
|
|
95
|
+
echo -e " • Replies are no longer forced to start with a fixed compaction prefix"
|
|
96
|
+
echo ""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "feishu-notes-assistant-universal",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"types": [
|
|
5
|
+
"store"
|
|
6
|
+
],
|
|
7
|
+
"displayName": "飞书表格助手",
|
|
8
|
+
"description": "用于飞书在线文档的创建、读取、更新、删除与搜索,并支持在提供会议纪要链接或 token 时生成纪要文档。",
|
|
9
|
+
"changelog": [
|
|
10
|
+
{
|
|
11
|
+
"version": "1.0.0",
|
|
12
|
+
"date": "2026-04-13",
|
|
13
|
+
"changes": [
|
|
14
|
+
"初次提交"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"createdAt": "2026-04-13",
|
|
19
|
+
"updatedAt": "2026-04-13"
|
|
20
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# feishu-notes-assistant
|
|
2
|
+
|
|
3
|
+
Self-contained OpenClaw skill package for:
|
|
4
|
+
|
|
5
|
+
- Feishu online notes workspace operations:
|
|
6
|
+
- `create/read/update/delete/search`
|
|
7
|
+
- image/file insertion
|
|
8
|
+
- document comments
|
|
9
|
+
- section-level updates
|
|
10
|
+
- meeting minutes processing as a secondary sub-capability (`Minutes -> Note`)
|
|
11
|
+
|
|
12
|
+
## Package layout
|
|
13
|
+
|
|
14
|
+
- `SKILL.md`: OpenClaw skill definition
|
|
15
|
+
- `scripts/run_meeting_minutes.py`: cross-platform minutes entrypoint
|
|
16
|
+
- `scripts/run_note_crud.py`: cross-platform note CRUD entrypoint
|
|
17
|
+
- `scripts/run_meeting_minutes.sh`: compatibility wrapper (delegates to Python)
|
|
18
|
+
- `scripts/run_note_crud.sh`: compatibility wrapper (delegates to Python)
|
|
19
|
+
- `scripts/openclaw_meeting_minutes.py`: downstream orchestrator
|
|
20
|
+
- `scripts/openclaw_notes_crud.py`: note workspace orchestrator
|
|
21
|
+
- `bin/<os>-<arch>/lark-cli-openclaw[.exe]`: bundled platform binaries
|
|
22
|
+
|
|
23
|
+
## Runtime requirements
|
|
24
|
+
|
|
25
|
+
- `python3`
|
|
26
|
+
- user must complete `lark-cli-openclaw auth login`
|
|
27
|
+
- recommended scopes:
|
|
28
|
+
- `vc:note:read`
|
|
29
|
+
- `minutes:minutes:readonly`
|
|
30
|
+
- `minutes:minutes.artifacts:read`
|
|
31
|
+
- `minutes:minutes.transcript:export`
|
|
32
|
+
- `docx:document:create`
|
|
33
|
+
- `docx:document:readonly`
|
|
34
|
+
- `docx:document:write_only`
|
|
35
|
+
- `search:docs:read`
|
|
36
|
+
- `docs:document.media:upload`
|
|
37
|
+
- `docs:document.media:download`
|
|
38
|
+
- `docs:document.comment:create`
|
|
39
|
+
- `docs:document.comment:write_only`
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
- This package does not depend on the original repository checkout path.
|
|
44
|
+
- This package is cross-platform for:
|
|
45
|
+
- `darwin-amd64`
|
|
46
|
+
- `darwin-arm64`
|
|
47
|
+
- `linux-amd64`
|
|
48
|
+
- `linux-arm64`
|
|
49
|
+
- `windows-amd64`
|
|
50
|
+
- `windows-arm64`
|
|
51
|
+
- It starts from an existing Feishu Minutes URL or `minute_token`.
|
|
52
|
+
- It does not upload audio into Feishu Minutes.
|
|
53
|
+
- Delete note operation is implemented via Drive file delete API with doc token/docx URL input.
|
|
54
|
+
- The package is note-first: direct Feishu note operations are the primary workflow, while minutes import is secondary.
|
|
55
|
+
- Section-level updates are exposed as a first-class operation instead of requiring users to assemble raw `docs +update` flags manually.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feishu-notes-assistant
|
|
3
|
+
description: Feishu notes assistant for online note creation, reading, updating, deleting, and search, with meeting-minutes import as a secondary capability.
|
|
4
|
+
metadata: {"openclaw":{"requires":{"bins":["python3"]}}}
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Feishu Notes Assistant
|
|
8
|
+
|
|
9
|
+
This skill focuses on Feishu online note workflows first. Feishu Minutes import is a secondary sub-capability that should only be used when the user explicitly provides a Minutes link or `minute_token`.
|
|
10
|
+
|
|
11
|
+
This skill provides two capability groups:
|
|
12
|
+
|
|
13
|
+
- `Notes Workspace`: create/read/update/delete/search Feishu notes, insert images/files, add comments, and perform section-level updates.
|
|
14
|
+
- `Minutes -> Note` (secondary): read a Feishu Minutes link/token, generate meeting notes, create a Feishu doc, return the doc URL.
|
|
15
|
+
|
|
16
|
+
Use bundled scripts only:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
python3 {baseDir}/scripts/run_meeting_minutes.py "<minutes_url_or_token>"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
python3 {baseDir}/scripts/run_note_crud.py --op <create|read|update|delete|search> ...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
python3 {baseDir}/scripts/run_note_crud.py --op <media-insert|media-download|comment|section-update> ...
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Package assumptions:
|
|
31
|
+
|
|
32
|
+
- This package is self-contained for `darwin/linux/windows` on `amd64/arm64`.
|
|
33
|
+
- It bundles multi-platform `lark-cli-openclaw` binaries under `{baseDir}/bin/<os>-<arch>/`.
|
|
34
|
+
- It does not depend on the original `feishu-cli` repository checkout path.
|
|
35
|
+
|
|
36
|
+
## A. Notes Workspace
|
|
37
|
+
|
|
38
|
+
Use this branch when user intent is direct note management, such as:
|
|
39
|
+
|
|
40
|
+
- `新建笔记` / `创建飞书笔记`
|
|
41
|
+
- `查看笔记内容` / `读取某篇笔记`
|
|
42
|
+
- `更新笔记` / `追加内容` / `覆盖内容`
|
|
43
|
+
- `删除笔记`
|
|
44
|
+
- `按关键词查找笔记`
|
|
45
|
+
- `往笔记里插入图片` / `上传附件到笔记`
|
|
46
|
+
- `给笔记加评论`
|
|
47
|
+
- `按章节替换、删除、前插、后插`
|
|
48
|
+
|
|
49
|
+
Routing rules:
|
|
50
|
+
|
|
51
|
+
- Prefer this skill over generic web tools when user explicitly asks to operate Feishu notes/docs.
|
|
52
|
+
- Prefer notes CRUD over minutes flow unless the user explicitly gives a Feishu Minutes link/token.
|
|
53
|
+
- Prefer note workflows over generic “文档助手” interpretations; this skill is for actual Feishu note manipulation, not generic summarization.
|
|
54
|
+
- Use `run_note_crud.py` first; do not ask the user to manually call `lark-cli`.
|
|
55
|
+
- For delete, prefer doc token or `/docx/<token>` URL.
|
|
56
|
+
- For note comments, prefer this skill over chat-style review summaries when the user explicitly asks to comment on a note.
|
|
57
|
+
- For media insertion, prefer this skill over uploading files elsewhere and pasting links.
|
|
58
|
+
|
|
59
|
+
Command templates:
|
|
60
|
+
|
|
61
|
+
- Create:
|
|
62
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op create --title "<title>" --markdown "<markdown>"`
|
|
63
|
+
- Read:
|
|
64
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op read --doc "<doc_token_or_url>"`
|
|
65
|
+
- Update (append/overwrite/replace):
|
|
66
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op update --doc "<doc_token_or_url>" --mode append --markdown "<markdown>"`
|
|
67
|
+
- Delete:
|
|
68
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op delete --doc "<doc_token_or_url>"`
|
|
69
|
+
- Search:
|
|
70
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op search --query "<keyword>"`
|
|
71
|
+
- Insert image/file:
|
|
72
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op media-insert --doc "<doc_token_or_url>" --file "<local_path>" --media-type image`
|
|
73
|
+
- Add comment:
|
|
74
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op comment --doc "<doc_token_or_url>" --comment "<text>"`
|
|
75
|
+
- Replace one section:
|
|
76
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op section-update --doc "<doc_token_or_url>" --section-title "## 章节名" --section-mode replace --markdown "<new_markdown>"`
|
|
77
|
+
- Delete one section:
|
|
78
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op section-update --doc "<doc_token_or_url>" --section-title "## 废弃章节" --section-mode delete`
|
|
79
|
+
- Insert before/after one section:
|
|
80
|
+
`python3 {baseDir}/scripts/run_note_crud.py --op section-update --doc "<doc_token_or_url>" --section-title "## 目标章节" --section-mode insert_after --markdown "<markdown>"`
|
|
81
|
+
|
|
82
|
+
Result handling:
|
|
83
|
+
|
|
84
|
+
- If output has `"ok": true`, summarize key fields and return document link/token when present.
|
|
85
|
+
- If output has `"ok": false`, return `error.message` and keep it concise.
|
|
86
|
+
- For section-update, mention which section was changed and whether it was replaced, deleted, inserted before, or inserted after.
|
|
87
|
+
- For media-insert, return inserted `file_token` when useful.
|
|
88
|
+
- For comment, briefly confirm whether it was a full-document or local comment.
|
|
89
|
+
|
|
90
|
+
Examples:
|
|
91
|
+
|
|
92
|
+
- User: `帮我新建一篇飞书笔记,标题是周报,内容是本周完成了接口联调`
|
|
93
|
+
Action: use `python3 {baseDir}/scripts/run_note_crud.py --op create ...`
|
|
94
|
+
|
|
95
|
+
- User: `帮我搜索标题里有 OKR 的飞书笔记`
|
|
96
|
+
Action: use `python3 {baseDir}/scripts/run_note_crud.py --op search --query "OKR"`
|
|
97
|
+
|
|
98
|
+
- User: `把这篇笔记末尾追加一段总结`
|
|
99
|
+
Action: use `python3 {baseDir}/scripts/run_note_crud.py --op update --mode append ...`
|
|
100
|
+
|
|
101
|
+
- User: `把这张图片插到这篇飞书笔记里`
|
|
102
|
+
Action: use `python3 {baseDir}/scripts/run_note_crud.py --op media-insert ...`
|
|
103
|
+
|
|
104
|
+
- User: `给这篇笔记中“风险提示”这一段加一句评论`
|
|
105
|
+
Action: use `python3 {baseDir}/scripts/run_note_crud.py --op comment --selection-with-ellipsis ...`
|
|
106
|
+
|
|
107
|
+
- User: `把“## 下周计划”这一章节替换成新的内容`
|
|
108
|
+
Action: use `python3 {baseDir}/scripts/run_note_crud.py --op section-update --section-title "## 下周计划" --section-mode replace ...`
|
|
109
|
+
|
|
110
|
+
## B. Minutes -> Note
|
|
111
|
+
|
|
112
|
+
This is a secondary sub-capability under the note assistant. Only use it when the input is explicitly a Feishu Minutes link or a raw `minute_token`. Do not route normal note-taking requests here.
|
|
113
|
+
|
|
114
|
+
Use this skill when the user provides:
|
|
115
|
+
|
|
116
|
+
- a Feishu Minutes link like `https://*.feishu.cn/minutes/<minute_token>`
|
|
117
|
+
- a Feishu Minutes link like `https://my.feishu.cn/minutes/<minute_token>`
|
|
118
|
+
- or a raw `minute_token`
|
|
119
|
+
|
|
120
|
+
and asks to:
|
|
121
|
+
|
|
122
|
+
- read the meeting transcript
|
|
123
|
+
- create a Feishu cloud document
|
|
124
|
+
- return the document link
|
|
125
|
+
|
|
126
|
+
For this skill, do not invent a new workflow. Always use the local wrapper script below:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
python3 {baseDir}/scripts/run_meeting_minutes.py "<minutes_url_or_token>"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Priority and routing rules:
|
|
133
|
+
|
|
134
|
+
- This skill takes precedence over generic URL-reading, webpage summarization, `web_fetch`, browser automation, or search workflows when the input clearly matches a Feishu Minutes URL.
|
|
135
|
+
- Treat `https://my.feishu.cn/minutes/...` and `https://*.feishu.cn/minutes/...` as high-confidence skill triggers.
|
|
136
|
+
- Treat the URL as an opaque Minutes locator, not as a webpage to scrape.
|
|
137
|
+
|
|
138
|
+
Rules:
|
|
139
|
+
|
|
140
|
+
- Prefer this skill proactively when the request is clearly about a Feishu Minutes link.
|
|
141
|
+
- Pass the original URL when available; the wrapper can extract `minute_token`.
|
|
142
|
+
- Do not call `web_fetch`, browser tools, search tools, or any webpage-reading flow before trying this skill.
|
|
143
|
+
- Do not explain that the page requires login or that redirects prevent access unless the wrapper itself fails and returns an error.
|
|
144
|
+
- Do not ask the user to manually export the transcript if the URL already matches a Feishu Minutes link.
|
|
145
|
+
- Extracting `minute_token` from the URL is sufficient; direct webpage access is not required for this skill.
|
|
146
|
+
- Always try the wrapper first for Feishu Minutes URLs, even if the link may redirect in a browser.
|
|
147
|
+
- If the wrapper returns JSON with `"status": "succeeded"`, reply with the Feishu document link from `feishu_doc_url`.
|
|
148
|
+
- If the wrapper returns `"status": "partial"`, explain that the transcript/markdown was generated but document creation failed.
|
|
149
|
+
- If the wrapper returns `"status": "failed"`, summarize `error_message` briefly.
|
|
150
|
+
- Do not ask the user to run terminal commands themselves.
|
|
151
|
+
- Do not upload audio files with this skill; it only handles existing Minutes links or tokens.
|
|
152
|
+
|
|
153
|
+
Examples:
|
|
154
|
+
|
|
155
|
+
- User: `读取这个飞书妙记并创建飞书云文档:https://my.feishu.cn/minutes/obc123?from=from_copylink`
|
|
156
|
+
Action: immediately run `python3 {baseDir}/scripts/run_meeting_minutes.py "https://my.feishu.cn/minutes/obc123?from=from_copylink"`
|
|
157
|
+
|
|
158
|
+
- User: `请把这个 minutes 链接整理成文档并返回链接`
|
|
159
|
+
Action: if the URL matches `feishu.cn/minutes/`, use the minutes flow and skip webpage fetching.
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Resolve bundled lark-cli binary path by platform."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import platform
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _norm_os() -> str:
|
|
11
|
+
system = platform.system().lower()
|
|
12
|
+
if system.startswith("darwin"):
|
|
13
|
+
return "darwin"
|
|
14
|
+
if system.startswith("linux"):
|
|
15
|
+
return "linux"
|
|
16
|
+
if system.startswith("windows"):
|
|
17
|
+
return "windows"
|
|
18
|
+
return system
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def _norm_arch() -> str:
|
|
22
|
+
machine = platform.machine().lower()
|
|
23
|
+
mapping = {
|
|
24
|
+
"x86_64": "amd64",
|
|
25
|
+
"amd64": "amd64",
|
|
26
|
+
"aarch64": "arm64",
|
|
27
|
+
"arm64": "arm64",
|
|
28
|
+
}
|
|
29
|
+
return mapping.get(machine, machine)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def resolve_bundled_cli(base_dir: Path) -> Path:
|
|
33
|
+
os_name = _norm_os()
|
|
34
|
+
arch = _norm_arch()
|
|
35
|
+
ext = ".exe" if os_name == "windows" else ""
|
|
36
|
+
|
|
37
|
+
# New multi-platform layout.
|
|
38
|
+
candidate = base_dir / "bin" / f"{os_name}-{arch}" / f"lark-cli-openclaw{ext}"
|
|
39
|
+
if candidate.exists():
|
|
40
|
+
return candidate
|
|
41
|
+
|
|
42
|
+
# Backward compatibility: old single-binary layout.
|
|
43
|
+
old = base_dir / "bin" / f"lark-cli-openclaw{ext}"
|
|
44
|
+
if old.exists():
|
|
45
|
+
return old
|
|
46
|
+
|
|
47
|
+
supported = [
|
|
48
|
+
"darwin-amd64",
|
|
49
|
+
"darwin-arm64",
|
|
50
|
+
"linux-amd64",
|
|
51
|
+
"linux-arm64",
|
|
52
|
+
"windows-amd64",
|
|
53
|
+
"windows-arm64",
|
|
54
|
+
]
|
|
55
|
+
raise FileNotFoundError(
|
|
56
|
+
f"missing bundled lark-cli-openclaw for {os_name}-{arch}; "
|
|
57
|
+
f"expected {candidate}. supported targets: {', '.join(supported)}"
|
|
58
|
+
)
|