@mrciphersmith/keryx 0.4.48 → 0.4.50

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.
@@ -11172,6 +11172,11 @@ var init_catalog2 = __esm(() => {
11172
11172
  "Stop your own tree emitting and teaching the old name before anyone argues a removal date.",
11173
11173
  "Remove by refusing the name with the reason; move the schemaVersion when a payload field goes; identify a retired shipped file by content hash, not by name."
11174
11174
  ]),
11175
+ skill("openspec-read", "quality", ["recommended", "full"], "Browse OpenSpec requirements, changes, and source evidence in the current checkout.", [
11176
+ "List current specs, active changes, or archived changes by collection.",
11177
+ "Search the current checkout and open source sections with the reported digest.",
11178
+ "Cite repository-relative source paths and report incomplete results."
11179
+ ]),
11175
11180
  skill("test-gen", "quality", ["recommended", "full"], "Generate tests for a file or module using local patterns and existing test stack.", [
11176
11181
  "Discover test framework and nearby test examples.",
11177
11182
  "Generate tests that cover behavior, edge cases, and errors.",
@@ -11374,6 +11379,7 @@ var init_skill_length_ceilings = __esm(() => {
11374
11379
  "quality/fresh-eyes": 190,
11375
11380
  "quality/git-publish": 60,
11376
11381
  "quality/metaproject-security": 124,
11382
+ "quality/openspec-read": 36,
11377
11383
  "quality/perf-check": 104,
11378
11384
  "quality/pr-issue-documenter": 401,
11379
11385
  "quality/root-cause": 204,
@@ -14720,8 +14726,152 @@ var init_claude_settings_migration = __esm(() => {
14720
14726
  init_settings_json();
14721
14727
  });
14722
14728
 
14723
- // src/integrations/service.ts
14729
+ // src/gdgraph/data-dir.ts
14730
+ var init_data_dir = () => {};
14731
+
14732
+ // src/sync/provenance.ts
14733
+ var init_provenance = __esm(() => {
14734
+ init_fs();
14735
+ });
14736
+
14737
+ // src/gdgraph/staleness.ts
14738
+ var init_staleness = __esm(() => {
14739
+ init_provenance();
14740
+ });
14741
+
14742
+ // src/wiki/types.ts
14743
+ var WIKI_PAGE_TYPES, WIKI_PAGE_TYPE_VALUES;
14744
+ var init_types = __esm(() => {
14745
+ WIKI_PAGE_TYPES = [
14746
+ {
14747
+ type: "architecture",
14748
+ folder: "architecture",
14749
+ purpose: "system or module architecture"
14750
+ },
14751
+ {
14752
+ type: "domain-model",
14753
+ folder: "domain-models",
14754
+ purpose: "entities, invariants, relationships"
14755
+ },
14756
+ {
14757
+ type: "business-rule",
14758
+ folder: "business-rules",
14759
+ purpose: "business constraints and decisions"
14760
+ },
14761
+ {
14762
+ type: "user-scenario",
14763
+ folder: "user-scenarios",
14764
+ purpose: "user workflows and expected outcomes"
14765
+ },
14766
+ {
14767
+ type: "component",
14768
+ folder: "components",
14769
+ purpose: "UI/component behavior and ownership"
14770
+ },
14771
+ {
14772
+ type: "service",
14773
+ folder: "services",
14774
+ purpose: "backend/service responsibility and APIs"
14775
+ },
14776
+ {
14777
+ type: "integration",
14778
+ folder: "integrations",
14779
+ purpose: "external systems and contracts"
14780
+ },
14781
+ {
14782
+ type: "decision",
14783
+ folder: "decisions",
14784
+ purpose: "known decisions and ADR-like records"
14785
+ }
14786
+ ];
14787
+ WIKI_PAGE_TYPE_VALUES = WIKI_PAGE_TYPES.map((entry) => entry.type);
14788
+ });
14789
+
14790
+ // src/wiki/managed-block.ts
14791
+ var init_managed_block = () => {};
14792
+
14793
+ // src/wiki/page-invariants.ts
14794
+ var LEGACY_META_KEYS;
14795
+ var init_page_invariants = __esm(() => {
14796
+ init_managed_block();
14797
+ LEGACY_META_KEYS = new Set([
14798
+ "title",
14799
+ "version",
14800
+ "type",
14801
+ "status",
14802
+ "summary",
14803
+ "verifiedat",
14804
+ "verifiedscope",
14805
+ "validfrom",
14806
+ "validto",
14807
+ "supersededby"
14808
+ ]);
14809
+ });
14810
+
14811
+ // src/integrations/metaproject-explorer-contract.ts
14812
+ var METAPROJECT_EDGE_KINDS, METAPROJECT_EDGE_KINDS_V2, METAPROJECT_RESPONSE_BYTES_V2;
14813
+ var init_metaproject_explorer_contract = __esm(() => {
14814
+ METAPROJECT_EDGE_KINDS = ["imports", "asset", "describes", "links", "contains", "defines", "calls"];
14815
+ METAPROJECT_EDGE_KINDS_V2 = [...METAPROJECT_EDGE_KINDS, "changes-spec", "spec-context"];
14816
+ METAPROJECT_RESPONSE_BYTES_V2 = 1024 * 1024;
14817
+ });
14818
+
14819
+ // src/integrations/metaproject-projection.ts
14820
+ var init_metaproject_projection = __esm(() => {
14821
+ init_metaproject_explorer_contract();
14822
+ });
14823
+
14824
+ // src/openspec/catalog.ts
14825
+ var MAX_DISCOVERY_ENTRIES = 1e4, RESERVED_COLLECTION_ENTRIES, MAX_FILE_BYTES, MAX_TOTAL_BYTES;
14826
+ var init_catalog4 = __esm(() => {
14827
+ init_contained_read();
14828
+ RESERVED_COLLECTION_ENTRIES = Math.floor(MAX_DISCOVERY_ENTRIES / 3) - 1;
14829
+ MAX_FILE_BYTES = 1024 * 1024;
14830
+ MAX_TOTAL_BYTES = 64 * MAX_FILE_BYTES;
14831
+ });
14832
+
14833
+ // src/openspec/markdown.ts
14834
+ var init_markdown = () => {};
14835
+
14836
+ // src/openspec/service.ts
14837
+ var MAX_PAGE_BYTES, MAX_ARTIFACT_MARKDOWN_BYTES, MAX_DETAIL_METADATA_BYTES, MAX_DETAIL_DELTA_BYTES, MAX_DELTA_REQUIREMENTS_BYTES, MAX_HISTORY_ITEM_BYTES;
14724
14838
  var init_service = __esm(() => {
14839
+ init_catalog4();
14840
+ init_markdown();
14841
+ MAX_PAGE_BYTES = 900 * 1024;
14842
+ MAX_ARTIFACT_MARKDOWN_BYTES = 400 * 1024;
14843
+ MAX_DETAIL_METADATA_BYTES = 450 * 1024;
14844
+ MAX_DETAIL_DELTA_BYTES = 96 * 1024;
14845
+ MAX_DELTA_REQUIREMENTS_BYTES = 32 * 1024;
14846
+ MAX_HISTORY_ITEM_BYTES = 200 * 1024;
14847
+ });
14848
+
14849
+ // src/integrations/metaproject-explorer-v2.ts
14850
+ var CATALOG_METADATA_BYTES, SEARCH_ITEMS_BYTES;
14851
+ var init_metaproject_explorer_v2 = __esm(() => {
14852
+ init_service();
14853
+ init_metaproject_explorer_contract();
14854
+ init_metaproject_projection();
14855
+ CATALOG_METADATA_BYTES = 128 * 1024;
14856
+ SEARCH_ITEMS_BYTES = 900 * 1024;
14857
+ });
14858
+
14859
+ // src/integrations/metaproject-explorer.ts
14860
+ var MAX_FILE_BYTES2;
14861
+ var init_metaproject_explorer = __esm(() => {
14862
+ init_data_dir();
14863
+ init_staleness();
14864
+ init_contained_read();
14865
+ init_types();
14866
+ init_page_invariants();
14867
+ init_metaproject_explorer_contract();
14868
+ init_metaproject_projection();
14869
+ init_metaproject_explorer_v2();
14870
+ MAX_FILE_BYTES2 = 128 * 1024 * 1024;
14871
+ });
14872
+
14873
+ // src/integrations/service.ts
14874
+ var init_service2 = __esm(() => {
14725
14875
  init_registry();
14726
14876
  init_settings_file();
14727
14877
  init_settings_json();
@@ -14737,11 +14887,13 @@ var init_service = __esm(() => {
14737
14887
  init_install_state();
14738
14888
  init_installer();
14739
14889
  init_matrix();
14890
+ init_metaproject_explorer();
14891
+ init_metaproject_explorer_contract();
14740
14892
  });
14741
14893
 
14742
14894
  // src/integrations/index.ts
14743
14895
  var init_integrations = __esm(() => {
14744
- init_service();
14896
+ init_service2();
14745
14897
  });
14746
14898
 
14747
14899
  // src/security/audit-harness/surfaces.ts
@@ -16623,7 +16775,7 @@ var init_baseline2 = __esm(() => {
16623
16775
  var init_score = () => {};
16624
16776
 
16625
16777
  // src/security/audit-harness/types.ts
16626
- var init_types = () => {};
16778
+ var init_types2 = () => {};
16627
16779
 
16628
16780
  // src/security/audit-harness/proposals.ts
16629
16781
  var init_proposals = __esm(() => {
@@ -16643,10 +16795,10 @@ var init_audit_harness = __esm(() => {
16643
16795
  init_checks();
16644
16796
  init_baseline2();
16645
16797
  init_score();
16646
- init_types();
16798
+ init_types2();
16647
16799
  init_baseline2();
16648
16800
  init_proposals();
16649
- init_types();
16801
+ init_types2();
16650
16802
  init_checks();
16651
16803
  init_score();
16652
16804
  init_surfaces2();
@@ -16823,7 +16975,7 @@ function createSecurityService(cwd = process.cwd()) {
16823
16975
  };
16824
16976
  }
16825
16977
  var RECOGNIZED_GATES, NO_REPORT_REASON = "no security report; run `keryx security scan` first", UNUSABLE_REPORT_REASON = "security report unusable; re-run `keryx security scan`", INCOMPLETE_COVERAGE_REASON = "security gate: incomplete (coverage incomplete)";
16826
- var init_service2 = __esm(() => {
16978
+ var init_service3 = __esm(() => {
16827
16979
  init_output_validation();
16828
16980
  init_fs();
16829
16981
  init_config();
@@ -17732,7 +17884,7 @@ ${message.content}` });
17732
17884
  }
17733
17885
  var TRANSIENT_IN_BAND_ERROR_STATUS, MAX_ERROR_REASON_CHARS = 300, DEFAULT_STREAM_TIMEOUT_MS2 = 120000, COMPAT_REPLAY_PROVIDER_ID = "openai-compat", READ_TIMED_OUT2;
17734
17886
  var init_openai_compat_provider = __esm(() => {
17735
- init_service2();
17887
+ init_service3();
17736
17888
  init_guard();
17737
17889
  init_provider_port();
17738
17890
  init_think_tag_stripper();
@@ -19490,7 +19642,7 @@ function hostQuestionFields(source) {
19490
19642
  return source?.hostQuestion === undefined ? {} : { hostQuestion: source.hostQuestion };
19491
19643
  }
19492
19644
  var HOST_QUESTION_SOURCES, REVIEW_FINDING_SEVERITIES, FINDING_DISPOSITION_STATES, FINDING_DISMISSAL_STATES, VERIFICATION_VERDICTS, VERIFICATION_METHODS, REASONING_CAPPED_VERDICT = "unverifiable", DEFAULT_VERIFICATION_MODE = "annotate", PREMISE_VERDICTS, HELD_PREMISE_VERDICTS;
19493
- var init_types2 = __esm(() => {
19645
+ var init_types3 = __esm(() => {
19494
19646
  HOST_QUESTION_SOURCES = ["claude-code", "codex", "keryx-shell", "helyx-poll", "other"];
19495
19647
  REVIEW_FINDING_SEVERITIES = ["blocker", "major", "minor", "info"];
19496
19648
  FINDING_DISPOSITION_STATES = [
@@ -19827,7 +19979,7 @@ var init_blind = __esm(() => {
19827
19979
  // src/decisions/text.ts
19828
19980
  var MAX_OPERATOR_TEXT_LENGTH = 2000;
19829
19981
  var init_text = __esm(() => {
19830
- init_service2();
19982
+ init_service3();
19831
19983
  init_secret_shape();
19832
19984
  });
19833
19985
 
@@ -19954,7 +20106,7 @@ var init_followup = __esm(() => {
19954
20106
  });
19955
20107
 
19956
20108
  // src/decisions/service.ts
19957
- var init_service3 = __esm(() => {
20109
+ var init_service4 = __esm(() => {
19958
20110
  init_report2();
19959
20111
  init_arms();
19960
20112
  init_quality();
@@ -20126,7 +20278,7 @@ function desktopQuestionRun(cwd, env = process.env) {
20126
20278
  }
20127
20279
  var ENV_AUTONOMOUS_ANSWERS_FILE = "KERYX_AUTONOMOUS_ANSWERS_FILE";
20128
20280
  var init_autonomous_answers = __esm(() => {
20129
- init_service3();
20281
+ init_service4();
20130
20282
  init_arbiter_floor();
20131
20283
  });
20132
20284
 
@@ -20928,7 +21080,7 @@ var init_blast_radius = __esm(() => {
20928
21080
  init_symbol_reach();
20929
21081
  init_selection();
20930
21082
  init_scope();
20931
- init_types2();
21083
+ init_types3();
20932
21084
  REASONED_DROP_REASONS = ["unrelated-symbol", "hub-damped", "text-hub", "test-consumer"];
20933
21085
  });
20934
21086
 
@@ -21373,7 +21525,7 @@ var init_guard2 = __esm(() => {
21373
21525
  init_fs();
21374
21526
  init_json();
21375
21527
  init_config();
21376
- init_service2();
21528
+ init_service3();
21377
21529
  init_resolve();
21378
21530
  ALLOW_DECISION = { gate: "pass", action: "allow", findings: [] };
21379
21531
  INCOMPLETE_DECISION = {
@@ -22551,7 +22703,7 @@ var init_operator_decisions = __esm(() => {
22551
22703
  init_completion_lock();
22552
22704
  init_fs();
22553
22705
  init_json();
22554
- init_types2();
22706
+ init_types3();
22555
22707
  OPERATOR_DECISION_KINDS = ["mutation-waiver", "reviewer-override"];
22556
22708
  VIAS = ["tui-card", "remote-card", "terminal", "host-question"];
22557
22709
  });
@@ -23866,7 +24018,7 @@ var init_coverage_complete = __esm(() => {
23866
24018
  init_chunks();
23867
24019
  init_blast_radius();
23868
24020
  init_coverage();
23869
- init_types2();
24021
+ init_types3();
23870
24022
  init_json();
23871
24023
  });
23872
24024
 
@@ -23939,7 +24091,7 @@ var init_estimate = __esm(() => {
23939
24091
  init_slice_routing();
23940
24092
  init_waves();
23941
24093
  init_round_split();
23942
- init_types2();
24094
+ init_types3();
23943
24095
  });
23944
24096
 
23945
24097
  // src/review/layers-usage.ts
@@ -24628,7 +24780,7 @@ function isMethod(value) {
24628
24780
  }
24629
24781
  var VERIFICATION_CLAIM_PROPERTIES;
24630
24782
  var init_verification = __esm(() => {
24631
- init_types2();
24783
+ init_types3();
24632
24784
  VERIFICATION_CLAIM_PROPERTIES = [
24633
24785
  "finding",
24634
24786
  "verdict",
@@ -25031,7 +25183,7 @@ function applyPremiseDecisions(findings, decisions) {
25031
25183
  var PREMISE_CLAIM_PROPERTIES, PREMISE_FILE_PROPERTIES, PREMISES_FILE = "research-evidence/premises.json", isRecord4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value), present = (value) => typeof value === "string" && value.trim() !== "", MALFORMED_CLAIM, UNNAMED_CLAIM = "<unnamed>", SECURITY_REVIEWER = "review-security-code", DOWNGRADE_TARGETS, RESOLVED_DISPOSITIONS, CARRIED_PREMISE_CONTEXT;
25032
25184
  var init_premise = __esm(() => {
25033
25185
  init_verification();
25034
- init_types2();
25186
+ init_types3();
25035
25187
  PREMISE_CLAIM_PROPERTIES = [
25036
25188
  "finding_id",
25037
25189
  "verdict",
@@ -25579,7 +25731,7 @@ var init_autonomous_profile = __esm(() => {
25579
25731
  var init_autonomous_summary = __esm(() => {
25580
25732
  init_autonomous_profile();
25581
25733
  init_run_usage();
25582
- init_types2();
25734
+ init_types3();
25583
25735
  });
25584
25736
 
25585
25737
  // src/review/desk-run-types.ts
@@ -25642,7 +25794,7 @@ function classForType(type) {
25642
25794
  return MEMORY_CLASS_MAP[type] ?? "semantic";
25643
25795
  }
25644
25796
  var MEMORY_TYPES, MEMORY_TYPE_VALUES, MEMORY_CLASS_VALUES, MEMORY_CLASS_MAP;
25645
- var init_types3 = __esm(() => {
25797
+ var init_types4 = __esm(() => {
25646
25798
  MEMORY_TYPES = [
25647
25799
  { type: "lesson", folder: "lessons" },
25648
25800
  { type: "decision", folder: "decisions" },
@@ -25915,7 +26067,7 @@ var init_store3 = __esm(() => {
25915
26067
  init_keryx_home();
25916
26068
  init_text_lines();
25917
26069
  init_harness_identity();
25918
- init_types3();
26070
+ init_types4();
25919
26071
  MEMORY_TYPE_FOLDERS = new Set(MEMORY_TYPES.map((entry) => entry.folder));
25920
26072
  MEMORY_SCAFFOLD_TOP_LEVEL_FILES = new Set(["index.md", "README.md"]);
25921
26073
  STRICT_UTF8_DECODER = new TextDecoder("utf-8", { fatal: true });
@@ -25935,25 +26087,12 @@ var init_store3 = __esm(() => {
25935
26087
  GENERIC_KEY_LINE_RE = /^\s*(.*?)\s*:\s*(.*)$/;
25936
26088
  });
25937
26089
 
25938
- // src/gdgraph/data-dir.ts
25939
- var init_data_dir = () => {};
25940
-
25941
26090
  // src/gdgraph/config.ts
25942
26091
  var init_config2 = __esm(() => {
25943
26092
  init_fs();
25944
26093
  init_json();
25945
26094
  });
25946
26095
 
25947
- // src/sync/provenance.ts
25948
- var init_provenance = __esm(() => {
25949
- init_fs();
25950
- });
25951
-
25952
- // src/gdgraph/staleness.ts
25953
- var init_staleness = __esm(() => {
25954
- init_provenance();
25955
- });
25956
-
25957
26096
  // src/memory/temporal.ts
25958
26097
  var init_temporal = () => {};
25959
26098
 
@@ -25983,59 +26122,11 @@ var init_provenance2 = __esm(() => {
25983
26122
  init_staleness2();
25984
26123
  });
25985
26124
 
25986
- // src/wiki/types.ts
25987
- var WIKI_PAGE_TYPES, WIKI_PAGE_TYPE_VALUES;
25988
- var init_types4 = __esm(() => {
25989
- WIKI_PAGE_TYPES = [
25990
- {
25991
- type: "architecture",
25992
- folder: "architecture",
25993
- purpose: "system or module architecture"
25994
- },
25995
- {
25996
- type: "domain-model",
25997
- folder: "domain-models",
25998
- purpose: "entities, invariants, relationships"
25999
- },
26000
- {
26001
- type: "business-rule",
26002
- folder: "business-rules",
26003
- purpose: "business constraints and decisions"
26004
- },
26005
- {
26006
- type: "user-scenario",
26007
- folder: "user-scenarios",
26008
- purpose: "user workflows and expected outcomes"
26009
- },
26010
- {
26011
- type: "component",
26012
- folder: "components",
26013
- purpose: "UI/component behavior and ownership"
26014
- },
26015
- {
26016
- type: "service",
26017
- folder: "services",
26018
- purpose: "backend/service responsibility and APIs"
26019
- },
26020
- {
26021
- type: "integration",
26022
- folder: "integrations",
26023
- purpose: "external systems and contracts"
26024
- },
26025
- {
26026
- type: "decision",
26027
- folder: "decisions",
26028
- purpose: "known decisions and ADR-like records"
26029
- }
26030
- ];
26031
- WIKI_PAGE_TYPE_VALUES = WIKI_PAGE_TYPES.map((entry) => entry.type);
26032
- });
26033
-
26034
26125
  // src/wiki/collect.ts
26035
26126
  var init_collect = __esm(() => {
26036
26127
  init_fs();
26037
26128
  init_provenance2();
26038
- init_types4();
26129
+ init_types();
26039
26130
  });
26040
26131
 
26041
26132
  // src/wiki/section-marker.ts
@@ -26378,7 +26469,7 @@ var init_external_providers = __esm(() => {
26378
26469
  var JEV_RETRYABLE_STATUSES;
26379
26470
  var init_jev_client = __esm(() => {
26380
26471
  init_shell_config();
26381
- init_service2();
26472
+ init_service3();
26382
26473
  init_external_switch();
26383
26474
  init_external_providers();
26384
26475
  JEV_RETRYABLE_STATUSES = new Set([429, 500, 502, 503, 504]);
@@ -26391,7 +26482,7 @@ var init_routing_request = () => {};
26391
26482
  var init_classifier_adapters = __esm(() => {
26392
26483
  init_single_turn();
26393
26484
  init_jev_client();
26394
- init_service2();
26485
+ init_service3();
26395
26486
  init_model_class();
26396
26487
  init_routing_request();
26397
26488
  init_table();
@@ -26400,7 +26491,7 @@ var init_classifier_adapters = __esm(() => {
26400
26491
  // src/harness/decision/jev-classifier.ts
26401
26492
  var init_jev_classifier = __esm(() => {
26402
26493
  init_jev_client();
26403
- init_service2();
26494
+ init_service3();
26404
26495
  });
26405
26496
 
26406
26497
  // src/harness/routing/classifier-production.ts
@@ -27171,7 +27262,7 @@ function validateMemoryConfig(config) {
27171
27262
  var MAX_GENERAL_RESULTS = 100, MAX_AUTOMATIC_RESULTS = 20, MemoryValidationError;
27172
27263
  var init_validation = __esm(() => {
27173
27264
  init_temporal();
27174
- init_types3();
27265
+ init_types4();
27175
27266
  MemoryValidationError = class MemoryValidationError extends Error {
27176
27267
  field;
27177
27268
  action;
@@ -27363,7 +27454,7 @@ function message(cause) {
27363
27454
  var init_write = __esm(() => {
27364
27455
  init_guard2();
27365
27456
  init_store3();
27366
- init_types3();
27457
+ init_types4();
27367
27458
  });
27368
27459
  // src/memory/embedding/index.ts
27369
27460
  var init_embedding = __esm(() => {
@@ -27376,13 +27467,13 @@ var init_check = __esm(() => {
27376
27467
  init_store3();
27377
27468
  init_cross_layer();
27378
27469
  init_dedup();
27379
- init_types3();
27470
+ init_types4();
27380
27471
  });
27381
27472
 
27382
27473
  // src/memory/ingest.ts
27383
27474
  var init_ingest = __esm(() => {
27384
27475
  init_fs();
27385
- init_types3();
27476
+ init_types4();
27386
27477
  init_store3();
27387
27478
  init_dedup();
27388
27479
  init_write();
@@ -27390,7 +27481,7 @@ var init_ingest = __esm(() => {
27390
27481
 
27391
27482
  // src/memory/search.ts
27392
27483
  var init_search = __esm(() => {
27393
- init_types3();
27484
+ init_types4();
27394
27485
  init_lifecycle();
27395
27486
  init_temporal();
27396
27487
  init_validation();
@@ -27418,11 +27509,11 @@ var CONTROL_OR_LINE_BREAK_RE;
27418
27509
  var init_templates = __esm(() => {
27419
27510
  init_text_lines();
27420
27511
  init_store3();
27421
- init_types3();
27512
+ init_types4();
27422
27513
  CONTROL_OR_LINE_BREAK_RE = new RegExp("[\\u0000-\\u001F\\u007F\\u2028\\u2029]");
27423
27514
  });
27424
27515
  // src/memory/service.ts
27425
- var init_service4 = __esm(() => {
27516
+ var init_service5 = __esm(() => {
27426
27517
  init_fs();
27427
27518
  init_seam();
27428
27519
  init_config4();
@@ -27438,7 +27529,7 @@ var init_service4 = __esm(() => {
27438
27529
  init_templates();
27439
27530
  init_harness_identity();
27440
27531
  init_embedding();
27441
- init_types3();
27532
+ init_types4();
27442
27533
  init_embedding();
27443
27534
  });
27444
27535
 
@@ -27448,7 +27539,7 @@ var init_ask2 = __esm(() => {
27448
27539
  init_config4();
27449
27540
  init_embedding();
27450
27541
  init_lifecycle();
27451
- init_service4();
27542
+ init_service5();
27452
27543
  init_store3();
27453
27544
  init_temporal();
27454
27545
  init_collect();
@@ -27811,27 +27902,6 @@ var init_history = __esm(() => {
27811
27902
  ROW = /^\|\s*v(\d+)[^|]*\|\s*([^|]+?)\s*\|\s*([^|]+?)\s*\|\s*([^|]+?)\s*\|\s*([^|]+?)\s*\|\s*(.+?)\s*\|\s*$/;
27812
27903
  });
27813
27904
 
27814
- // src/wiki/managed-block.ts
27815
- var init_managed_block = () => {};
27816
-
27817
- // src/wiki/page-invariants.ts
27818
- var LEGACY_META_KEYS;
27819
- var init_page_invariants = __esm(() => {
27820
- init_managed_block();
27821
- LEGACY_META_KEYS = new Set([
27822
- "title",
27823
- "version",
27824
- "type",
27825
- "status",
27826
- "summary",
27827
- "verifiedat",
27828
- "verifiedscope",
27829
- "validfrom",
27830
- "validto",
27831
- "supersededby"
27832
- ]);
27833
- });
27834
-
27835
27905
  // src/wiki/readme-links.ts
27836
27906
  var init_readme_links = () => {};
27837
27907
 
@@ -27840,7 +27910,7 @@ var init_think_tags = () => {};
27840
27910
 
27841
27911
  // src/wiki/templates.ts
27842
27912
  var init_templates2 = __esm(() => {
27843
- init_types4();
27913
+ init_types();
27844
27914
  });
27845
27915
 
27846
27916
  // src/wiki/page-groups.ts
@@ -27849,7 +27919,7 @@ var init_page_groups = __esm(() => {
27849
27919
  });
27850
27920
 
27851
27921
  // src/wiki/service.ts
27852
- var init_service5 = __esm(() => {
27922
+ var init_service6 = __esm(() => {
27853
27923
  init_data_dir();
27854
27924
  init_fs();
27855
27925
  init_guard2();
@@ -27865,7 +27935,7 @@ var init_service5 = __esm(() => {
27865
27935
  init_staleness2();
27866
27936
  init_think_tags();
27867
27937
  init_templates2();
27868
- init_types4();
27938
+ init_types();
27869
27939
  init_history();
27870
27940
  init_page_groups();
27871
27941
  });
@@ -28109,7 +28179,7 @@ init_git_worktrees();
28109
28179
  init_completion_lock();
28110
28180
 
28111
28181
  // src/review/completion-host.ts
28112
- init_types2();
28182
+ init_types3();
28113
28183
 
28114
28184
  // src/review/managed.ts
28115
28185
  init_run_profile();
@@ -28349,7 +28419,7 @@ init_research();
28349
28419
  // src/review/readiness.ts
28350
28420
  init_coverage();
28351
28421
  init_completion_lock();
28352
- init_types2();
28422
+ init_types3();
28353
28423
  init_shell_quote();
28354
28424
  init_tests_to_run();
28355
28425
  init_fs();
@@ -28378,7 +28448,7 @@ init_premise();
28378
28448
  init_verdict();
28379
28449
  init_research();
28380
28450
  init_scope();
28381
- init_types2();
28451
+ init_types3();
28382
28452
  var READINESS_ITEMS = [
28383
28453
  { number: 1, id: "files-covered", title: "every changed file is covered by a wave or a recorded waiver" },
28384
28454
  { number: 2, id: "blast-radius", title: "no file the blast radius cut is left unreviewed" },
@@ -28762,7 +28832,7 @@ init_verification();
28762
28832
 
28763
28833
  // src/review/pr-comments.ts
28764
28834
  init_fs();
28765
- init_types2();
28835
+ init_types3();
28766
28836
  var SEVERITY_SET = new Set(["blocker", "major", "minor", "info"]);
28767
28837
  var KNOWN_REVIEW_STATES = new Set(["APPROVED", "CHANGES_REQUESTED", "COMMENTED", "DISMISSED", "PENDING"]);
28768
28838
 
@@ -28771,7 +28841,7 @@ init_blast_radius();
28771
28841
 
28772
28842
  // src/review/degradation.ts
28773
28843
  init_blast_radius();
28774
- init_types2();
28844
+ init_types3();
28775
28845
 
28776
28846
  // src/review/caps.ts
28777
28847
  var CORE_REVIEWERS = new Set([
@@ -28795,7 +28865,7 @@ var SUPPORT_REVIEWERS = new Set([
28795
28865
  ]);
28796
28866
  // src/review/dedupe.ts
28797
28867
  init_premise();
28798
- init_types2();
28868
+ init_types3();
28799
28869
  var STOPWORDS = new Set("the and for but not with this that from into when then than are was were has have had can could would should will its it's their there here which what who whose does did doing done any all one two only also each every other same such very more most less least just like been being use used uses using".split(" "));
28800
28870
 
28801
28871
  // src/review/managed.ts
@@ -28895,7 +28965,7 @@ var PUBLICATION_REQUEST_LIMIT = 1024 * 1024;
28895
28965
  init_desk_run_types();
28896
28966
 
28897
28967
  // src/review/desk-public-text.ts
28898
- init_service2();
28968
+ init_service3();
28899
28969
 
28900
28970
  // src/review/reviewer-activity.ts
28901
28971
  init_run_usage();
@@ -28945,7 +29015,7 @@ init_fs();
28945
29015
  init_store3();
28946
29016
 
28947
29017
  // src/review/managed.ts
28948
- init_types2();
29018
+ init_types3();
28949
29019
  var BLAST_RADIUS_ARTIFACT = "blast-radius.json";
28950
29020
  async function reviewCompletionBlockers(packageDir) {
28951
29021
  const missing = await missingArtifacts(packageDir);
@@ -30739,7 +30809,7 @@ init_fs();
30739
30809
  init_chunks();
30740
30810
  init_blast_radius();
30741
30811
  init_json();
30742
- init_types2();
30812
+ init_types3();
30743
30813
  var AUTOMATIC_REVIEW_DISCLOSURE_FILE = "automatic-run-inputs.json";
30744
30814
 
30745
30815
  // src/commands/automatic-review.ts
@@ -31567,7 +31637,7 @@ init_json();
31567
31637
  init_command_risk();
31568
31638
  init_shell_syntax();
31569
31639
  init_fs();
31570
- init_service2();
31640
+ init_service3();
31571
31641
  // src/impact-evidence/host.ts
31572
31642
  init_integrations();
31573
31643
  // src/learning/confidence.ts
@@ -31577,7 +31647,7 @@ var ROUND_FACTOR = 10 ** ROUND_DECIMALS;
31577
31647
  init_fs();
31578
31648
  // src/learning/scan.ts
31579
31649
  init_config();
31580
- init_service2();
31650
+ init_service3();
31581
31651
  var configLoaders = new Map;
31582
31652
  // src/learning/observe.ts
31583
31653
  init_fs();
@@ -31832,7 +31902,7 @@ function parseSubmitResultInput(raw) {
31832
31902
  }
31833
31903
 
31834
31904
  // src/commands/agent.ts
31835
- init_service3();
31905
+ init_service4();
31836
31906
  init_arbiter_floor();
31837
31907
 
31838
31908
  // src/harness/child/quarantine.ts
@@ -32779,6 +32849,7 @@ function readJsonl(file) {
32779
32849
  out.push({
32780
32850
  role: o.role,
32781
32851
  content: o.content,
32852
+ ...o.role === "user" && o.source === "telegram" ? { source: o.source } : {},
32782
32853
  ...o.provenance === "trusted" || o.provenance === "project" || o.provenance === "model" || o.provenance === "tool" || o.provenance === "harness" ? { provenance: o.provenance } : {},
32783
32854
  ...o.injected === true ? { injected: true } : {},
32784
32855
  ...toolCalls !== undefined ? { toolCalls } : {},
@@ -33240,7 +33311,7 @@ function estimateRemainingRounds(opts) {
33240
33311
  }
33241
33312
 
33242
33313
  // src/session/slate-frame.ts
33243
- init_service2();
33314
+ init_service3();
33244
33315
 
33245
33316
  // src/gdgraph/build.ts
33246
33317
  init_data_dir();
@@ -35934,7 +36005,7 @@ function createRealMemoryOwnerWriter(cwd, opts) {
35934
36005
  }
35935
36006
 
35936
36007
  // src/sac/wiki-owner-writer.ts
35937
- init_service5();
36008
+ init_service6();
35938
36009
  init_guard2();
35939
36010
  import { readFile as readFile42 } from "fs/promises";
35940
36011
  import path90 from "path";
@@ -37253,7 +37324,7 @@ async function recordSlateSessionTrail(ref, entry) {
37253
37324
  }
37254
37325
 
37255
37326
  // src/harness/tool/builtin/slate-memory-tools.ts
37256
- init_service2();
37327
+ init_service3();
37257
37328
  init_slate();
37258
37329
  var WORKING_MEMORY_TOOL_NAMES = ["slate_note", "slate_trail", "recall_step", "history_search"];
37259
37330
 
@@ -38308,7 +38379,13 @@ ${scrub(fire.additionalContext.join(`
38308
38379
 
38309
38380
  ${AUTOMATIC_REVIEW_NOTE}`;
38310
38381
  }
38311
- history.push({ role: "user", content: effectivePrompt, provenance: "project", ts: now() });
38382
+ history.push({
38383
+ role: "user",
38384
+ content: effectivePrompt,
38385
+ provenance: "project",
38386
+ ts: now(),
38387
+ ...options.source === undefined ? {} : { source: options.source }
38388
+ });
38312
38389
  io.onHistoryChange?.("user");
38313
38390
  }
38314
38391
  const signal = options.signal;