Commit b970c5e
fix: Use ctx.getServices() for dynamic service access in protocol
The previous fix attempted to probe for services using a hardcoded list,
which missed services not in the list. The correct solution is simpler:
ctx.getServices() returns a fresh snapshot of ALL services each time it's
called (see kernel.ts:144-145), so we can just pass it as a callback.
This ensures the protocol has access to all services registered after
ObjectQLPlugin's init() phase, including metadata service (for agents/tools)
and AI service, which are registered by later plugins.
Root cause: Protocol was capturing ctx.getServices() result during init()
instead of calling it at runtime. Now fixed by passing the function itself.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>1 parent 64a9c3d commit b970c5e
1 file changed
Lines changed: 5 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
78 | 78 | | |
79 | | - | |
80 | 79 | | |
81 | 80 | | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 84 | + | |
105 | 85 | | |
106 | 86 | | |
107 | 87 | | |
| |||
0 commit comments