# Company-X t ܤ\ l D

## 1|: 2025-09-07
## 1: Claude & happybell80
## : Company-X t  ܤ\ l  0]

## 1. l D m

### 1.1 Slack Interactive ܤ\
- **news_posting_skill.py**: Company-X t D  0 l
  - Block Kit T  ( h)
  - "Ht " / "t0" 
  - skill-publish  T
  - JSON 0    (`/app/data/news_posting_state.json`)

### 1.2 Interactive Endpoint
- **main.py**: `/api/slack/interactive` x  
- **slack_handler.py**: `handle_interactive()` h l
  - Slack  
  -  aX  (publish_news_, skip_news_)
  - 3  ACK Q

### 1.3 X $
- **D ID  **: X ) D
  ```bash
  COMPANY_X_NEWS_CHANNEL_ID=C09CP4MDX71  # \Y  L D
  # COMPANY_X_NEWS_CHANNEL_ID=C09C98KK2TT  #  
  ```
- **/home/heejae/rb8001/.env**: X  
- **/home/admin/ivada_project/rb8001/.env**: | $ 0T

### 1.4  t ) ܤ\
- **sent_news_tracker.py**:  t 
  - 30|   
  - JSON | 0  
  -   D0
- **Dockerfile **: sent_news_tracker.py h
  ```dockerfile
  COPY ./sent_news_tracker.py /code/
  ```

## 2. t\ 8

### 2.1 sent_news_tracker  
- **8**: `No module named 'sent_news_tracker'`
- **x**: Docker t | h
- **t**: 
  1. Dockerfile COPY 9  
  2. import \ 
  3. docker compose down && up --build

### 2.2 D ID XT) t
- **8**: D ID  T XT)(
- **0 $**: DB Lt (channel_configs) )
- **\ **: X )
  - t : lt \Y 1, $ȴ )
  - : \ $, `x X

### 2.3 DM $X T
- ****: Slack DM "$X" T \
- **x**: skill-email 500 , t D (
- ****: x  x T

## 3. ܤ\ DM

```
APScheduler (09:00 |)
    
news_posting_skill.py
    
skill-news:8505 (t )
    
Slack D  (Block Kit)
    
  t
    
/api/slack/interactive
    
handle_interactive()
    
skill-publish:8511 (Ht )
```

## 4. L )

### 4.1  L
```bash
# Company-X t  
curl -X POST http://localhost:8001/api/test/companyx-news

# Daily Summary DM L
curl -X POST http://localhost:8001/api/cron/daily-summary

# \ Ux
docker logs rb8001 | grep -E "Company-X|news_posting"
```

### 4.2 D ID Ux
```python
# get_channels.py l 1h
python3 /home/heejae/rb8001/get_channels.py
```

## 5. X $ }

### 5.1 D X
```bash
# Slack 0
SLACK_BOT_TOKEN=xoxb-...
SLACK_SIGNING_SECRET=...

# Company-X t
COMPANY_X_NEWS_CHANNEL_ID=C09CP4MDX71
COMPANY_X_NEWS_KEYWORDS=|Ѥ,| Ѥ
COMPANY_X_NEWS_SCHEDULE=0 10 * * 1-5
COMPANY_X_NEWS_ENABLED=true

#  D
SKILL_NEWS_URL=http://localhost:8505
SKILL_PUBLISH_URL=http://localhost:8511
```

### 5.2 Slack App $ D
- Interactivity & Shortcuts \1T
- Request URL: `https://ro-being.com/rb8001/api/slack/interactive`
- OAuth Scopes: chat:write, chat:write.public

## 6. Xm

1. **Docker ܑ**: `docker compose down && up`  (restart  )
2. **X **: P  P 
   - /home/heejae/rb8001/.env
   - /home/admin/ivada_project/rb8001/.env
3. ** X**: COMPANY_X_NEWS_CHANNEL_ID 

## 7.    m

- [ ] Slack App Interactive URL  $
- [ ] skill-email 500  t
- [ ]  D X L
- [ ]  D  T pt 0

## 8. |  

###  |
- `/home/heejae/rb8001/app/skills/news_posting_skill.py`
- `/home/heejae/rb8001/sent_news_tracker.py`

###  |
- `/home/heejae/rb8001/main.py`: Interactive x  
- `/home/heejae/rb8001/app/router/slack_handler.py`: handle_interactive()  
- `/home/heejae/rb8001/Dockerfile`: sent_news_tracker.py   
- `/home/heejae/rb8001/app/skills/dm_skill.py`:  t D0 
- `.env` |: X  

## 9.  ( 8
- [250906_news_system_integration.md](./250906_news_system_integration.md) - 0 $
- [250905_news_deduplication.md](./250905_news_deduplication.md) -  p ܤ\