이벤트 알리기
워크플로가 알리는 이벤트를 emit 필드에 나열하고, 그 이벤트를 알리는 활동을 __emit__에 연결하세요. 그 활동은 끝날 때 emit_event 도구를 호출하라는 안내를 받습니다.
"weekly-report": {
"trigger": { "type": "schedule", "cron": "0 16 * * 5" },
"activities": [ { "id": "write", "intent": "Write the weekly revenue report." } ],
"connections": [
{ "from": "__trigger__", "to": "write" },
{ "from": "write", "to": "__emit__" }
],
"emit": ["report.ready"]
} 어떤 활동이든 이벤트를 직접 알릴 수도 있습니다. emit_event는 모든 워크플로 단계에서 사용할 수 있습니다.
emit_event(source: "report.ready", payload: { "period": "2026-W39", "total": 18250 }) Nebo는 페이로드에 producer 필드를 추가하고, 이벤트의 출처를 이벤트를 보낸 세션으로 설정합니다.
이벤트 이름이 만들어지는 방식
report.ready처럼 짧은 이름을 쓰세요. Nebo가 이벤트를 만든 직원의 slug를 앞에 붙이므로, 경리 담당 직원이 보낸 이벤트는 bookkeeper.report.ready가 됩니다. 이미 slug가 들어 있는 이름은 그대로 두며, 회사 이벤트는 접두사 없는 이름을 유지합니다.
이벤트에 반응하기
"review-report": {
"trigger": { "type": "event", "sources": ["bookkeeper.report.ready"] },
"activities": [ { "id": "review", "intent": "Review the report in _event_payload and flag anything unusual." } ]
} 소스는 정확히 일치하거나, bookkeeper.*처럼 끝에 .*를 붙여 일치시킵니다. 실행은 _event_source, _event_payload, _event_origin을 받습니다. 8KB 이상의 페이로드는 스칼라 필드만 남도록 줄어들며, 이메일 헤더와 첨부 파일 참조는 유지됩니다.
기본 제공 이벤트
| 이벤트 | 발생 시점 |
|---|---|
assignment.done, assignment.blocked, assignment.failed | 할당된 작업이 완료되거나, 멈추거나, 실패합니다. |
facts_changed, layers_changed | 회사 정보나 회사 계층이 변경됩니다. |
pack_installed, pack_updated, pack_removed | 회사 계층 팩이 변경됩니다. |
agent.installed, agent.updated, agent.uninstalling | 직원이 고용, 업데이트 또는 제거됩니다. |
account.connected, account.disconnected | 계정이 연결되거나 연결 해제됩니다. |
neboai.<topic>, neboai.channel, neboai.agent_space.<slug> | NeboAI에서 온 메시지입니다. |
플러그인 이벤트
event가 있는 감시 트리거는 플러그인 감시자의 각 줄을 notes-sync.note.created처럼 <plugin>.<event>로 내보내므로, 다른 워크플로가 이벤트 트리거로 구독할 수 있습니다. 플러그인은 plugin.json에 이벤트를 선언합니다. plugin.json 참조를 확인하세요.