benchside 0.4.1__tar.gz → 0.4.3__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.
- {benchside-0.4.1 → benchside-0.4.3}/PKG-INFO +10 -3
- benchside-0.4.3/README.md +85 -0
- {benchside-0.4.1 → benchside-0.4.3}/SETUP.md +54 -25
- benchside-0.4.3/benchside/__init__.py +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/app.py +33 -2
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/metascience.py +64 -22
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/native.py +79 -36
- benchside-0.4.3/benchside/application/notebook.py +95 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/sharing.py +214 -43
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/hooks.py +1 -1
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/journal.py +2 -2
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/main.py +28 -3
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/sharing.py +9 -1
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/decision_recorded.py +1 -1
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/gap_observed.py +13 -1
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/question.py +2 -2
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/research_recorded.py +1 -1
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/service/consultation.py +2 -0
- benchside-0.4.3/benchside/domain/export/event/consent_granted.py +21 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/model/metascience.py +1 -1
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/model/value.py +3 -2
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/model/wire.py +18 -4
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/service/consent.py +3 -3
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/service/export.py +48 -23
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/service/reporting.py +14 -4
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/model/capture.py +1 -1
- benchside-0.4.3/benchside/domain/shared/model/gap.py +138 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/journal/projection.py +2 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/readable_records.py +3 -1
- benchside-0.4.3/benchside/infrastructure/survey_links.py +77 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/reporting.py +12 -1
- {benchside-0.4.1 → benchside-0.4.3}/content/app/SKILL.md +38 -5
- {benchside-0.4.1 → benchside-0.4.3}/content/app/references/app-api.md +72 -6
- benchside-0.4.3/content/app/references/claude-file-memory.md +174 -0
- benchside-0.4.3/content/app/references/discovery.md +56 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/app/references/generic-agents.md +3 -0
- benchside-0.4.3/content/app/references/introduction.md +15 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/app/references/metascience.md +53 -8
- {benchside-0.4.1 → benchside-0.4.3}/content/app/references/native-memory.md +64 -61
- {benchside-0.4.1 → benchside-0.4.3}/content/app/references/onboarding.md +37 -7
- {benchside-0.4.1 → benchside-0.4.3}/content/app/references/sharing.md +112 -9
- {benchside-0.4.1 → benchside-0.4.3}/content/claude/bench-share/SKILL.md +27 -1
- {benchside-0.4.1 → benchside-0.4.3}/content/personas/journal-club.yaml +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/personas/methods-clinic.yaml +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/personas/peer-review.yaml +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/personas/pi-hypothesis.yaml +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/personas/pi.yaml +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/personas/repro-check.yaml +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/personas/results-meeting.yaml +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/personas/study-design.yaml +1 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/templates/app-role.md.tmpl +2 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/templates/blocks/capture-contract.md +6 -2
- benchside-0.4.3/content/templates/blocks/workflow-support.md +16 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/templates/skill.md.tmpl +2 -0
- {benchside-0.4.1 → benchside-0.4.3}/docs/package-description.md +9 -2
- {benchside-0.4.1 → benchside-0.4.3}/pyproject.toml +1 -1
- {benchside-0.4.1 → benchside-0.4.3}/uv.lock +1 -1
- benchside-0.4.1/README.md +0 -305
- benchside-0.4.1/benchside/__init__.py +0 -1
- benchside-0.4.1/benchside/domain/export/event/consent_granted.py +0 -9
- benchside-0.4.1/benchside/domain/shared/model/gap.py +0 -89
- {benchside-0.4.1 → benchside-0.4.3}/.gitignore +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/LICENSE +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/bridge.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/contributions.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/di.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/packaging.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/application/submission_failures.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/install.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/runtime.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/ui/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/ui/_glyphs.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/ui/_model.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/ui/_renderer.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/cli/ui/_rich.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/config.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/command/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/command/compile.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/model/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/model/flow.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/model/persona.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/model/skill.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/model/value.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/port/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/port/renderer.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/port/repository.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/port/skill_writer.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/query/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/query/get_persona.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/query/list_personas.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/service/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/service/authoring.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/util/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/util/di/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/authoring/util/di/provider.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/command/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/command/capture_gap.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/command/close.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/command/open.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/command/raise_critique.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/command/record_decision.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/command/resolve_critique.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/command/state_hypothesis.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/closed.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/critique_raised.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/critique_resolved.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/hypothesis_stated.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/event/opened.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/model/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/model/consultation.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/model/project.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/model/value.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/port/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/port/repository.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/query/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/query/get_consultation.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/query/recall_project.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/service/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/util/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/util/di/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/consultation/util/di/provider.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/command/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/command/export_observations.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/command/grant_consent.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/command/revoke_consent.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/event/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/event/consent_revoked.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/event/observations_exported.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/event/reporting.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/model/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/model/ledger.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/model/reporting.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/port/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/port/redactor.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/port/repository.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/port/sink.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/query/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/query/consent_status.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/query/preview_export.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/service/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/util/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/util/di/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/export/util/di/provider.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/command.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/error.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/event.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/model/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/model/aggregate.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/model/entity.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/model/ids.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/model/provenance.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/model/value.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/port/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/port/base.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/port/journal.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/query.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/domain/shared/service.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/content/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/content/loader.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/content/renderer.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/content/writer.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/files.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/http_sink.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/journal/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/journal/di.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/journal/registry.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/journal/store.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/placeholders.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/readable_refresh.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/redaction.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/session_context.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/infrastructure/storage_layout.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/util/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/util/di/__init__.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/util/di/base.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/benchside/util/di/scope.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/app/scripts/benchside_app.py +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/app-requirements.txt +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/claude/bench-init/SKILL.md +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/fixtures/.gitkeep +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/legacy-skill-digests.json +0 -0
- {benchside-0.4.1 → benchside-0.4.3}/content/templates/blocks/sovereignty.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: benchside
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Research colleagues with private project memory and optional workflow reporting.
|
|
5
5
|
Project-URL: Homepage, https://github.com/science-works/benchside
|
|
6
6
|
Project-URL: Documentation, https://github.com/science-works/benchside/blob/main/SETUP.md
|
|
@@ -67,8 +67,10 @@ synthetic record. Installing the Python package alone does not complete that set
|
|
|
67
67
|
The package is named **benchside**; its command is **bench**. Upgrade with
|
|
68
68
|
`uv tool upgrade benchside` or `python -m pip install --upgrade benchside`, then
|
|
69
69
|
rerun the same `bench setup` command to refresh the installed skill. Keep private
|
|
70
|
-
records in their existing location.
|
|
71
|
-
|
|
70
|
+
records in their existing location. **Update every app sharing a Benchside store
|
|
71
|
+
to 0.4.3 together**, including apps using the same local directory. Older cloud
|
|
72
|
+
clients refuse the new notebook format; older local clients can omit new record
|
|
73
|
+
types from their views. Reopen the existing project and verify recall after updating.
|
|
72
74
|
|
|
73
75
|
## Research roles and records
|
|
74
76
|
|
|
@@ -77,6 +79,11 @@ records in their existing location. Every app sharing a notebook upgraded by
|
|
|
77
79
|
- Results discussant and reproducibility auditor
|
|
78
80
|
- Journal-club discussant and scientific peer reviewer
|
|
79
81
|
|
|
82
|
+
Benchside can also offer to save a decision, evidence or an open question during
|
|
83
|
+
ordinary research chat without starting a role. All roles share the selected
|
|
84
|
+
project's records and can explore practical workflow delays involving materials,
|
|
85
|
+
equipment, coordination, methods, software or data.
|
|
86
|
+
|
|
80
87
|
The agent selects a suitable role with the researcher. Decisions and research
|
|
81
88
|
records remain in the chosen private store, with ODT/Markdown reading copies
|
|
82
89
|
for local storage. Optional sharing is disabled initially; scientific findings
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark.svg">
|
|
4
|
+
<img src="docs/assets/logo-light.svg" alt="" width="84">
|
|
5
|
+
</picture>
|
|
6
|
+
<h1>Benchside</h1>
|
|
7
|
+
<p><strong>A research partner and a private project notebook for your AI assistant.</strong></p>
|
|
8
|
+
<p><a href="docs/getting-started.md">Getting started</a> · <a href="https://github.com/science-works/benchside/releases/latest">Latest release</a> · <a href="CONTRIBUTING.md">Contribute a role</a></p>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
Bring a half-formed question, a puzzling result or a paper you want to discuss. Benchside gives your assistant eight scientific roles and keeps a record of what **you** decided, what evidence you used and what’s still open. In a new chat, you can pick up the same project.
|
|
12
|
+
|
|
13
|
+
Benchside is built by **Science Works, a nonprofit research and policy studio** studying how researchers use AI and what tools would make their work easier.
|
|
14
|
+
|
|
15
|
+
## Try it
|
|
16
|
+
|
|
17
|
+
Paste this into your agent:
|
|
18
|
+
|
|
19
|
+
> Set up Benchside for me in this app: https://github.com/science-works/benchside
|
|
20
|
+
|
|
21
|
+
For a first try, use **Claude Code** with a local folder or **Claude web** with a private notebook. ChatGPT, Codex and other agents such as OpenCode have [setup routes](docs/host-support.md) too, including for locally hosted models.
|
|
22
|
+
|
|
23
|
+
Your agent follows [the setup guide](SETUP.md), helps you choose where to save your work and checks it can reopen a test record. Benchside needs no separate account or API key. A web app may ask you to upload the plugin.
|
|
24
|
+
|
|
25
|
+
**A first session might sound like this:**
|
|
26
|
+
|
|
27
|
+
> **You:** Be my research supervisor. I have several images from each of six donors. What counts as an independent observation here?
|
|
28
|
+
>
|
|
29
|
+
> **Later:** Record my decision to check the donor labels before analysis. Leave open how to handle the repeated images.
|
|
30
|
+
>
|
|
31
|
+
> **Next chat:** Reopen my imaging project. What did I decide, and what was still open?
|
|
32
|
+
|
|
33
|
+
## Which role would help?
|
|
34
|
+
|
|
35
|
+
Ask in your own words. You don’t need to know a command or have a hypothesis to start.
|
|
36
|
+
|
|
37
|
+
| When you’re asking… | Try the… |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| What’s the next useful step for this project? | Research supervisor (PI) |
|
|
40
|
+
| What result would challenge my hypothesis? | Hypothesis reviewer |
|
|
41
|
+
| Which comparison or control am I missing? | Study-design consultant |
|
|
42
|
+
| Why did the same protocol give different results? | Methods troubleshooter |
|
|
43
|
+
| How far does this result support my claim? | Results discussant |
|
|
44
|
+
| Could another lab reproduce this analysis? | Reproducibility auditor |
|
|
45
|
+
| Does this paper’s evidence support its conclusion? | Journal-club discussant |
|
|
46
|
+
| What would a reviewer ask me to revise? | Scientific peer reviewer |
|
|
47
|
+
|
|
48
|
+
## Where does my notebook live?
|
|
49
|
+
|
|
50
|
+
You choose during setup. **Science Works does not receive your notebook.** Your decisions, findings and open questions stay in the project record you control.
|
|
51
|
+
|
|
52
|
+
- **On your computer:** choose a folder and read the journal as an ODT document, Markdown or both.
|
|
53
|
+
- **In your AI app:** use a private Claude file artifact or ChatGPT Page after Benchside verifies saving and reopening. Existing Claude Docs stay intact; see [Claude memory](content/app/references/claude-file-memory.md) if your account cannot restore one.
|
|
54
|
+
- **In a connected service:** use a document store such as Google Docs if your agent has a connector that can safely update it. Benchside checks this before relying on it.
|
|
55
|
+
|
|
56
|
+
To continue in another app, point it at the same folder or notebook. Both apps need access; their accounts don’t sync automatically. Saving locally doesn’t change how your AI provider processes the chat. [More about your records →](docs/readable-records.md)
|
|
57
|
+
|
|
58
|
+
## Share workarounds and support metascience
|
|
59
|
+
|
|
60
|
+
Researchers in different labs often lose time solving the same problem. We want a workaround that helps one lab to be easy for the next lab to find. When people keep getting stuck, and there’s no good workaround, that helps Science Works decide what software should be built. Building this shared, searchable collection of problems and workarounds is part of our [community plans](docs/community.md). We’d love you to help shape it!
|
|
61
|
+
|
|
62
|
+
**Sharing is optional and off by default.** If you choose to contribute a workflow problem, you see the exact report and can edit it, skip it or send it to Science Works. Reports use a random contributor ID so we can connect contributions from the same notebook or folder. Your full chats and scientific findings are never part of the report. An optional short workflow excerpt can preserve your wording with confidential and research-specific details replaced by `[redacted]`; you review everything in the report before sending.
|
|
63
|
+
|
|
64
|
+
For example: *“My spreadsheet kept turning sample IDs into dates. Importing that column as text fixed it.”* Someone else can use that tip without seeing any proprietary data.
|
|
65
|
+
|
|
66
|
+
With permission, we study these reports to understand where scientific workflows break down. You can separately opt into usage counts, feedback, surveys or analysis of selected conversations to help us understand **where language models help researchers and where they fall short**. You can change your choices later. [How participation works →](docs/getting-started.md#optional-sharing)
|
|
67
|
+
|
|
68
|
+
## Get involved
|
|
69
|
+
|
|
70
|
+
Have an idea for a scientific role? [Propose it or open a PR](CONTRIBUTING.md). If you use Benchside in published work, please cite [the release you used](https://github.com/science-works/benchside/releases).
|
|
71
|
+
|
|
72
|
+
[Live demo guide](docs/demo-start-here.md) · [How Benchside works](ARCHITECTURE.md) · [Developer guide](docs/getting-started.md#developer-packaging) · [Apache 2.0 licence](LICENSE)
|
|
73
|
+
|
|
74
|
+
<details>
|
|
75
|
+
<summary>Setting up Benchside on someone’s behalf? Instructions for agents</summary>
|
|
76
|
+
|
|
77
|
+
### Agent setup essentials
|
|
78
|
+
|
|
79
|
+
Follow [SETUP.md](SETUP.md), including the [short introduction](content/app/references/introduction.md) before first setup. If you can only read this page:
|
|
80
|
+
|
|
81
|
+
- Reuse a working installation. On a local agent, install the [Python package](https://pypi.org/project/benchside/) with `uv tool install benchside` or pip in a persistent virtual environment. Run `bench setup --agent claude` for Claude Code, `bench setup --agent codex` for Codex, or `bench setup --agent generic --skills-dir <actual host skill directory>` for another agent.
|
|
82
|
+
- In ChatGPT, discover **Plugin Creator** and use the unchanged `benchside-plugin-<version>.zip` from the [latest release](https://github.com/science-works/benchside/releases/latest). For Claude’s plugin installer, use `benchside-claude-plugin-<version>.zip`. If only manual upload is available, guide that step. No MCP server is needed.
|
|
83
|
+
- Run the installed skill’s version check. After the researcher chooses durable storage, save and read back an isolated synthetic record; check recall in a new chat if possible. Explain any missing capability. Do not send data during setup.
|
|
84
|
+
|
|
85
|
+
</details>
|
|
@@ -26,6 +26,10 @@ in web readers. The repository README contains the essential installation checks
|
|
|
26
26
|
Do not repeatedly ask the researcher to upload instructions, especially when the
|
|
27
27
|
actual blocker is lack of an installation tool.
|
|
28
28
|
|
|
29
|
+
Before first setup, use the [short introduction](content/app/references/introduction.md).
|
|
30
|
+
If the researcher is only exploring, wait for agreement before installing. An
|
|
31
|
+
explicit request to install already authorises the supported setup steps.
|
|
32
|
+
|
|
29
33
|
## 1. Check the app and any existing installation
|
|
30
34
|
|
|
31
35
|
Use the app already specified by the researcher; ask only if the destination is
|
|
@@ -48,35 +52,45 @@ Use the installed onboarding guide for an update or storage change.
|
|
|
48
52
|
|
|
49
53
|
### Local agent: Codex, Claude Code or another capable agent
|
|
50
54
|
|
|
51
|
-
1.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
the
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| Host | Command from the checkout |
|
|
55
|
+
1. Install the [published Python package](https://pypi.org/project/benchside/).
|
|
56
|
+
With `uv`, run `uv tool install benchside`. This creates a persistent isolated
|
|
57
|
+
runtime; use its installed `bench` command. If the executable is not yet on
|
|
58
|
+
the agent's PATH, locate it with `uv tool dir --bin` and invoke its full path.
|
|
59
|
+
Without `uv`, create a persistent Python 3.11–3.14 virtual environment and
|
|
60
|
+
run that environment's `python -m pip install benchside`. Keep the environment
|
|
61
|
+
and use its `bench` executable. Do not use the operating system's global Python
|
|
62
|
+
or a disposable execution directory for this installation.
|
|
63
|
+
2. Install the shared eight-role skill with **one** matching command:
|
|
64
|
+
|
|
65
|
+
| Host | Command |
|
|
64
66
|
|---|---|
|
|
65
|
-
| Codex | `
|
|
66
|
-
| Claude Code | `
|
|
67
|
-
| Another agent | `
|
|
67
|
+
| Codex | `bench setup --agent codex` |
|
|
68
|
+
| Claude Code | `bench setup --agent claude` |
|
|
69
|
+
| Another agent | `bench setup --agent generic --skills-dir <actual host skill directory>` |
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
`bench` executable with the same arguments. Observe the generic host's skill
|
|
71
|
+
Observe the generic host's skill
|
|
71
72
|
directory; do not guess it. These commands install for future conversations.
|
|
72
73
|
A project-scoped installation is available through `bench init`; it is not
|
|
73
74
|
an additional required setup step.
|
|
74
|
-
|
|
75
|
+
3. Read the installed `benchside/SKILL.md`, then its onboarding and app API
|
|
75
76
|
references. Follow them to complete setup and begin the research discussion.
|
|
76
|
-
Use the installed `scripts/benchside_app.py` entry point;
|
|
77
|
+
Use the installed `scripts/benchside_app.py` entry point; setup records
|
|
77
78
|
its runtime location so later chats can work outside the checkout.
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
The package name is `benchside`; the executable is `bench`. A model, provider
|
|
81
|
+
connection and the agent's tools come from the host, not from the Python package.
|
|
82
|
+
Do not use a one-off `uvx` environment for persistent setup.
|
|
83
|
+
|
|
84
|
+
**Source installation remains available:** identify the tag in the
|
|
85
|
+
[latest release](https://github.com/science-works/benchside/releases/latest),
|
|
86
|
+
clone `https://github.com/science-works/benchside` into a durable directory and
|
|
87
|
+
check out that tag. Run `uv sync --frozen`, then the matching command above with
|
|
88
|
+
`uv run` before `bench`. Without uv, install the checkout into a persistent
|
|
89
|
+
virtual environment with `python -m pip install .`. Keep the checkout/environment;
|
|
90
|
+
the installed skill refers to it. Preserve custom changes when updating, and
|
|
91
|
+
use `main` only when the researcher requests a development version.
|
|
92
|
+
|
|
93
|
+
If package installation is unavailable, explain the missing
|
|
80
94
|
capability and offer a supported app package. Do not claim that downloading or
|
|
81
95
|
reading a Markdown file installed a working runtime.
|
|
82
96
|
|
|
@@ -157,7 +171,7 @@ inventing a second setup process. Ask only what is not already known:
|
|
|
157
171
|
|
|
158
172
|
Offer the optional discipline/career-stage question as described in onboarding;
|
|
159
173
|
it is not required. Then ask what the researcher wants help with and choose a
|
|
160
|
-
suitable role. They do not need to learn slash commands or choose a permanent role.
|
|
174
|
+
suitable role or notebook-only action. They do not need to learn slash commands or choose a permanent role.
|
|
161
175
|
|
|
162
176
|
Private records and optional submissions are separate. Do not upload notebooks
|
|
163
177
|
or research documents to Science Works. Setup consent does not approve a gap,
|
|
@@ -165,6 +179,10 @@ feedback, usage or activity submission; those need an exact preview and approval
|
|
|
165
179
|
Surveys use the agreement shown before their questions. No sharing or network
|
|
166
180
|
test should submit data as part of installation.
|
|
167
181
|
|
|
182
|
+
For implicit suggestions in OpenCode, ChatGPT/Codex, Claude Code and other hosts,
|
|
183
|
+
follow [skill discovery](content/app/references/discovery.md). Verify the scope
|
|
184
|
+
and actual fresh-chat behaviour instead of assuming installation guarantees it.
|
|
185
|
+
|
|
168
186
|
## 4. Verify and explain the result
|
|
169
187
|
|
|
170
188
|
First invoke the installed `scripts/benchside_app.py` with
|
|
@@ -199,9 +217,20 @@ Then return to the researcher's real project and start their first task.
|
|
|
199
217
|
|
|
200
218
|
## Updating later
|
|
201
219
|
|
|
202
|
-
Use a newer versioned release and the app's complete update flow. For a
|
|
203
|
-
installation,
|
|
204
|
-
|
|
220
|
+
Use a newer versioned release and the app's complete update flow. For a uv tool
|
|
221
|
+
installation, run `uv tool upgrade benchside`; for pip, run the installation
|
|
222
|
+
environment's `python -m pip install --upgrade benchside`. Then rerun the same
|
|
223
|
+
`bench setup` command to refresh the installed skill, including the same skills
|
|
224
|
+
directory for a generic host. For a source installation, update the
|
|
225
|
+
checkout/environment and rerun setup there. Keep private storage in place and
|
|
226
|
+
reopen the existing project. **Every app sharing a notebook saved by 0.4.1 must
|
|
227
|
+
use 0.4.1 or newer**, including apps previously using 0.4.0. Preserve
|
|
205
228
|
custom files; do not unzip a package over a source installation, whose saved
|
|
206
229
|
runtime pointer could keep launching the older version. See the
|
|
207
230
|
[full update guidance](content/app/references/onboarding.md).
|
|
231
|
+
|
|
232
|
+
For the upcoming workflow/notebook beta, update **every app and agent sharing
|
|
233
|
+
the same local folder as well as a cloud notebook**. Older 0.4.2 apps can omit
|
|
234
|
+
the new notebook-only records from their views without deleting them. Restart
|
|
235
|
+
Claude Code desktop and other long-running hosts after updating so they load the
|
|
236
|
+
new plugin/runtime, then verify recall in each app before continuing.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.3"
|
|
@@ -40,6 +40,7 @@ READ_ACTIONS = {
|
|
|
40
40
|
"participation.status",
|
|
41
41
|
"sharing.status",
|
|
42
42
|
"sharing.history",
|
|
43
|
+
"sharing.drafts",
|
|
43
44
|
"storage.check",
|
|
44
45
|
"metascience.status",
|
|
45
46
|
"metascience.history",
|
|
@@ -143,6 +144,18 @@ class App:
|
|
|
143
144
|
if any((directory / ".git").exists() for directory in (home, *home.parents)):
|
|
144
145
|
raise InvalidStateError("Benchside's journal must be stored outside Git")
|
|
145
146
|
|
|
147
|
+
@staticmethod
|
|
148
|
+
def _sharing_scope(request):
|
|
149
|
+
project = request.get("project_id")
|
|
150
|
+
all_projects = request.get("all_projects", False)
|
|
151
|
+
if type(all_projects) is not bool or (all_projects and project is not None):
|
|
152
|
+
raise ValidationError("Choose a Benchside project or an explicit all-project review")
|
|
153
|
+
if not all_projects and (not isinstance(project, str) or not project):
|
|
154
|
+
raise ValidationError(
|
|
155
|
+
"Provide the current Benchside project_id. Use all_projects:true only "
|
|
156
|
+
"when the researcher explicitly requests a review across projects."
|
|
157
|
+
)
|
|
158
|
+
|
|
146
159
|
def _dispatch(self, action, request):
|
|
147
160
|
if action in {"records.preferences", "records.configure"}:
|
|
148
161
|
from benchside.infrastructure.readable_records import configure, preferences
|
|
@@ -205,16 +218,24 @@ class App:
|
|
|
205
218
|
match action:
|
|
206
219
|
case "sharing.status":
|
|
207
220
|
return flow.status()
|
|
221
|
+
case "sharing.drafts":
|
|
222
|
+
if request.get("channel") in {None, "gaps"}:
|
|
223
|
+
self._sharing_scope(request)
|
|
224
|
+
return flow.drafts(channel=request.get("channel"), project_id=request.get("project_id"))
|
|
208
225
|
case "sharing.consent":
|
|
209
226
|
if type(request.get("enabled")) is not bool:
|
|
210
227
|
raise ValidationError("Consent enabled must be true or false")
|
|
211
228
|
flow.set_consent(
|
|
212
|
-
request["channel"], request["enabled"], kinds=request.get("kinds")
|
|
229
|
+
request["channel"], request["enabled"], kinds=request.get("kinds"), scope=request.get("scope", "kinds")
|
|
213
230
|
)
|
|
214
231
|
return flow.status()
|
|
232
|
+
case "sharing.check_in":
|
|
233
|
+
return flow.check_in(request["project_id"], request["session_id"])
|
|
215
234
|
case "sharing.feedback":
|
|
216
235
|
return flow.feedback(**request["feedback"]).model_dump(mode="json")
|
|
217
236
|
case "sharing.preview":
|
|
237
|
+
if request["channel"] == "gaps":
|
|
238
|
+
self._sharing_scope(request)
|
|
218
239
|
return [
|
|
219
240
|
d.model_dump(mode="json")
|
|
220
241
|
for d in flow.prepare(
|
|
@@ -224,6 +245,8 @@ class App:
|
|
|
224
245
|
feedback_id=request.get("feedback_id"),
|
|
225
246
|
comment=request.get("comment"),
|
|
226
247
|
week=request.get("week"),
|
|
248
|
+
replace_draft_ids=request.get("replace_draft_ids"),
|
|
249
|
+
project_id=request.get("project_id"),
|
|
227
250
|
)
|
|
228
251
|
]
|
|
229
252
|
case "sharing.send":
|
|
@@ -340,6 +363,11 @@ class App:
|
|
|
340
363
|
surface=config["surface"],
|
|
341
364
|
),
|
|
342
365
|
):
|
|
366
|
+
if action.startswith("notebook."):
|
|
367
|
+
from benchside.application.notebook import record_checkpoint
|
|
368
|
+
|
|
369
|
+
identifier = record_checkpoint(self, project_id, action, request)
|
|
370
|
+
return {"recorded": identifier, "recall": recalled()}
|
|
343
371
|
if action == "start":
|
|
344
372
|
persona = self.personas.get(PersonaId(request["role"]))
|
|
345
373
|
if persona is None:
|
|
@@ -428,12 +456,14 @@ class App:
|
|
|
428
456
|
resolution=Resolution(request["resolution"]),
|
|
429
457
|
)
|
|
430
458
|
case "decide":
|
|
459
|
+
from benchside.application.notebook import decision_rationale
|
|
460
|
+
|
|
431
461
|
identifier = f"d-{identifier}"
|
|
432
462
|
self.service.record_decision(
|
|
433
463
|
**common,
|
|
434
464
|
decision_id=identifier,
|
|
435
465
|
decision=request["decision"],
|
|
436
|
-
rationale=request
|
|
466
|
+
rationale=decision_rationale(request),
|
|
437
467
|
supersedes=request.get("supersedes"),
|
|
438
468
|
)
|
|
439
469
|
case "gap":
|
|
@@ -442,6 +472,7 @@ class App:
|
|
|
442
472
|
**common,
|
|
443
473
|
observation_id=identifier,
|
|
444
474
|
gap=TypeAdapter(Gap).validate_python(request["gap"]),
|
|
475
|
+
basis=request.get("basis", "unknown"),
|
|
445
476
|
)
|
|
446
477
|
case "close":
|
|
447
478
|
if type(request.get("converged")) is not bool:
|
|
@@ -42,17 +42,33 @@ from benchside.domain.shared.error import ConsentRequiredError, InfrastructureEr
|
|
|
42
42
|
from benchside.infrastructure.files import atomic_json
|
|
43
43
|
from benchside.infrastructure.http_sink import COLLECTOR, USER_AGENT, HttpExportSink
|
|
44
44
|
from benchside.infrastructure.redaction import TextRedactor
|
|
45
|
+
from benchside.infrastructure.survey_links import (
|
|
46
|
+
confirmed_links,
|
|
47
|
+
public_link_candidate,
|
|
48
|
+
survey_urls,
|
|
49
|
+
)
|
|
45
50
|
|
|
46
51
|
|
|
47
|
-
def _check_survey_text(payload):
|
|
52
|
+
def _check_survey_text(payload, confirmed_public_urls=None):
|
|
48
53
|
"""Keep exact researcher wording; refuse flagged answers instead of rewriting."""
|
|
54
|
+
texts = [answer.text for answer in payload.answers.values() if isinstance(answer, TextAnswer)]
|
|
55
|
+
confirmed = confirmed_links(texts, confirmed_public_urls)
|
|
49
56
|
findings = {
|
|
50
57
|
f"{key}: {finding.category}"
|
|
51
58
|
for key, answer in payload.answers.items()
|
|
52
59
|
if isinstance(answer, TextAnswer)
|
|
53
60
|
for finding in TextRedactor().scan(answer.text)
|
|
54
|
-
if finding.tier == "HIGH"
|
|
61
|
+
if finding.tier == "HIGH" and finding.category != "url"
|
|
55
62
|
}
|
|
63
|
+
unconfirmed = set()
|
|
64
|
+
for key, answer in payload.answers.items():
|
|
65
|
+
if not isinstance(answer, TextAnswer):
|
|
66
|
+
continue
|
|
67
|
+
for url in survey_urls(answer.text):
|
|
68
|
+
if not public_link_candidate(url):
|
|
69
|
+
findings.add(f"{key}: private or sensitive link")
|
|
70
|
+
elif url not in confirmed:
|
|
71
|
+
unconfirmed.add(key)
|
|
56
72
|
if findings:
|
|
57
73
|
raise ValidationError(
|
|
58
74
|
"Edit the flagged survey answers before sending ("
|
|
@@ -61,6 +77,24 @@ def _check_survey_text(payload):
|
|
|
61
77
|
"your answers or send them unchanged.",
|
|
62
78
|
code="survey_answer_sensitive",
|
|
63
79
|
)
|
|
80
|
+
if unconfirmed:
|
|
81
|
+
raise ValidationError(
|
|
82
|
+
"Confirm with the researcher that each exact link in survey answer(s) "
|
|
83
|
+
+ ", ".join(sorted(unconfirmed))
|
|
84
|
+
+ " is public and contains no private research details or access tokens. "
|
|
85
|
+
"Pass only those confirmed URLs as confirmed_public_urls, or edit the answer. "
|
|
86
|
+
"Nothing was sent. Do not infer confirmation from study participation.",
|
|
87
|
+
code="survey_public_link_confirmation_required",
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _survey_answer_error():
|
|
92
|
+
return ValidationError(
|
|
93
|
+
"Check the survey answers: use the offered choices, keep text within the stated "
|
|
94
|
+
"limit and omit skipped questions. At least one non-blank answer is required. "
|
|
95
|
+
"Nothing was sent; Benchside setup is unchanged.",
|
|
96
|
+
code="survey_answer_invalid",
|
|
97
|
+
)
|
|
64
98
|
|
|
65
99
|
|
|
66
100
|
class StudyClient:
|
|
@@ -360,7 +394,7 @@ class Metascience:
|
|
|
360
394
|
self._save(drafts=retained, latest=latest)
|
|
361
395
|
return draft.model_dump()
|
|
362
396
|
|
|
363
|
-
def survey(self, study_key, answers):
|
|
397
|
+
def survey(self, study_key, answers, *, confirmed_public_urls=None):
|
|
364
398
|
grants = self._require("invitations")
|
|
365
399
|
study = self.state.studies.get(study_key)
|
|
366
400
|
if (
|
|
@@ -382,17 +416,20 @@ class Metascience:
|
|
|
382
416
|
raise ConsentRequiredError(
|
|
383
417
|
"Survey participation changed; explain and accept the study again"
|
|
384
418
|
)
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
419
|
+
try:
|
|
420
|
+
payload = payload_type(
|
|
421
|
+
benchside_version=__version__,
|
|
422
|
+
response_id=response_id,
|
|
423
|
+
study_id=study.id,
|
|
424
|
+
study_version=study.version,
|
|
425
|
+
study_sha256=digest(study.model_dump()),
|
|
426
|
+
answers=answers,
|
|
427
|
+
**({"contributor_id": accepted.contributor_id} if accepted else {}),
|
|
428
|
+
)
|
|
429
|
+
payload.check_study(study)
|
|
430
|
+
except ValueError as err:
|
|
431
|
+
raise _survey_answer_error() from err
|
|
432
|
+
_check_survey_text(payload, confirmed_public_urls)
|
|
396
433
|
return self._preview("surveys", key, payload, grants)
|
|
397
434
|
|
|
398
435
|
def join_study(self, study_key, study_sha256):
|
|
@@ -572,14 +609,14 @@ class Metascience:
|
|
|
572
609
|
self._save(samples={**self.state.samples, week: Sample.model_validate(data)})
|
|
573
610
|
return self._preview("activity", key, payload, grants)
|
|
574
611
|
|
|
575
|
-
def send(self, draft_id, approved_sha256):
|
|
612
|
+
def send(self, draft_id, approved_sha256, *, confirmed_public_urls=None):
|
|
576
613
|
try:
|
|
577
|
-
return self._send(draft_id, approved_sha256)
|
|
614
|
+
return self._send(draft_id, approved_sha256, confirmed_public_urls=confirmed_public_urls)
|
|
578
615
|
except Exception as err:
|
|
579
616
|
record_submission_failure(self.paths, err)
|
|
580
617
|
raise
|
|
581
618
|
|
|
582
|
-
def _send(self, draft_id, approved_sha256):
|
|
619
|
+
def _send(self, draft_id, approved_sha256, *, confirmed_public_urls=None):
|
|
583
620
|
draft = self.state.drafts.get(draft_id)
|
|
584
621
|
if not draft or self.state.latest.get(draft.key) != draft_id:
|
|
585
622
|
raise ConsentRequiredError("Review the current metascience draft first")
|
|
@@ -597,9 +634,12 @@ class Metascience:
|
|
|
597
634
|
study = self.state.studies[key]
|
|
598
635
|
if not study.active(self.today.isoformat()) or key in self.state.completed:
|
|
599
636
|
raise ConsentRequiredError("The survey has closed or was dismissed")
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
637
|
+
try:
|
|
638
|
+
payload = parse_survey(draft.payload)
|
|
639
|
+
payload.check_study(study)
|
|
640
|
+
except ValueError as err:
|
|
641
|
+
raise _survey_answer_error() from err
|
|
642
|
+
_check_survey_text(payload, confirmed_public_urls) # Recheck older pending drafts too.
|
|
603
643
|
if isinstance(payload, LinkedSurveyPayload):
|
|
604
644
|
accepted = self.state.participation.get(key)
|
|
605
645
|
if (
|
|
@@ -644,7 +684,8 @@ class Metascience:
|
|
|
644
684
|
request["study_key"], permanently=request.get("permanently", False)
|
|
645
685
|
)
|
|
646
686
|
case "metascience.survey":
|
|
647
|
-
return self.survey(request["study_key"], request["answers"]
|
|
687
|
+
return self.survey(request["study_key"], request["answers"],
|
|
688
|
+
confirmed_public_urls=request.get("confirmed_public_urls"))
|
|
648
689
|
case "metascience.join_study":
|
|
649
690
|
return self.join_study(request["study_key"], request["study_sha256"])
|
|
650
691
|
case "metascience.sample":
|
|
@@ -664,7 +705,8 @@ class Metascience:
|
|
|
664
705
|
case "metascience.preview":
|
|
665
706
|
return self.preview_activity(request["week"], request.get("tokens"))
|
|
666
707
|
case "metascience.send":
|
|
667
|
-
return self.send(request["draft_id"], request["approved_sha256"]
|
|
708
|
+
return self.send(request["draft_id"], request["approved_sha256"],
|
|
709
|
+
confirmed_public_urls=request.get("confirmed_public_urls"))
|
|
668
710
|
case "metascience.history":
|
|
669
711
|
return [r.model_dump() for r in self.state.receipts.values()]
|
|
670
712
|
case _:
|