it0/packages/services
hailin 96e336dd18 feat(openclaw): OpenClaw skill injection pipeline — iAgent → bridge → SKILL.md
## Changes

### openclaw-bridge: POST /skill-inject
- New endpoint writes SKILL.md to ~/.openclaw/skills/{name}/ inside the container volume
- OpenClaw gateway file watcher picks it up within 250ms (no restart needed)
- Optionally calls sessions.delete RPC after write so the next user message starts
  a fresh session that loads the new skill directory immediately (zero-downtime)
- Path traversal guard on skill name (rejects names with / .. \)
- OPENCLAW_HOME env var configurable (default: /home/node/.openclaw)

### agent-service: POST /api/v1/agent/instances/:id/skills
- New endpoint in AgentInstanceController proxies skill injection requests to the
  instance's bridge (http://{serverHost}:{hostPort}/skill-inject)
- Guards: instance must be 'running', serverHost/hostPort must be set, content ≤ 100KB
- iAgent calls this internally (localhost:3002) via Python urllib — no Kong auth needed
- sessionKey format for DingTalk users: "agent:main:dt-{dingTalkUserId}"

### agent-service: remove dead SkillManagerService
- Deleted skill-manager.service.ts (file-system .md loader, never called by anything)
- Removed from agent.module.ts provider list
- The live skill path is ClaudeAgentSdkEngine.loadTenantSkills() which reads directly
  from the DB (it0_t_{tenantId}.skills) at task-execution time

### agent-service: clean up SystemPromptBuilder
- Removed unused skills?: string[] from SystemPromptContext (was never populated)
- Added clarifying comment: SDK engine handles skill injection, not this builder

## DB
- Inserted iAgent meta-skill "为小龙虾安装技能" into it0_t_default.skills
  (id: 79ac23ed-78c2-4d5f-8652-a99cf5185b61)
- Content instructs iAgent to: query user instances → generate SKILL.md → call
  POST /api/v1/agent/instances/:id/skills via Python urllib heredoc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 02:16:47 -07:00
..
agent-service feat(openclaw): OpenClaw skill injection pipeline — iAgent → bridge → SKILL.md 2026-03-09 02:16:47 -07:00
audit-service fix(auth): allow platform_admin to access all web-admin endpoints 2026-03-07 05:54:05 -08:00
auth-service fix(auth-service): add prisma/.gitkeep for Dockerfile.service COPY step 2026-03-08 00:20:28 -08:00
billing-service fix: store tenant slug (not UUID) in current_tenant; remove plan trial periods 2026-03-07 09:01:21 -08:00
comm-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
inventory-service feat(openclaw): Phase 1 — server pool + agent instance deployment infrastructure 2026-03-07 11:11:21 -08:00
monitor-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
notification-service fix(notification-service): add empty prisma dir to satisfy Dockerfile.service COPY step 2026-03-07 22:54:33 -08:00
ops-service fix(ops-service): add new TenantInfo quota fields to inline TenantContextService.run calls 2026-03-04 00:04:36 -08:00
presence-service fix(presence-service): use linux-musl-openssl-3.0.x Prisma binary target for Alpine 2026-03-07 18:19:13 -08:00
referral-service feat(referral): add user-level personal circle + points system 2026-03-08 00:18:17 -08:00
version-service feat(auth): add platform_super_admin role for two-level platform access control 2026-03-07 01:17:27 -08:00
voice-agent feat(dingtalk): 小龙虾招募全语音/文字引导流程 + OAuth 一键授权卡片 2026-03-08 11:22:06 -07:00
voice-service feat: add engine type selection (Agent SDK / Claude API) for voice calls 2026-03-02 02:11:51 -08:00