taskcarry 0.3.2__py3-none-any.whl
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.
- taskcarry/__init__.py +3 -0
- taskcarry/__main__.py +4 -0
- taskcarry/adapter_contracts.py +166 -0
- taskcarry/agy_turns.py +282 -0
- taskcarry/api.py +111 -0
- taskcarry/board.py +313 -0
- taskcarry/board_assets/board.css +1087 -0
- taskcarry/board_assets/board.js +1187 -0
- taskcarry/board_assets/browse.js +214 -0
- taskcarry/board_assets/index.html +43 -0
- taskcarry/board_assets/taskcarry-icon.ico +0 -0
- taskcarry/board_assets/taskcarry-mark.svg +28 -0
- taskcarry/board_data.py +466 -0
- taskcarry/chat_joins.py +157 -0
- taskcarry/cli.py +119 -0
- taskcarry/codex_capture.py +184 -0
- taskcarry/codex_host.py +293 -0
- taskcarry/collaboration_exchange.py +316 -0
- taskcarry/connection.py +159 -0
- taskcarry/continuity.py +300 -0
- taskcarry/contracts.py +165 -0
- taskcarry/conversation_capture.py +669 -0
- taskcarry/core.py +896 -0
- taskcarry/cycle_contracts.py +73 -0
- taskcarry/discovery.py +434 -0
- taskcarry/discovery_contracts.py +52 -0
- taskcarry/exchange_contracts.py +67 -0
- taskcarry/exchange_endpoint.py +377 -0
- taskcarry/exchange_packets.py +142 -0
- taskcarry/experience_contracts.py +129 -0
- taskcarry/experience_exchange.py +214 -0
- taskcarry/experience_notes.py +433 -0
- taskcarry/experience_storage.py +125 -0
- taskcarry/experience_tools.py +26 -0
- taskcarry/feishu/__init__.py +1 -0
- taskcarry/feishu/display.py +122 -0
- taskcarry/feishu/project_watch.py +145 -0
- taskcarry/feishu/review_sets.py +80 -0
- taskcarry/feishu/sender.py +42 -0
- taskcarry/feishu/subscription.py +193 -0
- taskcarry/feishu/windows_agent.py +287 -0
- taskcarry/feishu/windows_secret.py +34 -0
- taskcarry/gitops.py +170 -0
- taskcarry/governance.py +88 -0
- taskcarry/governance_cycle.py +775 -0
- taskcarry/identification.py +82 -0
- taskcarry/integration.py +663 -0
- taskcarry/maintenance.py +118 -0
- taskcarry/mcp.py +183 -0
- taskcarry/member_join.py +184 -0
- taskcarry/member_routing.py +145 -0
- taskcarry/onboarding.py +272 -0
- taskcarry/onboarding_complete.py +252 -0
- taskcarry/path_batches.py +19 -0
- taskcarry/preservation.py +257 -0
- taskcarry/project_collaboration.py +453 -0
- taskcarry/project_history.py +166 -0
- taskcarry/project_identity.py +51 -0
- taskcarry/project_recovery.py +824 -0
- taskcarry/recovery_contracts.py +25 -0
- taskcarry/recovery_files.py +153 -0
- taskcarry/recovery_git.py +234 -0
- taskcarry/remote_capture.py +89 -0
- taskcarry/remote_transfer.py +356 -0
- taskcarry/role_connection.py +215 -0
- taskcarry/setup.py +597 -0
- taskcarry/shared_workbench.py +480 -0
- taskcarry/skill_data/taskcarry-experience-recovery/SKILL.md +37 -0
- taskcarry/skill_data/taskcarry-governance-reconcile/SKILL.md +47 -0
- taskcarry/skill_data/taskcarry-governance-reconcile/references/daily-governance.md +72 -0
- taskcarry/skill_data/taskcarry-project-setup/SKILL.md +48 -0
- taskcarry/skill_data/taskcarry-project-setup/references/onboarding.md +198 -0
- taskcarry/skill_data/taskcarry-task-delivery/SKILL.md +32 -0
- taskcarry/skill_data/taskcarry-task-delivery/references/conditional-experience.md +93 -0
- taskcarry/skill_data/taskcarry-task-delivery/references/worker-channel.md +41 -0
- taskcarry/source_review_set.py +80 -0
- taskcarry/state_format.py +47 -0
- taskcarry/store.py +472 -0
- taskcarry/task_context.py +141 -0
- taskcarry/text_handback.py +98 -0
- taskcarry/transfer_contracts.py +18 -0
- taskcarry/updates.py +351 -0
- taskcarry/workbench.py +625 -0
- taskcarry/workbench_contracts.py +32 -0
- taskcarry/workbuddy_capture.py +451 -0
- taskcarry/workbuddy_setup.py +212 -0
- taskcarry/worker_channel.py +859 -0
- taskcarry/worker_contracts.py +190 -0
- taskcarry/worker_storage.py +60 -0
- taskcarry/worker_tools.py +111 -0
- taskcarry-0.3.2.dist-info/METADATA +203 -0
- taskcarry-0.3.2.dist-info/RECORD +105 -0
- taskcarry-0.3.2.dist-info/WHEEL +5 -0
- taskcarry-0.3.2.dist-info/entry_points.txt +5 -0
- taskcarry-0.3.2.dist-info/licenses/LICENSE +21 -0
- taskcarry-0.3.2.dist-info/licenses/LICENSE_SCOPE.md +31 -0
- taskcarry-0.3.2.dist-info/top_level.txt +2 -0
- taskcarry_https/__init__.py +1 -0
- taskcarry_https/consent.py +207 -0
- taskcarry_https/reader.py +132 -0
- taskcarry_https/review.py +116 -0
- taskcarry_https/server.py +163 -0
- taskcarry_https/team.py +335 -0
- taskcarry_https/team_host.py +109 -0
- taskcarry_https/web_host.py +82 -0
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
"""Conditional experience data on the existing role-bound transactional engine."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import hashlib
|
|
5
|
+
import json
|
|
6
|
+
|
|
7
|
+
from .core import _id
|
|
8
|
+
from .store import GovernanceError
|
|
9
|
+
from .worker_channel import fingerprint, packed, wire_size
|
|
10
|
+
from .experience_contracts import validate_record, text_bounds, compare_conditions
|
|
11
|
+
from . import experience_storage as index
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def fail(code, message):
|
|
15
|
+
raise GovernanceError(code, message)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ExperienceNotes:
|
|
19
|
+
def __init__(self, channel):
|
|
20
|
+
self.channel = channel
|
|
21
|
+
self.store = channel.store
|
|
22
|
+
self.source_cache = {}
|
|
23
|
+
|
|
24
|
+
def invoke(self, action, **args):
|
|
25
|
+
if action == 'experience_query':
|
|
26
|
+
return self.query(**args)
|
|
27
|
+
kind = 'note' if action == 'experience_note' else 'feedback'
|
|
28
|
+
mode = args['mode']
|
|
29
|
+
if mode == 'execute':
|
|
30
|
+
return self.channel._execute(action, args.get('plan_id'))
|
|
31
|
+
if mode == 'get':
|
|
32
|
+
key = args.get('experience_id' if kind == 'note' else 'feedback_id')
|
|
33
|
+
return self.get(kind, key)
|
|
34
|
+
if args.get('install_index'):
|
|
35
|
+
self.channel._governor()
|
|
36
|
+
if set(args) != {'mode', 'install_index'}:
|
|
37
|
+
fail('INVALID_ARGUMENT', 'Index installation has no record or replacement arguments.')
|
|
38
|
+
return self.channel._plan(action, {'install_index': True}, {})
|
|
39
|
+
value, prior, reused = self.prepare(kind, args.get('record'), args.get('expected_revision'))
|
|
40
|
+
# Explicit authorized write planning installs the index; reads never do.
|
|
41
|
+
index.install(self.store)
|
|
42
|
+
guards = self.guards(value, prior)
|
|
43
|
+
return self.channel._plan(action, {'record': value, 'reused': reused}, guards)
|
|
44
|
+
|
|
45
|
+
def guards(self, value, prior):
|
|
46
|
+
refs = self.references(value)
|
|
47
|
+
return {'expected': prior['revision'] if prior else 0,
|
|
48
|
+
'task': self.channel._task_hash(value['task_id']),
|
|
49
|
+
'sources': {r['reference_id']: fingerprint(self.store.get('worker_sources', r['reference_id'])) for r in refs},
|
|
50
|
+
'decisions': {d['fact_id']: fingerprint(self.decision(d)) for d in value.get('decision_refs', [])},
|
|
51
|
+
'application': fingerprint(self.application(value)) if value.get('application_ref') else None}
|
|
52
|
+
|
|
53
|
+
@staticmethod
|
|
54
|
+
def references(value):
|
|
55
|
+
return value['evidence_refs'] + value.get('bound_versions', []) + [c['source'] for c in value.get('use', {}).get('context', [])]
|
|
56
|
+
|
|
57
|
+
def feedback_visible(self, record):
|
|
58
|
+
if record['project_id'] != self.channel.project_id:
|
|
59
|
+
return False
|
|
60
|
+
binding = self.channel.binding
|
|
61
|
+
return (binding['role'] == 'governor' or record['owner_binding_id'] == self.channel.actor or
|
|
62
|
+
record.get('visibility', 'task') == 'project' and binding['read_project_shared'] or
|
|
63
|
+
record.get('visibility', 'task') == 'task' and any(a['task_id'] == record['task_id'] for a in binding['assignments']))
|
|
64
|
+
|
|
65
|
+
def application(self, value):
|
|
66
|
+
ref = value['application_ref']
|
|
67
|
+
previous = self.feedback_record(ref['feedback_id'], ref['revision'])
|
|
68
|
+
if previous.get('use', {}).get('status') != 'applied' or any(previous[k] != value[k] for k in ('experience_id', 'note_revision')):
|
|
69
|
+
fail('EXPERIENCE_APPLICATION_MISMATCH', 'Feedback must reference actual use of the same exact experience revision.')
|
|
70
|
+
return previous
|
|
71
|
+
|
|
72
|
+
def feedback_record(self, key, revision=None):
|
|
73
|
+
"""One policy for details, lists, counters, export and application links."""
|
|
74
|
+
current = self.store.get('experience_feedback', _id(key, 'Feedback'))
|
|
75
|
+
if not current:
|
|
76
|
+
fail('EXPERIENCE_NOT_FOUND', 'No such feedback is available.')
|
|
77
|
+
if not self.feedback_visible(current):
|
|
78
|
+
fail('EXPERIENCE_SCOPE_DENIED', 'Current feedback scope does not allow this read.')
|
|
79
|
+
record = current if revision is None or revision == current['revision'] else self.store.get(
|
|
80
|
+
'experience_feedback_versions', self.version_key(key, revision))
|
|
81
|
+
if not record:
|
|
82
|
+
fail('EXPERIENCE_VERSION_MISSING', 'The exact feedback revision is unavailable.')
|
|
83
|
+
record = validate_record('feedback', record)
|
|
84
|
+
if not self.feedback_visible(record):
|
|
85
|
+
fail('EXPERIENCE_SCOPE_DENIED', 'The historical feedback is outside current scope.')
|
|
86
|
+
note = self.note(record['experience_id'], record['note_revision'])
|
|
87
|
+
stack = getattr(self, '_feedback_stack', set())
|
|
88
|
+
token = (key, record['revision'])
|
|
89
|
+
if token in stack or len(stack) >= 32:
|
|
90
|
+
fail('EXPERIENCE_APPLICATION_UNAVAILABLE', 'Application references must be bounded and acyclic.')
|
|
91
|
+
self._feedback_stack = stack
|
|
92
|
+
stack.add(token)
|
|
93
|
+
try:
|
|
94
|
+
if self.source_gaps(note) or self.source_gaps(record):
|
|
95
|
+
# Do not expose the private outcome, its hash or source names.
|
|
96
|
+
fail('EXPERIENCE_FEEDBACK_UNAVAILABLE', 'Feedback dependencies are outside the current readable scope.')
|
|
97
|
+
finally:
|
|
98
|
+
stack.remove(token)
|
|
99
|
+
return record
|
|
100
|
+
|
|
101
|
+
def feedback_readable(self, record):
|
|
102
|
+
try:
|
|
103
|
+
return self.feedback_record(record['feedback_id'], record['revision']) == record
|
|
104
|
+
except GovernanceError:
|
|
105
|
+
return False
|
|
106
|
+
|
|
107
|
+
@staticmethod
|
|
108
|
+
def collection(kind):
|
|
109
|
+
return 'experience_notes' if kind == 'note' else 'experience_feedback'
|
|
110
|
+
|
|
111
|
+
@staticmethod
|
|
112
|
+
def identity(kind, value):
|
|
113
|
+
return value['experience_id' if kind == 'note' else 'feedback_id']
|
|
114
|
+
|
|
115
|
+
def visible(self, note):
|
|
116
|
+
binding = self.channel.binding
|
|
117
|
+
if note['project_id'] != self.channel.project_id:
|
|
118
|
+
return False
|
|
119
|
+
return (binding['role'] == 'governor' or note['owner_binding_id'] == self.channel.actor or
|
|
120
|
+
(note['scope'] == 'project' and binding['read_project_shared']) or
|
|
121
|
+
(note['scope'] == 'task' and any(a['task_id'] == note['task_id'] for a in binding['assignments'])))
|
|
122
|
+
|
|
123
|
+
def note(self, key, revision=None):
|
|
124
|
+
current = self.store.get('experience_notes', _id(key, 'Experience'))
|
|
125
|
+
if not current:
|
|
126
|
+
fail('EXPERIENCE_NOT_FOUND', 'No such experience is available.')
|
|
127
|
+
current = validate_record('note', current)
|
|
128
|
+
if not self.visible(current):
|
|
129
|
+
fail('EXPERIENCE_SCOPE_DENIED', 'This experience is not visible to the current member.')
|
|
130
|
+
if revision is None or revision == current['revision']:
|
|
131
|
+
return current
|
|
132
|
+
version = self.store.get('experience_note_versions', self.version_key(key, revision))
|
|
133
|
+
if not version:
|
|
134
|
+
fail('EXPERIENCE_VERSION_MISSING', 'No such exact experience revision is retained.')
|
|
135
|
+
version = validate_record('note', version)
|
|
136
|
+
if not self.visible(version):
|
|
137
|
+
fail('EXPERIENCE_SCOPE_DENIED', 'The historical revision is outside current scope.')
|
|
138
|
+
return version
|
|
139
|
+
|
|
140
|
+
@staticmethod
|
|
141
|
+
def version_key(key, revision):
|
|
142
|
+
return key + ':' + str(revision).zfill(10)
|
|
143
|
+
|
|
144
|
+
def decision(self, ref, historical=False):
|
|
145
|
+
if ref['source_id'] != self.channel.project_id:
|
|
146
|
+
fail('EXPERIENCE_DECISION_SCOPE', 'Decisions must belong to this project; do not infer external authority.')
|
|
147
|
+
key = fingerprint(ref['source_id']) + ':' + ref['fact_id']
|
|
148
|
+
if historical:
|
|
149
|
+
value = self.store.get('governance_fact_history', key + ':' + str(ref['revision']).zfill(10))
|
|
150
|
+
else:
|
|
151
|
+
value = self.store.get('governance_facts', key)
|
|
152
|
+
return value
|
|
153
|
+
|
|
154
|
+
def source(self, ref, current=False):
|
|
155
|
+
cache_key = (ref['reference_id'], ref['revision'], ref['content_sha256'], current)
|
|
156
|
+
if cache_key not in self.source_cache:
|
|
157
|
+
source = self.channel._source(ref)
|
|
158
|
+
if current:
|
|
159
|
+
latest = self.store.get('worker_sources', ref['reference_id'])
|
|
160
|
+
if any(latest[k] != ref[k] for k in ref):
|
|
161
|
+
fail('EXPERIENCE_CONTEXT_STALE', 'A current observation source has a newer revision.')
|
|
162
|
+
# Source bytes are checked once per request; never echo them here.
|
|
163
|
+
self.channel._bytes(source)
|
|
164
|
+
self.source_cache[cache_key] = source
|
|
165
|
+
return self.source_cache[cache_key]
|
|
166
|
+
|
|
167
|
+
def check_sources(self, value):
|
|
168
|
+
for ref in self.references(value):
|
|
169
|
+
self.source(ref)
|
|
170
|
+
policy = self.store.get('worker_sources', ref['reference_id'])
|
|
171
|
+
if (value.get('scope') == 'project' or value.get('visibility') == 'project') and policy['visibility'] != 'project':
|
|
172
|
+
fail('EXPERIENCE_SOURCE_SCOPE', 'Project experience may reference only explicitly project-shared sources.')
|
|
173
|
+
for ref in value.get('decision_refs', []):
|
|
174
|
+
decision = self.decision(ref, historical=True)
|
|
175
|
+
if not decision or decision['kind'] != 'decision':
|
|
176
|
+
fail('EXPERIENCE_DECISION_MISSING', 'Reference a retained exact project decision revision.')
|
|
177
|
+
if value.get('scope') == 'task' and decision['task_id'] != value['task_id']:
|
|
178
|
+
fail('EXPERIENCE_DECISION_SCOPE', 'A task-only note cannot copy another task decision.')
|
|
179
|
+
|
|
180
|
+
def prepare(self, kind, supplied, expected_revision):
|
|
181
|
+
value = validate_record(kind, supplied)
|
|
182
|
+
key = self.identity(kind, value)
|
|
183
|
+
if value['project_id'] != self.channel.project_id:
|
|
184
|
+
fail('EXPERIENCE_PROJECT_CHANGED', 'The experience belongs to another project.')
|
|
185
|
+
if type(expected_revision) is not int or expected_revision < 0:
|
|
186
|
+
fail('EXPERIENCE_REVISION_CONFLICT', 'Supply the observed current revision, or zero for a new identity.')
|
|
187
|
+
prior = self.store.get(self.collection(kind), key)
|
|
188
|
+
if prior:
|
|
189
|
+
prior = validate_record(kind, prior)
|
|
190
|
+
for name in ('project_id', 'owner_binding_id', 'task_id', 'workspace_id'):
|
|
191
|
+
if prior[name] != value[name]:
|
|
192
|
+
fail('EXPERIENCE_IDENTITY_CONFLICT', 'A stable experience identity cannot change its owner or originating task.')
|
|
193
|
+
if kind == 'feedback' and any(prior[k] != value[k] for k in ('experience_id', 'note_revision')):
|
|
194
|
+
fail('EXPERIENCE_IDENTITY_CONFLICT', 'A feedback identity stays attached to its original note revision.')
|
|
195
|
+
if kind == 'feedback' or self.channel.binding['role'] != 'governor' or prior is None:
|
|
196
|
+
if value['owner_binding_id'] != self.channel.actor:
|
|
197
|
+
fail('EXPERIENCE_ACTOR_MISMATCH', 'Members record their own experience and outcomes.')
|
|
198
|
+
self.channel._assignment(value['task_id'], value['workspace_id'], 'experience_' + kind)
|
|
199
|
+
if kind == 'note':
|
|
200
|
+
if value['scope'] == 'project' or prior and prior['scope'] == 'project':
|
|
201
|
+
self.channel._governor()
|
|
202
|
+
else:
|
|
203
|
+
self.note(value['experience_id'], value['note_revision'])
|
|
204
|
+
if value.get('visibility') == 'project' and not self.channel.binding['share_project']:
|
|
205
|
+
self.channel._governor()
|
|
206
|
+
if value.get('application_ref'):
|
|
207
|
+
application = self.application(value)
|
|
208
|
+
if value.get('visibility') == 'project' and application.get('visibility') != 'project':
|
|
209
|
+
fail('EXPERIENCE_SOURCE_SCOPE', 'Private application records cannot be promoted by a feedback reference.')
|
|
210
|
+
self.check_sources(value)
|
|
211
|
+
if prior == value:
|
|
212
|
+
return value, prior, True
|
|
213
|
+
actual = prior['revision'] if prior else 0
|
|
214
|
+
if expected_revision != actual or value['revision'] != actual + 1:
|
|
215
|
+
fail('EXPERIENCE_REVISION_CONFLICT', 'Reread the latest experience before proposing its next revision.')
|
|
216
|
+
if kind == 'note':
|
|
217
|
+
# An unchanged legacy condition must still be pausable or retireable.
|
|
218
|
+
disabling_legacy = (prior and value['state'] in ('paused', 'retired') and
|
|
219
|
+
value['applies_when'] == prior['applies_when'] and value['scope'] == prior['scope'])
|
|
220
|
+
scope_values = {'project_id': value['project_id']}
|
|
221
|
+
if value['scope'] == 'task':
|
|
222
|
+
scope_values['task_id'] = value['task_id']
|
|
223
|
+
def distinguishes(c):
|
|
224
|
+
if scope_values.get(c['key']) == c['equals']:
|
|
225
|
+
return False
|
|
226
|
+
return not (c['key'].casefold() in ('always', 'always_true', 'unconditional') and
|
|
227
|
+
c['equals'].strip().casefold() in ('true', 'yes', '1', 'always', '*'))
|
|
228
|
+
if not disabling_legacy and not any(distinguishes(c) for c in value['applies_when']):
|
|
229
|
+
fail('EXPERIENCE_CONTRACT_INVALID',
|
|
230
|
+
'Add an applicability condition beyond the identity already fixed by the note scope.')
|
|
231
|
+
return value, prior, False
|
|
232
|
+
|
|
233
|
+
def apply(self, kind, payload, guards):
|
|
234
|
+
if payload.get('install_index'):
|
|
235
|
+
self.channel._governor()
|
|
236
|
+
index.install(self.store, repair=True)
|
|
237
|
+
return {'index_installed': True, 'effects_executed': True}
|
|
238
|
+
index.version(self.store) # Refuse unsupported future state before writing.
|
|
239
|
+
supplied = payload['record']
|
|
240
|
+
if self.channel._task_hash(supplied['task_id']) != guards['task']:
|
|
241
|
+
fail('EXPERIENCE_TASK_CHANGED', 'The task changed after this experience plan.')
|
|
242
|
+
for key, digest in guards['sources'].items():
|
|
243
|
+
if fingerprint(self.store.get('worker_sources', key)) != digest:
|
|
244
|
+
fail('EXPERIENCE_SOURCE_CHANGED', 'Relevant source policy/version changed; prepare a new plan.')
|
|
245
|
+
for ref in supplied.get('decision_refs', []):
|
|
246
|
+
if fingerprint(self.decision(ref)) != guards['decisions'][ref['fact_id']]:
|
|
247
|
+
fail('EXPERIENCE_DECISION_CHANGED', 'A referenced decision changed after planning.')
|
|
248
|
+
if supplied.get('application_ref') and fingerprint(self.application(supplied)) != guards['application']:
|
|
249
|
+
fail('EXPERIENCE_APPLICATION_MISMATCH', 'Application reference changed after planning.')
|
|
250
|
+
value, prior, reused = self.prepare(kind, supplied, guards['expected'])
|
|
251
|
+
key = self.identity(kind, value)
|
|
252
|
+
if not reused:
|
|
253
|
+
self.store.put(self.collection(kind), key, value)
|
|
254
|
+
history = 'experience_note_versions' if kind == 'note' else 'experience_feedback_versions'
|
|
255
|
+
self.store.put(history, self.version_key(key, value['revision']), value)
|
|
256
|
+
self.store.event('experience_' + kind + '_recorded', {
|
|
257
|
+
'id': key, 'revision': value['revision'], 'actor': self.channel.actor,
|
|
258
|
+
'content_sha256': fingerprint(value)})
|
|
259
|
+
return {'reference': {'experience_id' if kind == 'note' else 'feedback_id': key,
|
|
260
|
+
'revision': value['revision'], 'content_sha256': fingerprint(value)},
|
|
261
|
+
'reused': reused, 'effects_executed': not reused, 'task_state_changed': False,
|
|
262
|
+
'experience_state_changed_by_feedback': False}
|
|
263
|
+
|
|
264
|
+
def source_gaps(self, note):
|
|
265
|
+
gaps = []
|
|
266
|
+
for ref in self.references(note):
|
|
267
|
+
try:
|
|
268
|
+
self.source(ref)
|
|
269
|
+
except GovernanceError as exc:
|
|
270
|
+
gaps.append({'reference_id': ref['reference_id'], 'reason': exc.code})
|
|
271
|
+
if note.get('application_ref'):
|
|
272
|
+
try:
|
|
273
|
+
self.application(note)
|
|
274
|
+
except GovernanceError as exc:
|
|
275
|
+
gaps.append({'reason': exc.code})
|
|
276
|
+
return gaps
|
|
277
|
+
|
|
278
|
+
def get(self, kind, key, revision=None):
|
|
279
|
+
if kind == 'note':
|
|
280
|
+
record = self.note(key, revision)
|
|
281
|
+
else:
|
|
282
|
+
record = self.feedback_record(key, revision)
|
|
283
|
+
gaps = self.source_gaps(record)
|
|
284
|
+
result = {'read_only': True, 'effects_executed': False, 'content_sha256': fingerprint(record)}
|
|
285
|
+
if gaps:
|
|
286
|
+
return {**result, 'record': None, 'missing_evidence': gaps, 'content_withheld': True}
|
|
287
|
+
return {**result, 'record': record, 'missing_evidence': []}
|
|
288
|
+
|
|
289
|
+
def context_values(self, context):
|
|
290
|
+
values, gaps = {}, []
|
|
291
|
+
try:
|
|
292
|
+
text_bounds(context)
|
|
293
|
+
keys = [c['key'] for c in context]
|
|
294
|
+
if len(keys) != len(set(keys)):
|
|
295
|
+
raise ValueError('Current condition keys must be unique')
|
|
296
|
+
except ValueError as exc:
|
|
297
|
+
fail('EXPERIENCE_CONTEXT_INVALID', str(exc))
|
|
298
|
+
for item in context:
|
|
299
|
+
try:
|
|
300
|
+
self.source(item['source'], current=True)
|
|
301
|
+
values[item['key']] = item['value']
|
|
302
|
+
except GovernanceError as exc:
|
|
303
|
+
gaps.append({'key': item['key'], 'reason': exc.code})
|
|
304
|
+
return values, gaps
|
|
305
|
+
|
|
306
|
+
def assessed(self, note, values):
|
|
307
|
+
note = validate_record('note', note)
|
|
308
|
+
key = note['experience_id']
|
|
309
|
+
gaps = self.source_gaps(note)
|
|
310
|
+
summary = {'experience_id': key, 'revision': note['revision'], 'content_sha256': fingerprint(note),
|
|
311
|
+
'kind': note['kind'], 'state': note['state'], 'scope': note['scope']}
|
|
312
|
+
pointer = {'experience_id': key, 'revision': note['revision'], 'details_via': 'experience_query section=get'}
|
|
313
|
+
if gaps:
|
|
314
|
+
return {**pointer, 'applicability': 'unknown', 'reason_codes': ['source_unavailable'],
|
|
315
|
+
'missing_evidence': gaps, 'missing_condition_groups': [], 'content_withheld': True,
|
|
316
|
+
'review_needed': True}
|
|
317
|
+
check = compare_conditions(note, values)
|
|
318
|
+
count = self.feedback_count(key, note['revision'])
|
|
319
|
+
review = bool(count) or 'reevaluation_condition' in check['reason_codes']
|
|
320
|
+
latest = self.store.get('experience_notes', key)
|
|
321
|
+
if latest and latest['revision'] != note['revision']:
|
|
322
|
+
check['reason_codes'].append('newer_revision_exists'); review = True
|
|
323
|
+
if latest and latest['state'] != 'active':
|
|
324
|
+
check['reason_codes'].append('current_note_not_active'); review = True
|
|
325
|
+
if count:
|
|
326
|
+
check['reason_codes'].append('counterevidence_on_exact_revision')
|
|
327
|
+
for ref in note.get('bound_versions', []):
|
|
328
|
+
current = self.store.get('worker_sources', ref['reference_id'])
|
|
329
|
+
if any(current[k] != ref[k] for k in ref):
|
|
330
|
+
check['reason_codes'].append('bound_version_changed'); review = True
|
|
331
|
+
for ref in note.get('decision_refs', []):
|
|
332
|
+
decision = self.decision(ref)
|
|
333
|
+
if not decision or decision['revision'] != ref['revision'] or decision['standing'] != 'current':
|
|
334
|
+
check['reason_codes'].append('decision_changed'); review = True
|
|
335
|
+
if note['state'] != 'active':
|
|
336
|
+
check['reason_codes'].append('note_not_active'); review = True
|
|
337
|
+
if review and check['applicability'] == 'candidate':
|
|
338
|
+
check['applicability'] = 'review_required'
|
|
339
|
+
assessment = {**pointer, **check, 'state': note['state'], 'review_needed': review, 'feedback_warning': count}
|
|
340
|
+
if check['applicability'] != 'candidate':
|
|
341
|
+
return assessment
|
|
342
|
+
return {**summary, **assessment, 'problem': note['problem'][:160], 'suggestion': note['suggestion'][:240],
|
|
343
|
+
'comparison_basis': 'caller-supplied values with exact sources; no independent semantic proof'}
|
|
344
|
+
|
|
345
|
+
def feedback_count(self, key, revision):
|
|
346
|
+
feedback_where, feedback_params = index.feedback_scope(self.channel)
|
|
347
|
+
with self.store._connect(readonly=True) as db:
|
|
348
|
+
rows = db.execute("SELECT f.value FROM records f INDEXED BY experience_feedback_note WHERE f.collection='experience_feedback' AND json_extract(f.value,'$.experience_id')=? AND json_extract(f.value,'$.note_revision')=? AND json_extract(f.value,'$.outcome') IN ('failed','corrected') AND " + feedback_where, [key, revision, *feedback_params])
|
|
349
|
+
return sum(self.feedback_readable(json.loads(row[0])) for row in rows)
|
|
350
|
+
|
|
351
|
+
def query(self, section='notes', experience_id=None, revision=None, task_id=None, state='active', feedback_id=None,
|
|
352
|
+
context=None, limit=5, cursor=None, previous_fingerprint=None):
|
|
353
|
+
context = context or []
|
|
354
|
+
version = index.version(self.store)
|
|
355
|
+
selection = fingerprint({'actor': self.channel.actor, 'section': section, 'id': experience_id,
|
|
356
|
+
'feedback_id': feedback_id, 'revision': revision, 'task': task_id, 'state': state, 'context': context})
|
|
357
|
+
stamp = fingerprint([self.channel.project_id, self.channel.binding['revision'], version, selection])
|
|
358
|
+
after = self.channel._cursor(cursor, selection, stamp) if cursor else ''
|
|
359
|
+
if not isinstance(after, str):
|
|
360
|
+
fail('WORKER_CURSOR_INVALID', 'Experience queries use stable identity cursors.')
|
|
361
|
+
base = {'read_only': True, 'effects_executed': False, 'fingerprint': stamp,
|
|
362
|
+
'changed': previous_fingerprint != stamp, 'index_installed': version is not None,
|
|
363
|
+
'query_kind': section, 'items': [], 'returned': 0, 'loaded_records': 0,
|
|
364
|
+
'next_cursor': None, 'has_more': False, 'condition_check_required': True}
|
|
365
|
+
if section == 'get':
|
|
366
|
+
return {**base, **self.get('note', experience_id, revision)}
|
|
367
|
+
if section == 'feedback_get':
|
|
368
|
+
return {**base, **self.get('feedback', feedback_id, revision)}
|
|
369
|
+
if section == 'feedback_history':
|
|
370
|
+
self.get('feedback', feedback_id)
|
|
371
|
+
if section in {'history', 'feedback'}:
|
|
372
|
+
current = self.note(experience_id)
|
|
373
|
+
if version is None:
|
|
374
|
+
return base
|
|
375
|
+
values, context_gaps = self.context_values(context)
|
|
376
|
+
base['context_gaps'] = context_gaps
|
|
377
|
+
where, params = index.selection(self.channel, task_id)
|
|
378
|
+
if section == 'notes':
|
|
379
|
+
sql = "SELECT n.key,n.value FROM records n INDEXED BY experience_notes_scope WHERE n.collection='experience_notes' AND json_extract(n.value,'$.state')=? AND " + where + ' AND n.key>? ORDER BY n.key LIMIT ?'
|
|
380
|
+
params = [state, *params, after, limit + 1]
|
|
381
|
+
elif section in {'history', 'feedback_history'}:
|
|
382
|
+
collection = 'experience_note_versions' if section == 'history' else 'experience_feedback_versions'
|
|
383
|
+
sql = "SELECT key,value FROM records WHERE collection='" + collection + "' AND key>=? AND key<? AND key>? ORDER BY key LIMIT ?"
|
|
384
|
+
prefix = (experience_id if section == 'history' else feedback_id) + ':'
|
|
385
|
+
params = [prefix, prefix + '~', after, limit + 1]
|
|
386
|
+
else:
|
|
387
|
+
sql = "SELECT f.key,f.value FROM records f WHERE f.collection='experience_feedback' AND json_extract(f.value,'$.experience_id')=?"
|
|
388
|
+
params = [experience_id]
|
|
389
|
+
if revision is not None:
|
|
390
|
+
sql += " AND json_extract(f.value,'$.note_revision')=?"; params.append(revision)
|
|
391
|
+
feedback_where, feedback_params = index.feedback_scope(self.channel)
|
|
392
|
+
sql += ' AND ' + feedback_where + ' AND f.key>? ORDER BY f.key LIMIT ?'; params += [*feedback_params, after, limit + 1]
|
|
393
|
+
with self.store._connect(readonly=True) as db:
|
|
394
|
+
if section in {'feedback', 'feedback_history'}:
|
|
395
|
+
# Pagination is over the readable collection. A revoked proof
|
|
396
|
+
# must not reveal a hidden row through count or cursor shape.
|
|
397
|
+
rows = []
|
|
398
|
+
for key, data in db.execute(sql.removesuffix(' LIMIT ?'), params[:-1]):
|
|
399
|
+
if self.feedback_readable(validate_record('feedback', json.loads(data))):
|
|
400
|
+
rows.append((key, data))
|
|
401
|
+
if len(rows) > limit:
|
|
402
|
+
break
|
|
403
|
+
else:
|
|
404
|
+
rows = db.execute(sql, params).fetchall()
|
|
405
|
+
items, last, scanned = [], after, 0
|
|
406
|
+
for key, data in rows[:limit]:
|
|
407
|
+
record = json.loads(data)
|
|
408
|
+
if section in {'feedback', 'feedback_history'}:
|
|
409
|
+
record = validate_record('feedback', record)
|
|
410
|
+
gaps = self.source_gaps(record)
|
|
411
|
+
item = {'feedback_id': record['feedback_id'], 'revision': record['revision'],
|
|
412
|
+
'note_revision': record['note_revision'], 'outcome': record['outcome'],
|
|
413
|
+
'summary': record['summary'][:240] if not gaps else None,
|
|
414
|
+
'missing_evidence': gaps, 'content_sha256': fingerprint(record)}
|
|
415
|
+
if not gaps:
|
|
416
|
+
item['recorded_by'] = record['owner_binding_id']
|
|
417
|
+
item['use_status'] = record.get('use', {}).get('status', 'unknown')
|
|
418
|
+
item['application_ref'] = record.get('application_ref')
|
|
419
|
+
elif not self.visible(record):
|
|
420
|
+
# Historical scope may have been narrowed; don't leak old bodies.
|
|
421
|
+
item = {'experience_id': experience_id, 'revision': record['revision'], 'content_withheld': True}
|
|
422
|
+
else:
|
|
423
|
+
item = self.assessed(record, values)
|
|
424
|
+
candidate = {**base, 'items': items + [item]}
|
|
425
|
+
if len(packed(candidate)) > 5800 or wire_size(candidate) > 14800:
|
|
426
|
+
break
|
|
427
|
+
items.append(item); last = key; scanned += 1
|
|
428
|
+
if rows and not scanned:
|
|
429
|
+
fail('WORKER_RESPONSE_TOO_LARGE', 'One experience summary exceeds the payload budget.')
|
|
430
|
+
more = len(rows) > scanned
|
|
431
|
+
return {**base, 'items': items, 'returned': len(items), 'loaded_records': len(rows),
|
|
432
|
+
'loaded_records_scope': 'readable primary selection only; internal scans and exact dependency lookups are additional',
|
|
433
|
+
'has_more': more, 'next_cursor': self.channel._encode(selection, stamp, last) if more else None}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"""Small partial indexes over the authoritative records, installed only by a write plan."""
|
|
2
|
+
from .store import GovernanceError
|
|
3
|
+
|
|
4
|
+
COLLECTIONS = ('experience_notes', 'experience_note_versions', 'experience_feedback', 'experience_feedback_versions')
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def ready(store):
|
|
8
|
+
with store._connect(readonly=True) as db:
|
|
9
|
+
if not db.execute("SELECT 1 FROM sqlite_master WHERE type='table' AND name='experience_schema'").fetchone():
|
|
10
|
+
return False
|
|
11
|
+
if db.execute('SELECT version FROM experience_schema').fetchone() != (1,):
|
|
12
|
+
raise GovernanceError('EXPERIENCE_SCHEMA_UNSUPPORTED', 'Use a compatible conditional experience reader/writer.')
|
|
13
|
+
names = {r[0] for r in db.execute("SELECT name FROM sqlite_master WHERE type IN ('index','trigger')")}
|
|
14
|
+
required = {'experience_notes_scope', 'experience_feedback_note',
|
|
15
|
+
'experience_changed_insert', 'experience_changed_update', 'experience_changed_delete'}
|
|
16
|
+
if not required <= names:
|
|
17
|
+
raise GovernanceError('EXPERIENCE_INDEX_INCOMPLETE', 'Explicit index repair is required before use.')
|
|
18
|
+
return True
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def install(store, repair=False):
|
|
22
|
+
try:
|
|
23
|
+
if ready(store):
|
|
24
|
+
return
|
|
25
|
+
except GovernanceError as exc:
|
|
26
|
+
if not repair or exc.code != 'EXPERIENCE_INDEX_INCOMPLETE':
|
|
27
|
+
raise
|
|
28
|
+
with store._connect() as db:
|
|
29
|
+
db.execute('CREATE TABLE IF NOT EXISTS experience_schema(version INTEGER NOT NULL, revision INTEGER NOT NULL)')
|
|
30
|
+
if not db.execute('SELECT 1 FROM experience_schema').fetchone():
|
|
31
|
+
db.execute('INSERT INTO experience_schema VALUES(1,1)')
|
|
32
|
+
else:
|
|
33
|
+
db.execute('UPDATE experience_schema SET revision=revision+1')
|
|
34
|
+
db.execute("CREATE INDEX IF NOT EXISTS experience_notes_scope ON records(json_extract(value,'$.state'),json_extract(value,'$.scope'),json_extract(value,'$.task_id'),key) WHERE collection='experience_notes'")
|
|
35
|
+
db.execute("CREATE INDEX IF NOT EXISTS experience_feedback_note ON records(json_extract(value,'$.experience_id'),json_extract(value,'$.note_revision'),json_extract(value,'$.outcome'),key) WHERE collection='experience_feedback'")
|
|
36
|
+
collections = ','.join("'" + name + "'" for name in (*COLLECTIONS, 'worker_sources', 'worker_bindings', 'governance_facts'))
|
|
37
|
+
for op, side in [('INSERT', 'NEW'), ('UPDATE', 'NEW'), ('DELETE', 'OLD')]:
|
|
38
|
+
condition = side + '.collection IN (' + collections + ')'
|
|
39
|
+
if op == 'UPDATE':
|
|
40
|
+
condition = '(' + condition + ' OR OLD.collection IN (' + collections + ')) AND OLD.value IS NOT NEW.value'
|
|
41
|
+
db.execute('CREATE TRIGGER IF NOT EXISTS experience_changed_' + op.lower() + ' AFTER ' + op +
|
|
42
|
+
' ON records WHEN ' + condition + ' BEGIN UPDATE experience_schema SET revision=revision+1; END')
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def version(store):
|
|
46
|
+
if not ready(store):
|
|
47
|
+
with store._connect(readonly=True) as db:
|
|
48
|
+
if db.execute("SELECT 1 FROM records WHERE collection IN ('experience_notes','experience_feedback') LIMIT 1").fetchone():
|
|
49
|
+
raise GovernanceError('EXPERIENCE_INDEX_REQUIRED', 'Existing experience needs explicit index installation, not an empty result.')
|
|
50
|
+
return None
|
|
51
|
+
with store._connect(readonly=True) as db:
|
|
52
|
+
return db.execute('SELECT revision FROM experience_schema').fetchone()[0]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def selection(channel, task_id=None):
|
|
56
|
+
"""Static SQL fragments with parameterized scope; no source content is selected here."""
|
|
57
|
+
binding = channel.binding
|
|
58
|
+
if task_id:
|
|
59
|
+
channel.core._task(task_id)
|
|
60
|
+
params = []
|
|
61
|
+
if binding['role'] == 'governor':
|
|
62
|
+
visibility = '1'
|
|
63
|
+
else:
|
|
64
|
+
assigned = sorted({a['task_id'] for a in binding['assignments']})
|
|
65
|
+
visibility = "(json_extract(n.value,'$.owner_binding_id')=? OR (json_extract(n.value,'$.scope')='task' AND json_extract(n.value,'$.task_id') IN (" + ','.join('?' for _ in assigned) + '))'
|
|
66
|
+
params = [channel.actor, *assigned]
|
|
67
|
+
if binding['read_project_shared']:
|
|
68
|
+
visibility += " OR json_extract(n.value,'$.scope')='project'"
|
|
69
|
+
visibility += ')'
|
|
70
|
+
if task_id:
|
|
71
|
+
visibility += " AND (json_extract(n.value,'$.scope')='project' OR json_extract(n.value,'$.task_id')=?)"
|
|
72
|
+
params.append(task_id)
|
|
73
|
+
return "json_extract(n.value,'$.project_id')=? AND (" + visibility + ')', [channel.project_id, *params]
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def feedback_scope(channel, alias='f'):
|
|
77
|
+
if channel.binding['role'] == 'governor':
|
|
78
|
+
return "json_extract(" + alias + ".value,'$.project_id')=?", [channel.project_id]
|
|
79
|
+
assigned = sorted({a['task_id'] for a in channel.binding['assignments']})
|
|
80
|
+
value = alias + '.value'
|
|
81
|
+
sql = "(json_extract(" + value + ",'$.owner_binding_id')=? OR (coalesce(json_extract(" + value + ",'$.visibility'),'task')='task' AND json_extract(" + value + ",'$.task_id') IN (" + ','.join('?' for _ in assigned) + '))'
|
|
82
|
+
if channel.binding['read_project_shared']:
|
|
83
|
+
sql += " OR json_extract(" + value + ",'$.visibility')='project'"
|
|
84
|
+
return "json_extract(" + value + ",'$.project_id')=? AND " + sql + ')', [channel.project_id, channel.actor, *assigned]
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def pointer(channel, task_id=None):
|
|
88
|
+
revision = version(channel.store)
|
|
89
|
+
base = {'available': True, 'index_installed': revision is not None,
|
|
90
|
+
'query_tool': 'experience_query', 'requires_condition_check': True}
|
|
91
|
+
if revision is None:
|
|
92
|
+
return {**base, 'candidate_count': 0, 'counterevidence_count': 0}
|
|
93
|
+
where, params = selection(channel, task_id)
|
|
94
|
+
from .experience_notes import ExperienceNotes
|
|
95
|
+
engine = ExperienceNotes(channel)
|
|
96
|
+
with channel.store._connect(readonly=True) as db:
|
|
97
|
+
rows = db.execute("SELECT n.key,json_extract(n.value,'$.revision') FROM records n INDEXED BY experience_notes_scope WHERE n.collection='experience_notes' AND json_extract(n.value,'$.state')='active' AND " + where, params)
|
|
98
|
+
count, warnings = 0, 0
|
|
99
|
+
for key, note_revision in rows:
|
|
100
|
+
count += 1
|
|
101
|
+
warnings += bool(engine.feedback_count(key, note_revision))
|
|
102
|
+
return {**base, 'candidate_count': count, 'counterevidence_count': warnings}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def legacy_pointer(core, task_id=None, db=None):
|
|
106
|
+
"""Same compact discovery for the unrestricted local-administrator entrypoints."""
|
|
107
|
+
from types import SimpleNamespace
|
|
108
|
+
if db is None:
|
|
109
|
+
with core.store._connect(readonly=True) as connection:
|
|
110
|
+
return legacy_pointer(core, task_id, connection)
|
|
111
|
+
previous = getattr(core.store._local, 'connection', None)
|
|
112
|
+
if db is not None:
|
|
113
|
+
core.store._local.connection = db
|
|
114
|
+
try:
|
|
115
|
+
current_revision = version(core.store)
|
|
116
|
+
if current_revision is None:
|
|
117
|
+
return {'available':True, 'index_installed':False, 'query_tool':'experience_query',
|
|
118
|
+
'requires_condition_check':True, 'candidate_count':0, 'counterevidence_count':0, 'revision':None}
|
|
119
|
+
channel = SimpleNamespace(core=core, store=core.store, actor='local-governor',
|
|
120
|
+
project_id=core.source()['source_id'], binding={'role': 'governor', 'assignments': [], 'read_project_shared': True})
|
|
121
|
+
result = pointer(channel, task_id)
|
|
122
|
+
return {**result, 'revision': current_revision}
|
|
123
|
+
finally:
|
|
124
|
+
if db is not None:
|
|
125
|
+
core.store._local.connection = previous
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""One public contract for conditional project experience (not executable recovery)."""
|
|
2
|
+
from .worker_tools import schema, string, REF, RECORD, PAGE, REV
|
|
3
|
+
|
|
4
|
+
MODES = string(enum=['plan', 'execute', 'get'])
|
|
5
|
+
CONTEXT = {'type': 'array', 'maxItems': 16, 'items': schema({
|
|
6
|
+
'key': string(), 'value': string(), 'source': REF}, ['key', 'value', 'source'])}
|
|
7
|
+
SCHEMAS = {
|
|
8
|
+
'experience_note': schema({'mode': MODES, 'plan_id': string(), 'record': RECORD,
|
|
9
|
+
'expected_revision': REV, 'experience_id': string(), 'install_index': {'type': 'boolean'}}, ['mode']),
|
|
10
|
+
'experience_feedback': schema({'mode': MODES, 'plan_id': string(), 'record': RECORD,
|
|
11
|
+
'expected_revision': REV, 'feedback_id': string()}, ['mode']),
|
|
12
|
+
'experience_query': schema({**PAGE,
|
|
13
|
+
'section': string(enum=['notes', 'feedback', 'history', 'get', 'feedback_get', 'feedback_history'],
|
|
14
|
+
description='Defaults to notes. feedback/history/get require experience_id; feedback_get/feedback_history require feedback_id.'),
|
|
15
|
+
'experience_id': string(description='Required for section=feedback, history or get; feedback lists results for this one experience.'),
|
|
16
|
+
'feedback_id': string(description='Required for section=feedback_get or feedback_history.'),
|
|
17
|
+
'revision': {'type': 'integer', 'minimum': 1,
|
|
18
|
+
'description': 'Exact record revision for get/feedback_get; exact note revision filter for feedback.'},
|
|
19
|
+
'task_id': string(), 'state': string(enum=['proposed', 'active', 'paused', 'retired']),
|
|
20
|
+
'context': CONTEXT, 'previous_fingerprint': string()}),
|
|
21
|
+
}
|
|
22
|
+
DESCRIPTIONS = {
|
|
23
|
+
'experience_note': 'Plan/execute scoped conditional experience revisions, or get an owned/authorized record. Required record: contract_version,project_id,experience_id,revision,owner_binding_id,task_id,workspace_id,scope(task/project),state(proposed/active/paused/retired),problem,suggestion,applies_when,exclusions,reevaluate_when,evidence_refs,change_reason. Conditions use key/equals; source refs use exact reference_id/revision/content_sha256. Optional kind,rationale,bound_versions,decision_refs,rejected_alternatives. Requires explicit assignment experience_note; project scope requires governor. No executable commands or implicit task pause.',
|
|
24
|
+
'experience_feedback': 'Plan/execute own natural result for an exact experience revision. Record: contract_version,project_id,feedback_id,revision,owner_binding_id,task_id,workspace_id,experience_id,note_revision,outcome(helpful/failed/corrected/not_applicable/observation),summary,evidence_refs,change_reason. Requires explicit experience_feedback scope. Failed/corrected marks that revision for review, never pauses a task or a newer revision.',
|
|
25
|
+
'experience_query': 'Read bounded authorized conditional experience candidates, exact history or feedback. Default section=notes. Supply experience_id for feedback/history/get; supply feedback_id for feedback_get/feedback_history. Current context values carry exact source references; candidate means supplied-condition comparison, not verified effectiveness. missing_condition_groups distinguishes prerequisite, exclusion and recheck gaps without changing unknown. Missing sources, changed bound versions and counterevidence stay visible. No write, arbitrary file access or implied model adoption.',
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Local, opt-in project share notifications."""
|