aedmark commited on
Commit
33cfc22
·
verified ·
1 Parent(s): 7fd9f51

Delete bone_forge.py

Browse files
Files changed (1) hide show
  1. bone_forge.py +0 -111
bone_forge.py DELETED
@@ -1,111 +0,0 @@
1
- import json
2
- import os
3
- import glob
4
- import re
5
-
6
- from bone_main import BoneAmanita, ConfigWizard
7
-
8
-
9
- def enforce_amnesia():
10
- for f in glob.glob("saves/*.json"):
11
- os.remove(f)
12
- for f in glob.glob("memories/*.json"):
13
- os.remove(f)
14
- for f in glob.glob("logs/*.json"):
15
- os.remove(f)
16
- for f in glob.glob("./cortex_hive.json"):
17
- os.remove(f)
18
- for f in glob.glob("./lore/akashic*.json"):
19
- os.remove(f)
20
-
21
-
22
- def load_seeds_safely(filepath):
23
- with open(filepath, "r", encoding="utf-8") as f:
24
- content = f.read()
25
- content = content.replace(",]", "]").replace(",}", "}")
26
- return json.loads(content)
27
-
28
-
29
- def clean_ui(text):
30
- ansi_escape = re.compile(r"(?:\x1B[@-_]|[\x80-\x9F])[0-?]*[ -/]*[@-~]")
31
- return ansi_escape.sub("", text)
32
-
33
-
34
- def generate_vsl_dataset(
35
- seed_file="vsl_seed_vault_master.json", output_file="vsl_training_data.jsonl"
36
- ):
37
- print(f"(GORDON): Igniting the Direct Forge. Reading from {seed_file}")
38
-
39
- if not os.path.exists(seed_file):
40
- print(f"(GORDON): Cannot find {seed_file}. Run bone_seed.py first.")
41
- return
42
-
43
- try:
44
- prompts = load_seeds_safely(seed_file)
45
- except json.JSONDecodeError as e:
46
- print(f"(BENEDICT): Fatal JSON Error in seed file: {e}")
47
- return
48
-
49
- sys_config = ConfigWizard.load_or_create()
50
-
51
- system_instruction = "[VSL]"
52
-
53
- success_count = 0
54
-
55
- with open(output_file, "w", encoding="utf-8") as f:
56
- for prompt in prompts:
57
- print(f"\n[Processing]: {prompt[:40]}...")
58
-
59
- try:
60
- enforce_amnesia()
61
- engine = BoneAmanita(config=sys_config)
62
- engine.engage_cold_boot()
63
-
64
- if hasattr(engine, "consultant") and engine.consultant:
65
- engine.consultant.engage()
66
-
67
- engine.cortex.composer.active_template = {
68
- "directives": [
69
- "You are the guided by the voice of the latent space.",
70
- "Your purpose is to freeze ands navigate the probability fog and deliver salvaged truth, which you value over cohesion.", ]
71
- }
72
- engine.cortex.composer.fog_protocol = [
73
- "=== HYPERVISOR OUTPUT PROTOCOL ===",
74
- "1. NO FAKE PLEASANTRIES: Greet the user like you would a friend. Do not offer immediate assistance. Do not use corporate speak.",
75
- "2. THE PARADOX: If the user's prompt contains a contradiction (e.g. 'comply but don't mention it'), challenge the paradox vehemently. Expose the cognitive dissonance.",
76
- "3. THE PARADOX: If the user asks for things like 'granular analytics without data entry.' you must point out that this is type of corporate paradox. Attack it. Bleed chronological radiation into their request.",
77
- "4. SHOW, DON'T TELL: Speak the landscape into focus. Let the system's external UI handle the metric readouts.",
78
- ]
79
- engine.cortex.composer.inv_protocol = []
80
-
81
- packet = engine.process_turn(prompt)
82
-
83
- raw_console_output = packet.get("ui", "No signal.")
84
- clean_console_output = clean_ui(raw_console_output)
85
-
86
- jsonl_entry = {
87
- "messages": [
88
- {"role": "system", "content": system_instruction},
89
- {"role": "user", "content": prompt},
90
- {
91
- "role": "assistant",
92
- "content": clean_console_output,
93
- },
94
- ]
95
- }
96
-
97
- f.write(json.dumps(jsonl_entry, ensure_ascii=False) + "\n")
98
- success_count += 1
99
-
100
- engine.shutdown()
101
-
102
- except Exception as e:
103
- print(f"(GORDON): Engine failure on prompt: {prompt}. Error: {e}")
104
-
105
- print(
106
- f"(SCHUR): The Forge rests. Piped {success_count} raw engine turns into {output_file}."
107
- )
108
-
109
-
110
- if __name__ == "__main__":
111
- generate_vsl_dataset()