safe-colab-cli 0.13.2__tar.gz → 0.13.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/PKG-INFO +1 -1
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/pyproject.toml +1 -1
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/__init__.py +1 -1
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/artifacts.py +11 -1
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/service.py +13 -2
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli.egg-info/PKG-INFO +1 -1
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/README.md +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/__main__.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/auth.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/cli.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/dashboard.html +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/event_log.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/guardian.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/kernel.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli/sandbox.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli.egg-info/SOURCES.txt +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli.egg-info/dependency_links.txt +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli.egg-info/entry_points.txt +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli.egg-info/requires.txt +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli.egg-info/top_level.txt +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/setup.cfg +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/tests/test_auth.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/tests/test_e2e.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/tests/test_kernel.py +0 -0
- {safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/tests/test_sandbox.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "safe-colab-cli"
|
|
7
|
-
version = "0.13.
|
|
7
|
+
version = "0.13.4"
|
|
8
8
|
description = "CLI tool for safe collaboration - sandboxed Jupyter kernel with remote Hypha service access"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "All Rights Reserved"}
|
|
@@ -109,6 +109,12 @@ class SessionArtifactManager:
|
|
|
109
109
|
if remote_path is None:
|
|
110
110
|
remote_path = os.path.basename(local_path)
|
|
111
111
|
|
|
112
|
+
# Re-enter staging mode if already committed (allows multiple uploads)
|
|
113
|
+
try:
|
|
114
|
+
await self._am.edit(artifact_id=self.artifact_id, stage=True)
|
|
115
|
+
except Exception:
|
|
116
|
+
pass # May already be in staging
|
|
117
|
+
|
|
112
118
|
put_url = await self._am.put_file(self.artifact_id, file_path=remote_path)
|
|
113
119
|
|
|
114
120
|
async with httpx.AsyncClient() as client:
|
|
@@ -169,9 +175,13 @@ class SessionArtifactManager:
|
|
|
169
175
|
}
|
|
170
176
|
self._log_buffer.append(entry)
|
|
171
177
|
|
|
172
|
-
# Write log file
|
|
178
|
+
# Write log file
|
|
173
179
|
log_content = "\n".join(json.dumps(e) for e in self._log_buffer) + "\n"
|
|
174
180
|
try:
|
|
181
|
+
try:
|
|
182
|
+
await self._am.edit(artifact_id=self.artifact_id, stage=True)
|
|
183
|
+
except Exception:
|
|
184
|
+
pass
|
|
175
185
|
put_url = await self._am.put_file(self.artifact_id, file_path="audit_log.jsonl")
|
|
176
186
|
async with httpx.AsyncClient() as client:
|
|
177
187
|
await client.put(put_url, content=log_content.encode())
|
|
@@ -236,10 +236,10 @@ data. The artifact is publicly readable.
|
|
|
236
236
|
## Environment
|
|
237
237
|
|
|
238
238
|
- **Data directory** (read-only): `{data_dir}`
|
|
239
|
-
- **Working directory** (read-write): `{work_dir}`
|
|
239
|
+
- **Working directory** (read-write): `{work_dir}` — write all output files here
|
|
240
240
|
- Full Python 3 with pip — install via `run_code("import subprocess; subprocess.check_call(['pip', 'install', 'pandas'])")`{' or `execute_command("pip install <pkg>")`' if allow_shell else ''}
|
|
241
241
|
- Kernel state persists across `run_code` calls (like Jupyter cells)
|
|
242
|
-
-
|
|
242
|
+
- Save files to the working directory, then `upload_file()` to get a permanent view URL
|
|
243
243
|
- All operations are audited
|
|
244
244
|
|
|
245
245
|
## Quick Start
|
|
@@ -322,6 +322,17 @@ print(f"Dashboard URL: {{server.config.public_base_url}}/{{server.config.workspa
|
|
|
322
322
|
- Apps should only serve aggregate statistics, visualizations, and metadata
|
|
323
323
|
- All app creation is logged in the audit trail
|
|
324
324
|
|
|
325
|
+
## Hypha Platform Reference
|
|
326
|
+
|
|
327
|
+
This session runs on the Hypha platform. For advanced usage (registering APIs,
|
|
328
|
+
creating dynamic services, artifact management, etc.), read the full Hypha guide:
|
|
329
|
+
|
|
330
|
+
curl -s https://hypha.aicell.io/public/apps/agent-skills/get_skill_md
|
|
331
|
+
|
|
332
|
+
**Security warning**: Any services you register are guardian-checked at creation
|
|
333
|
+
time, but live services handle requests directly. Only serve aggregate data.
|
|
334
|
+
Never expose raw records or CONFIDENTIAL columns through registered services.
|
|
335
|
+
|
|
325
336
|
## Rules & Compliance
|
|
326
337
|
|
|
327
338
|
- **Strictly follow the sensitivity policy** in the dataset documentation above
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{safe_colab_cli-0.13.2 → safe_colab_cli-0.13.4}/safe_colab_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|