INNER CODE UNIT · Python

enforce_completion

concierge-hq/concierge · __init__.py:195

    def enforce_completion(self, value: bool):
        self._enforce_completion = value

    def _is_terminal_stage(self, stage: str) -> bool:
        """A stage is terminal if it has no outgoing transitions."""
        return not self._transitions.get(stage, [])

    def _get_session_stage(self, session_id: Optional[str]) -> str:
        """Get current stage for a session. Returns default stage for new/unknown sessions."""
        if session_id:
            stage = self._state.get_session_stage(session_id)
            if stage:
                return stage
        return self._default_stage or list(self._stages.keys())[0]

    def _set_session_stage(self, session_id: Optional[str], stage: str) -> None:
        """Set current stage for a session."""
        if session_id:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…