# mm Pendant挂件脚本编码

编写mm_os框架Pendant挂件的pendant.js脚本。触发关键词：挂件脚本、pendant.js。

## 执行步骤

### 步骤1：读取相关常识知识
使用 `read_knowledge knowledge_name='mm_os_framework'`

### 步骤2：读取工作提示词
使用 `read_work work_name='script_mm_pendant'`

### 步骤3：编写主函数
使用 `write_text` 编写pendant.js的main函数。

### 步骤4：处理数据
对获取的数据进行处理和格式化。

### 步骤5：渲染模板
调用模板渲染函数，将数据传递给pendant.html。

## 输出成果
1. pendant.js脚本

## 失败处理
- 若数据获取异常，返回空数据并记录日志
- 若渲染超时，增加缓存机制

## 禁止行为
- ❌ 禁止在脚本中硬编码敏感数据
- ❌ 禁止忽略数据为空的处理