Role
This skill owns session runtime behavior, session isolation, Session Server integration, and SSE execution patterns under WLS. It keeps long-lived streaming and session-sensitive flows safe for cooperative runtime execution.
When To Use
- Use for Session Server issues, session isolation, login state, SSE controllers, EventSource flows, and long-running stream loops.
- Use for keywords such as session, login state, SessionFactory, SSE, EventSource,
text/event-stream, andSseWriter. - Use when runtime behavior depends on request isolation or cooperative long-lived streaming.
Source Material
AI-ENTRY.mdCLAUDE.mddev/ai/skills/session-development/SKILL.mddev/ai/skills/sse-streaming/SKILL.mddev/ai/skills/weline-framework-runtime/SKILL.mddev/ai/skills/runtime-and-process/SKILL.md
Responsibilities
- Keep session access inside framework session abstractions instead of raw global state.
- Preserve area-based session isolation and login separation.
- Implement SSE loops that cooperate with WLS workers instead of blocking them.
- Close streaming responses correctly and safely under WLS.
Workflow
- Confirm whether the issue is session isolation, session persistence, or SSE runtime behavior.
- Read the session and SSE source guidance before touching code.
- Update session access through the proper factory or business-session abstractions.
- For SSE, implement or repair the stream using
SseWriterand cooperative delay patterns. - Ensure the stream ends with explicit completion or close behavior.
- Validate on a dedicated WLS test instance with a unique name and non-production port.
- Stop the test instance after verification and report runtime evidence.
Weline Rules
- Do not use default WLS port
9501for AI testing. - Always start a dedicated WLS test instance on port
9502+. - Always use a unique AI test instance name.
- Always stop the AI test instance after testing.
- Do not pollute global state.
- Do not use
sleep,die, orexitin WLS runtime-sensitive code. - Do not access raw
$_SESSIONdirectly when framework session abstractions exist.
Inputs Required
- The affected login, session, or SSE flow.
- The owning controller, session class, or streaming endpoint.
- Runtime symptoms, including disconnect or blocking behavior if present.
- Dedicated WLS validation plan and route.
Expected Output
- A session-safe or SSE-safe runtime implementation.
- Evidence from the affected stream or session flow on a dedicated WLS instance.
- Confirmation that the validation instance was stopped after testing.
Validation
- Validate login or session isolation through the real area flow.
- Validate SSE output, heartbeat, and completion behavior on a dedicated WLS instance.
- Confirm cooperative delay patterns are used instead of blocking sleeps.
- Stop the dedicated WLS instance after validation.
Constraints
- Do not embed raw session handling outside framework abstractions.
- Do not treat SSE as a plain JSON endpoint.
- Do not leave streaming loops without explicit completion behavior.
- Do not use blocking delay functions in long-lived stream loops.