okstra 0.200.0 → 0.200.1
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.
package/package.json
CHANGED
package/runtime/BUILD.json
CHANGED
|
@@ -44,15 +44,15 @@ packet. The packet contains the task brief, analysis packet, report template,
|
|
|
44
44
|
report schema, convergence state, every successful settled worker result recorded
|
|
45
45
|
by the run manifest, accumulated `user-responses/` sidecars, and the current
|
|
46
46
|
session/token/cost accounting snapshot. Each file-backed source carries its owner,
|
|
47
|
-
project-relative path
|
|
47
|
+
project-relative path and value. The report writer receives the
|
|
48
48
|
packet's Markdown reading projection as the only task input instead of an
|
|
49
49
|
independently assembled list of raw paths.
|
|
50
50
|
|
|
51
51
|
The packet's authoring contract names the result path, narrative format, writing
|
|
52
52
|
instructions, runtime-owned content, and validation rules. Missing configured
|
|
53
53
|
paths and missing files are collected across the full source set before dispatch
|
|
54
|
-
and reported together with their owners. Report assembly
|
|
55
|
-
|
|
54
|
+
and reported together with their owners. Report assembly checks source availability
|
|
55
|
+
and readability without rejecting changed content or comparing hashes.
|
|
56
56
|
This is enforced by
|
|
57
57
|
`initial_prompt_materialization._materialize_report_writer_packet()`,
|
|
58
58
|
`report_synthesis_packet.build_report_synthesis_packet()`, and
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
4
|
import copy
|
|
5
|
-
import hashlib
|
|
6
5
|
import json
|
|
7
6
|
import os
|
|
8
7
|
import re
|
|
@@ -54,7 +53,6 @@ class ReportSynthesisSource:
|
|
|
54
53
|
label: str
|
|
55
54
|
owner: str
|
|
56
55
|
path: str
|
|
57
|
-
digest: str
|
|
58
56
|
content: str
|
|
59
57
|
|
|
60
58
|
def to_dict(self) -> dict[str, str]:
|
|
@@ -62,7 +60,6 @@ class ReportSynthesisSource:
|
|
|
62
60
|
"label": self.label,
|
|
63
61
|
"owner": self.owner,
|
|
64
62
|
"path": self.path,
|
|
65
|
-
"digest": self.digest,
|
|
66
63
|
"content": self.content,
|
|
67
64
|
}
|
|
68
65
|
|
|
@@ -282,7 +279,6 @@ class ReportSynthesisPacket:
|
|
|
282
279
|
"user response carry-in",
|
|
283
280
|
],
|
|
284
281
|
"validationRules": [
|
|
285
|
-
"source-digest-match",
|
|
286
282
|
"writer-owned-fields-only",
|
|
287
283
|
"all-defects-collected",
|
|
288
284
|
*self._carry_validation_rules(),
|
|
@@ -307,7 +303,7 @@ class ReportSynthesisPacket:
|
|
|
307
303
|
"- Runtime-owned values: session identifiers, token usage, estimated cost, "
|
|
308
304
|
"user response carry-in",
|
|
309
305
|
"- Accounting details stay in the JSON snapshot; assembly supplies them.",
|
|
310
|
-
"- Validation:
|
|
306
|
+
"- Validation: writer-owned fields, all defects collected",
|
|
311
307
|
]
|
|
312
308
|
# 작성자가 실제로 읽는 것은 마크다운이다. JSON 정본에만 실으면 지시가
|
|
313
309
|
# 도달하지 않는다.
|
|
@@ -351,8 +347,7 @@ def _source_markdown(
|
|
|
351
347
|
if content != source.content.rstrip("\n"):
|
|
352
348
|
view = [
|
|
353
349
|
"- View: repeated extracts refer to frozen sources below; "
|
|
354
|
-
"the original line index is omitted.
|
|
355
|
-
"the frozen original.",
|
|
350
|
+
"the original line index is omitted.",
|
|
356
351
|
]
|
|
357
352
|
if source.label == "Final report schema":
|
|
358
353
|
try:
|
|
@@ -361,7 +356,7 @@ def _source_markdown(
|
|
|
361
356
|
schema = {}
|
|
362
357
|
view = ["- View: schema is not JSON; the original text is retained."]
|
|
363
358
|
if isinstance(schema, dict) and schema.get("properties"):
|
|
364
|
-
#
|
|
359
|
+
# 원본은 JSON 보관본에 남긴다. 저작용 읽기에는 검증기와
|
|
365
360
|
# 같은 소유권 투영을 쓰고, 도달하지 않는 정의만 기존 발췌기로 뺀다.
|
|
366
361
|
owned = writer_owned_schema(schema)
|
|
367
362
|
# 부분 서사 검증에서 빠지는 루트 조건도 작성 지침에는 남긴다.
|
|
@@ -374,8 +369,8 @@ def _source_markdown(
|
|
|
374
369
|
excerpt = build_schema_excerpt(owned, task_type)
|
|
375
370
|
content = json.dumps(excerpt, ensure_ascii=False, indent=2)
|
|
376
371
|
view = [
|
|
377
|
-
"- View: writer-owned schema excerpt
|
|
378
|
-
"
|
|
372
|
+
"- View: writer-owned schema excerpt. "
|
|
373
|
+
"Task-specific requirements are listed above.",
|
|
379
374
|
]
|
|
380
375
|
longest = max((len(run) for run in re.findall(r"`+", content)), default=0)
|
|
381
376
|
fence = "`" * max(3, longest + 1)
|
|
@@ -385,7 +380,6 @@ def _source_markdown(
|
|
|
385
380
|
"",
|
|
386
381
|
f"- Owner: `{source.owner}`",
|
|
387
382
|
f"- Path: `{source.path}`",
|
|
388
|
-
f"- Digest: `{source.digest}`",
|
|
389
383
|
*view,
|
|
390
384
|
"",
|
|
391
385
|
f"{fence}text",
|
|
@@ -700,13 +694,11 @@ def _read_sources(
|
|
|
700
694
|
except (OSError, UnicodeError) as exc:
|
|
701
695
|
issues.append(ReportSynthesisPacketIssue(owner, label, path, str(exc)))
|
|
702
696
|
continue
|
|
703
|
-
digest = "sha256:" + hashlib.sha256(content.encode("utf-8")).hexdigest()
|
|
704
697
|
sources.append(
|
|
705
698
|
ReportSynthesisSource(
|
|
706
699
|
label=label,
|
|
707
700
|
owner=owner,
|
|
708
701
|
path=_relative(project_root, path),
|
|
709
|
-
digest=digest,
|
|
710
702
|
content=content,
|
|
711
703
|
)
|
|
712
704
|
)
|
|
@@ -929,18 +921,8 @@ def verify_report_synthesis_packet_sources(
|
|
|
929
921
|
)
|
|
930
922
|
continue
|
|
931
923
|
try:
|
|
932
|
-
|
|
924
|
+
path.read_text(encoding="utf-8")
|
|
933
925
|
except (OSError, UnicodeError) as exc:
|
|
934
926
|
issues.append(ReportSynthesisPacketIssue(owner, label, path, str(exc)))
|
|
935
927
|
continue
|
|
936
|
-
digest = "sha256:" + hashlib.sha256(content.encode("utf-8")).hexdigest()
|
|
937
|
-
if digest != source.get("digest"):
|
|
938
|
-
issues.append(
|
|
939
|
-
ReportSynthesisPacketIssue(
|
|
940
|
-
owner,
|
|
941
|
-
label,
|
|
942
|
-
path,
|
|
943
|
-
"source value changed after packet materialization",
|
|
944
|
-
)
|
|
945
|
-
)
|
|
946
928
|
return tuple(issues)
|