abe70604e1
* feat(ids): mint UUIDv7 workspace and session ids, drop reserved defaults - delete DEFAULT_WORKSPACE_ID / DEFAULT_SESSION_ID / DEFAULT_AGENT_ID in both languages - new id helpers: python mirage/utils/ids.py (uuid6 package), TS core/src/utils/ids.ts (uuid package v7); exported from mirage top level and core index - Workspace ctor mints ids when not passed; explicit ids remain free-form and are the attach surface - attaching without a session id adopts the discovery record's default_session_id (SessionManager.adopt_default re-keys before hydration) - snapshot restore adopts the snapshot's default session identity and repoints the discovery record - agent_id is truly optional: namespace user is None when unclaimed, whoami fails GNU-style (cannot find name for user ID, exit 1), observer and jobs record empty attribution - server: new_workspace_id moved to core utils, REST id resolution unchanged - version: mirage/version.py reads the installed distribution (pyproject is the single source); hardcoded 0.0.3 and the unknown fallback removed - integ: state_store asserts uuid7 pointer + cross-language adoption; history.py pins an explicit default session * integ: session_modes pins an explicit default session id
20 lines
966 B
Python
20 lines
966 B
Python
# ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
# ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
|
import importlib.metadata
|
|
|
|
# Single source of truth: the installed distribution's metadata, i.e.
|
|
# pyproject's version (mirrors TS version.ts reading package.json).
|
|
# A missing distribution raises PackageNotFoundError loudly.
|
|
__version__ = importlib.metadata.version("mirage-ai")
|