rubik 0.9.0 → 0.10.0

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.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/ATTRIBUTION.md +1 -1
  3. data/CHANGELOG.md +250 -43
  4. data/README.md +5 -1
  5. data/lib/rubik/adapter/base.rb +21 -1
  6. data/lib/rubik/adapter/generic.rb +0 -14
  7. data/lib/rubik/adapter/node.rb +2 -0
  8. data/lib/rubik/adapter/process.rb +28 -67
  9. data/lib/rubik/ast/treesitter/zig_walker.rb +15 -2
  10. data/lib/rubik/benchmark/vakanuvis_adoption.rb +10 -3
  11. data/lib/rubik/buffer/apply_contract.rb +3 -3
  12. data/lib/rubik/buffer/apply_transaction.rb +165 -0
  13. data/lib/rubik/buffer/manager.rb +26 -120
  14. data/lib/rubik/cli/workspace_trust.rb +16 -0
  15. data/lib/rubik/config/deep_ops.rb +4 -1
  16. data/lib/rubik/config/defaults.rb +29 -3
  17. data/lib/rubik/config/schema.rb +8 -0
  18. data/lib/rubik/config/secret_policy.rb +197 -0
  19. data/lib/rubik/config/store.rb +14 -0
  20. data/lib/rubik/config.rb +11 -0
  21. data/lib/rubik/diagnostics/collector.rb +0 -9
  22. data/lib/rubik/errors.rb +15 -0
  23. data/lib/rubik/event_bus.rb +2 -1
  24. data/lib/rubik/kernel/dispatcher.rb +16 -11
  25. data/lib/rubik/kernel/unit.rb +4 -1
  26. data/lib/rubik/llm/registry.rb +12 -9
  27. data/lib/rubik/llm/router.rb +2 -5
  28. data/lib/rubik/log.rb +23 -1
  29. data/lib/rubik/lsp/client.rb +152 -445
  30. data/lib/rubik/lsp/document_store.rb +209 -0
  31. data/lib/rubik/lsp/manager.rb +14 -10
  32. data/lib/rubik/lsp/transport.rb +365 -0
  33. data/lib/rubik/mcp/boot_lifecycle.rb +6 -2
  34. data/lib/rubik/mcp/boot_run.rb +190 -0
  35. data/lib/rubik/mcp/client.rb +4 -3
  36. data/lib/rubik/mcp/manager.rb +46 -165
  37. data/lib/rubik/mcp/transport/stdio.rb +55 -10
  38. data/lib/rubik/orchestrator/auto_apply.rb +4 -3
  39. data/lib/rubik/orchestrator/continuation_manager.rb +3 -22
  40. data/lib/rubik/orchestrator/goal_session.rb +519 -0
  41. data/lib/rubik/orchestrator/loop.rb +28 -47
  42. data/lib/rubik/orchestrator/maestro_gate.rb +5 -7
  43. data/lib/rubik/orchestrator/provider_recovery.rb +4 -2
  44. data/lib/rubik/orchestrator/provider_resolver.rb +4 -2
  45. data/lib/rubik/orchestrator/resume_window.rb +96 -0
  46. data/lib/rubik/orchestrator/shell_deps.rb +16 -0
  47. data/lib/rubik/orchestrator/stream_manager.rb +2 -1
  48. data/lib/rubik/orchestrator/subagent/deferred_spec.rb +4 -1
  49. data/lib/rubik/orchestrator/subagent/instance.rb +11 -12
  50. data/lib/rubik/orchestrator/subagent/journal.rb +2 -1
  51. data/lib/rubik/orchestrator/subagent/lifecycle.rb +3 -1
  52. data/lib/rubik/orchestrator/subagent/questioner.rb +24 -7
  53. data/lib/rubik/orchestrator/subagent/reaper.rb +3 -5
  54. data/lib/rubik/orchestrator/subagent/resilience.rb +4 -2
  55. data/lib/rubik/orchestrator/subagent/result_archive.rb +0 -4
  56. data/lib/rubik/orchestrator/subagent/run_cycle.rb +2 -7
  57. data/lib/rubik/orchestrator/subagent/spawn_transaction.rb +11 -2
  58. data/lib/rubik/orchestrator/subagent/step_runner.rb +11 -3
  59. data/lib/rubik/orchestrator/subagent/teardown.rb +4 -0
  60. data/lib/rubik/orchestrator/subagent/transcript_formatter.rb +2 -1
  61. data/lib/rubik/orchestrator/subagent/type_definition.rb +0 -4
  62. data/lib/rubik/orchestrator/tool_timeout.rb +121 -1
  63. data/lib/rubik/orchestrator.rb +1 -0
  64. data/lib/rubik/platform/io_drain.rb +2 -1
  65. data/lib/rubik/platform/process.rb +144 -54
  66. data/lib/rubik/platform.rb +17 -1
  67. data/lib/rubik/plugin/manager.rb +2 -1
  68. data/lib/rubik/plugin/storage.rb +20 -29
  69. data/lib/rubik/repl/commands/agent_context.rb +9 -8
  70. data/lib/rubik/repl/commands/agent_execution.rb +20 -502
  71. data/lib/rubik/repl/commands/agent_models.rb +4 -3
  72. data/lib/rubik/repl/commands/agent_providers.rb +43 -2
  73. data/lib/rubik/repl/commands/base.rb +47 -2
  74. data/lib/rubik/repl/commands/buffer.rb +6 -5
  75. data/lib/rubik/repl/commands/lsp.rb +3 -2
  76. data/lib/rubik/repl/commands/pruner.rb +2 -1
  77. data/lib/rubik/repl/commands/secrets.rb +151 -0
  78. data/lib/rubik/repl/commands/workspace.rb +60 -150
  79. data/lib/rubik/repl/commands/workspace_approval.rb +209 -0
  80. data/lib/rubik/repl/config_wiring.rb +3 -3
  81. data/lib/rubik/repl/hooks.rb +2 -1
  82. data/lib/rubik/repl/input_execution.rb +158 -76
  83. data/lib/rubik/repl/input_loop.rb +3 -2
  84. data/lib/rubik/repl/lifecycle.rb +82 -204
  85. data/lib/rubik/repl/notice_router.rb +319 -0
  86. data/lib/rubik/repl/paste_support.rb +3 -1
  87. data/lib/rubik/repl/presentation.rb +5 -3
  88. data/lib/rubik/repl/pruner/gate.rb +3 -1
  89. data/lib/rubik/repl/pruner/harness.rb +2 -1
  90. data/lib/rubik/repl/shell.rb +4 -3
  91. data/lib/rubik/repl/turn_recorder.rb +6 -5
  92. data/lib/rubik/runtime/discovery.rb +3 -2
  93. data/lib/rubik/runtime/loop_service.rb +4 -3
  94. data/lib/rubik/runtime/manifest_store.rb +124 -0
  95. data/lib/rubik/runtime/overlay_guard.rb +127 -0
  96. data/lib/rubik/runtime/overlay_storage.rb +269 -272
  97. data/lib/rubik/runtime/task_manager.rb +71 -27
  98. data/lib/rubik/runtime.rb +1 -0
  99. data/lib/rubik/sandbox/driver/docker.rb +5 -1
  100. data/lib/rubik/sandbox/runner.rb +16 -15
  101. data/lib/rubik/security/allowlist.rb +167 -0
  102. data/lib/rubik/security/audit_log.rb +72 -0
  103. data/lib/rubik/security/classifier/classifier.rb +8 -0
  104. data/lib/rubik/security/command_gate.rb +591 -0
  105. data/lib/rubik/security/guard.rb +94 -1077
  106. data/lib/rubik/security/path_policy.rb +117 -0
  107. data/lib/rubik/security/secret_store.rb +463 -0
  108. data/lib/rubik/security/synthesis_gate.rb +297 -0
  109. data/lib/rubik/security.rb +5 -0
  110. data/lib/rubik/session/manager.rb +7 -1
  111. data/lib/rubik/skills/manager.rb +2 -3
  112. data/lib/rubik/storage/ranking.rb +113 -0
  113. data/lib/rubik/storage/search.rb +49 -0
  114. data/lib/rubik/storage/store.rb +15 -112
  115. data/lib/rubik/storage/transcript_indexer.rb +2 -3
  116. data/lib/rubik/storage/vakanuvis/harness.rb +2 -3
  117. data/lib/rubik/tools/base.rb +22 -0
  118. data/lib/rubik/tools/builtins/files.rb +3 -15
  119. data/lib/rubik/tools/builtins/grep.rb +3 -9
  120. data/lib/rubik/tools/builtins/lifecycle.rb +96 -92
  121. data/lib/rubik/tools/builtins/synthesis.rb +3 -0
  122. data/lib/rubik/tools/lifecycle_rollbacks.rb +100 -0
  123. data/lib/rubik/tools/native_search.rb +2 -1
  124. data/lib/rubik/tools/truncator.rb +73 -36
  125. data/lib/rubik/ui/banner.rb +4 -3
  126. data/lib/rubik/ui/spinner.rb +3 -1
  127. data/lib/rubik/ui/statusline.rb +6 -5
  128. data/lib/rubik/version.rb +1 -1
  129. data/lib/rubik.rb +1 -2
  130. metadata +23 -1
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../errors"
4
+
5
+ # Named rollback objects for RepairRuntimeTool's promotion transaction
6
+ # (issue #427). Each replaces a former inline `on_dispose` closure, responds
7
+ # to #call and is executed in LIFO order by Context#dispose, keeping the
8
+ # rollback contract explicit and the promotion phase unit-testable.
9
+ module Rubik
10
+ module Tools
11
+ # Runtime-service promotion/rollback failure (issue #448): the repair
12
+ # plane's live-activation preconditions (builtins/lifecycle.rb) and this
13
+ # file's rollback restore raise this instead of bare RuntimeError.
14
+ # RepairRuntimeTool's promotion rescue converts it into a
15
+ # ToolOutput.error verbatim, and Context#dispose error-isolates the
16
+ # rollback inverse, so the class change is transparent to both
17
+ # consumers. Homed here (not builtins/lifecycle.rb) because the builtin
18
+ # file-size contract pins that page; the bottom require there loads this
19
+ # file, so the constant exists for every raise site.
20
+ class RepairRuntimeError < Rubik::Error; end
21
+
22
+ class RepairRuntimeTool
23
+ # Shared flag for the rollbacks of one promotion transaction: when a
24
+ # previous repair scope already owns the lifetime inverses for this key,
25
+ # execute marks the transaction released so these rollbacks stay inert.
26
+ RollbackState = Struct.new(:released)
27
+
28
+ # Result of a successful promotion phase.
29
+ Promotion = Struct.new(:promotion_ctx, :service_key, :state, keyword_init: true)
30
+
31
+ ServiceRollback = Struct.new(:root_ctx, :promotion_ctx, :service_key, :previous_services, :target, :lang,
32
+ :lsp_manager, :repair_scopes, :state, keyword_init: true) do
33
+ def call
34
+ return if state.released
35
+
36
+ repair_scopes.delete([root_ctx, service_key]) if repair_scopes[[root_ctx, service_key]].equal?(promotion_ctx)
37
+ restore_service unless root_ctx.disposed?
38
+ end
39
+
40
+ private
41
+
42
+ def restore_service
43
+ if previous_services.key?(service_key)
44
+ if target == "lsp"
45
+ restored = lsp_manager&.clients&.[](lang)
46
+ active = restored && (!restored.respond_to?(:alive?) || restored.alive?) &&
47
+ (!restored.respond_to?(:running?) || restored.running?)
48
+ if active
49
+ root_ctx.provide(service_key, restored)
50
+ else
51
+ root_ctx.unprovide(service_key)
52
+ end
53
+ else
54
+ root_ctx.provide(service_key, previous_services[service_key])
55
+ end
56
+ else
57
+ root_ctx.unprovide(service_key)
58
+ end
59
+ end
60
+ end
61
+
62
+ ConfigRollback = Struct.new(:config, :cfg_key, :prev_cmd, :state, keyword_init: true) do
63
+ def call
64
+ return if state.released
65
+
66
+ prev_cmd.nil? ? config.delete(cfg_key) : config.set(cfg_key, prev_cmd)
67
+ end
68
+ end
69
+
70
+ LspClientRollback = Struct.new(:lsp_manager, :lang, :config, :cfg_key, :prev_cmd, :root_ctx, :had_client,
71
+ :state, keyword_init: true) do
72
+ def call
73
+ return if state.released
74
+
75
+ lsp_manager.stop_client(lang)
76
+ prev_cmd.nil? ? config.delete(cfg_key) : config.set(cfg_key, prev_cmd)
77
+ return unless had_client && !root_ctx.disposed?
78
+
79
+ restored = lsp_manager.start_client(lang)
80
+ raise Rubik::Tools::RepairRuntimeError, "Previous LSP client could not be restarted: #{restored}" unless restored[:ok]
81
+ end
82
+ end
83
+
84
+ AdapterFieldRollback = Struct.new(:adapter, :field, :old_value, :old_config, :state, keyword_init: true) do
85
+ def call
86
+ return if state.released
87
+
88
+ adapter.public_send("#{field}=", old_value)
89
+ adapter.config = old_config
90
+ end
91
+ end
92
+
93
+ AdapterUnregisterRollback = Struct.new(:adapter_registry, :lang, :adapter, :state, keyword_init: true) do
94
+ def call
95
+ adapter_registry.unregister(lang) if !state.released && adapter_registry.get(lang).equal?(adapter)
96
+ end
97
+ end
98
+ end
99
+ end
100
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "open3"
4
+ require_relative "truncator"
4
5
 
5
6
  begin
6
7
  require "tty/which"
@@ -132,7 +133,7 @@ module Rubik
132
133
  end
133
134
 
134
135
  content = scrub_utf8(match[3])
135
- content = "#{content[0..500]}... [line truncated, #{content.length} chars total]" if content.length > 500
136
+ content = Rubik::Tools::Truncator.clip_line(content, 500) if content.length > 500
136
137
 
137
138
  {
138
139
  file: file.tr("\\", "/").sub(%r{\A\./}, ""),
@@ -92,45 +92,15 @@ module Rubik
92
92
 
93
93
  case strategy_sym
94
94
  when :head_only
95
- kept_lines = lines.first(max_l)
96
- kept_str = kept_lines.join
97
- if kept_str.bytesize > max_c
98
- kept_str = kept_str.byteslice(0, max_c)
99
- kept_str = kept_str.scrub("") unless kept_str.valid_encoding?
100
- end
101
- kept_line_count = kept_str.empty? ? 0 : kept_str.lines(sep).size
102
- omitted_lines = [lines.size - kept_line_count, 0].max
103
- omitted_chars = [str.bytesize - kept_str.bytesize, 0].max
104
- notice = "\n... [Truncated: omitted #{omitted_lines} lines / #{omitted_chars} chars] ...\n"
105
- { text: finalize(kept_str, notice, prefix: true), truncated: true,
106
- omitted_lines: omitted_lines, omitted_chars: omitted_chars }
95
+ kept_str = clamp_head(lines.first(max_l).join, max_c)
96
+ window_result(str, kept_str, lines.size, sep, :short, prefix: true)
107
97
  when :tail_only
108
- kept_lines = lines.last(max_l)
109
- kept_str = kept_lines.join
110
- if kept_str.bytesize > max_c
111
- kept_str = kept_str.byteslice(-max_c, max_c)
112
- kept_str = kept_str.scrub("") unless kept_str.valid_encoding?
113
- end
114
- kept_line_count = kept_str.empty? ? 0 : kept_str.lines(sep).size
115
- omitted_lines = [lines.size - kept_line_count, 0].max
116
- omitted_chars = [str.bytesize - kept_str.bytesize, 0].max
117
- notice = "\n... [Truncated: omitted #{omitted_lines} lines / #{omitted_chars} chars] ...\n"
118
- { text: finalize(kept_str, notice, prefix: false), truncated: true,
119
- omitted_lines: omitted_lines, omitted_chars: omitted_chars }
98
+ kept_str = clamp_tail(lines.last(max_l).join, max_c)
99
+ window_result(str, kept_str, lines.size, sep, :short, prefix: false)
120
100
  else # :head_tail
121
101
  if max_l <= 1
122
- kept_lines = lines.first(max_l)
123
- kept_str = kept_lines.join
124
- if kept_str.bytesize > max_c
125
- kept_str = kept_str.byteslice(0, max_c)
126
- kept_str = kept_str.scrub("") unless kept_str.valid_encoding?
127
- end
128
- kept_line_count = kept_str.empty? ? 0 : kept_str.lines(sep).size
129
- omitted_lines = [lines.size - kept_line_count, 0].max
130
- omitted_chars = [str.bytesize - kept_str.bytesize, 0].max
131
- notice = "\n\n... [Truncated: #{omitted_lines} lines / #{omitted_chars} chars omitted to preserve token budget] ...\n\n"
132
- return { text: finalize(kept_str, notice, prefix: true), truncated: true,
133
- omitted_lines: omitted_lines, omitted_chars: omitted_chars }
102
+ kept_str = clamp_head(lines.first(max_l).join, max_c)
103
+ return window_result(str, kept_str, lines.size, sep, :budget, prefix: true)
134
104
  end
135
105
 
136
106
  head_lines_count = max_l / 2
@@ -189,6 +159,73 @@ module Rubik
189
159
  str = str.scrub("") unless str.valid_encoding?
190
160
  prefix ? "#{str}#{notice}" : "#{notice}#{str}"
191
161
  end
162
+
163
+ # Shared kept-window accounting for the single-window strategies
164
+ # (head_only, tail_only, and head_tail's degenerate max_l <= 1
165
+ # branch): omitted_lines/omitted_chars are derived from the ORIGINAL
166
+ # line count and the KEPT byte size. `style` selects one of the two
167
+ # sanctioned full-truncation notice spellings — byte-identical
168
+ # output is pinned by tests, so the format lives here and nowhere
169
+ # else. The kept window must already be clamped (and scrubbed once
170
+ # after its last byteslice) via clamp_head / clamp_tail.
171
+ def self.window_result(str, kept_str, total_lines, sep, style, prefix:)
172
+ kept_line_count = kept_str.empty? ? 0 : kept_str.lines(sep).size
173
+ omitted_lines = [total_lines - kept_line_count, 0].max
174
+ omitted_chars = [str.bytesize - kept_str.bytesize, 0].max
175
+ notice = if style == :budget
176
+ "\n\n... [Truncated: #{omitted_lines} lines / #{omitted_chars} chars omitted to preserve token budget] ...\n\n"
177
+ else
178
+ "\n... [Truncated: omitted #{omitted_lines} lines / #{omitted_chars} chars] ...\n"
179
+ end
180
+ { text: finalize(kept_str, notice, prefix: prefix), truncated: true,
181
+ omitted_lines: omitted_lines, omitted_chars: omitted_chars }
182
+ end
183
+
184
+ # Post-byteslice head clamp: a byte-boundary cut can split a multibyte
185
+ # character at the cut edge. Dropping the partial sequence keeps the
186
+ # byte budget honest while the kept window stays valid UTF-8.
187
+ def self.clamp_head(str, max_c)
188
+ return str if str.bytesize <= max_c
189
+
190
+ clamped = str.byteslice(0, max_c)
191
+ clamped = clamped.scrub("") unless clamped.valid_encoding?
192
+ clamped
193
+ end
194
+
195
+ # Tail clamp: same contract as clamp_head, slicing from the END of the
196
+ # window so the last lines survive.
197
+ def self.clamp_tail(str, max_c)
198
+ return str if str.bytesize <= max_c
199
+
200
+ clamped = str.byteslice(-max_c, max_c)
201
+ clamped = clamped.scrub("") unless clamped.valid_encoding?
202
+ clamped
203
+ end
204
+
205
+ # Canonical short-preview truncation for human/model-readable
206
+ # fragments: keep at most `limit` characters, then append one of the
207
+ # repo's two elision markers. `counted:` selects the spelling —
208
+ # "... [truncated N chars]" (default) or "... [truncated]". These two
209
+ # spellings, plus clip_line below, are the ONLY sanctioned preview
210
+ # markers; inline reimplementations feed downstream string matches
211
+ # that silently miss any other format.
212
+ def self.clip(text, limit, counted: true, separator: "")
213
+ str = text.to_s
214
+ return str if str.length <= limit
215
+
216
+ count = counted ? " #{str.length - limit} chars" : ""
217
+ "#{str[0, limit]}#{separator}... [truncated#{count}]"
218
+ end
219
+
220
+ # Line-fragment truncation for the search tools (native_search,
221
+ # builtins/grep): the kept window is INCLUSIVE (limit+1 characters)
222
+ # and the marker names the original total — pin both properties.
223
+ def self.clip_line(line, limit)
224
+ str = line.to_s
225
+ return str if str.length <= limit
226
+
227
+ "#{str[0..limit]}... [line truncated, #{str.length} chars total]"
228
+ end
192
229
  end
193
230
  end
194
231
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../platform"
4
+ require_relative "../storage/layout"
4
5
 
5
6
  module Rubik
6
7
  module UI
@@ -11,7 +12,7 @@ module Rubik
11
12
  module_function
12
13
 
13
14
  def render(shell, theme)
14
- return nil unless shell.config.fetch("ui.banner", true)
15
+ return nil unless Rubik::Storage::Layout.config_get(shell.config, "ui.banner", true)
15
16
  return nil unless Capability.interactive?(input: shell.input, output: shell.output)
16
17
 
17
18
  routed = Statusline.current_route(shell)
@@ -27,8 +28,8 @@ module Rubik
27
28
  ]
28
29
 
29
30
  if Rubik::Platform.linux? && Rubik::Platform.which("bwrap") &&
30
- !shell.config.fetch("sandbox.enabled", false) &&
31
- shell.config.fetch("sandbox.prompt_on_startup", true)
31
+ !Rubik::Storage::Layout.config_get(shell.config, "sandbox.enabled", false) &&
32
+ Rubik::Storage::Layout.config_get(shell.config, "sandbox.prompt_on_startup", true)
32
33
  lines << theme.paint("💡 Linux & bwrap algılandı: '!sandbox on' ile donanımsal OS izolasyonu açılabilir", :warn)
33
34
  end
34
35
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  require "tty-spinner"
4
4
 
5
+ require_relative "../storage/layout"
6
+
5
7
  module Rubik
6
8
  module UI
7
9
  # Live status spinner shown while the orchestrator queries the LLM:
@@ -25,7 +27,7 @@ module Rubik
25
27
  end
26
28
 
27
29
  def enabled?
28
- @config ? @config.fetch("ui.spinner", true) != false : true
30
+ @config ? Rubik::Storage::Layout.config_get(@config, "ui.spinner", true) != false : true
29
31
  end
30
32
 
31
33
  def spinning?
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../prompt/token_estimator"
4
+ require_relative "../storage/layout"
4
5
 
5
6
  module Rubik
6
7
  module UI
@@ -12,9 +13,9 @@ module Rubik
12
13
  module_function
13
14
 
14
15
  def render(shell, theme)
15
- return nil unless shell.config.fetch("ui.statusline", true)
16
+ return nil unless Rubik::Storage::Layout.config_get(shell.config, "ui.statusline", true)
16
17
 
17
- template = shell.config.fetch("ui.statusline_template", default_template)
18
+ template = Rubik::Storage::Layout.config_get(shell.config, "ui.statusline_template", default_template)
18
19
  # `!config set ui.statusline_template "{a} {b}"` can arrive parsed as
19
20
  # a YAML flow-mapping Hash; coerce any non-String back to the default.
20
21
  template = default_template unless template.is_a?(String)
@@ -28,7 +29,7 @@ module Rubik
28
29
  "ctx" => context_usage(shell, routed),
29
30
  "dirty" => dirty_segment(shell, theme),
30
31
  "sandbox" => sandbox_segment(shell),
31
- "verbosity" => shell.config.fetch("ui.verbosity", "normal"),
32
+ "verbosity" => Rubik::Storage::Layout.config_get(shell.config, "ui.verbosity", "normal"),
32
33
  "units" => units_str
33
34
  }
34
35
 
@@ -79,8 +80,8 @@ module Rubik
79
80
  end
80
81
 
81
82
  def sandbox_segment(shell)
82
- if shell.config.fetch("sandbox.enabled", false)
83
- net_str = shell.config.fetch("sandbox.allow_network", false) ? "ağ-açık" : "izole"
83
+ if Rubik::Storage::Layout.config_get(shell.config, "sandbox.enabled", false)
84
+ net_str = Rubik::Storage::Layout.config_get(shell.config, "sandbox.allow_network", false) ? "ağ-açık" : "izole"
84
85
  "#{shell.sandbox_runner&.driver&.name || 'sandbox'}:#{net_str}"
85
86
  else
86
87
  "kapalı"
data/lib/rubik/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubik
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.0"
5
5
  end
data/lib/rubik.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "rubik/version"
4
+ require_relative "rubik/errors"
4
5
  require_relative "rubik/log"
5
6
  require_relative "rubik/platform"
6
7
  require_relative "rubik/concurrency"
@@ -38,8 +39,6 @@ require_relative "rubik/kernel/unit"
38
39
  require_relative "rubik/kernel/init"
39
40
 
40
41
  module Rubik
41
- class Error < StandardError; end
42
-
43
42
  class << self
44
43
  attr_accessor :current_shell, :runtime_manager
45
44
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubik
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Özgür Ulukır
@@ -270,6 +270,7 @@ files:
270
270
  - lib/rubik/benchmark/vakanuvis_adoption.rb
271
271
  - lib/rubik/buffer.rb
272
272
  - lib/rubik/buffer/apply_contract.rb
273
+ - lib/rubik/buffer/apply_transaction.rb
273
274
  - lib/rubik/buffer/diff.rb
274
275
  - lib/rubik/buffer/manager.rb
275
276
  - lib/rubik/buffer/path_validator.rb
@@ -295,6 +296,7 @@ files:
295
296
  - lib/rubik/config/pruner.rb
296
297
  - lib/rubik/config/schema.rb
297
298
  - lib/rubik/config/scoped.rb
299
+ - lib/rubik/config/secret_policy.rb
298
300
  - lib/rubik/config/store.rb
299
301
  - lib/rubik/context.rb
300
302
  - lib/rubik/context/git_info.rb
@@ -307,6 +309,7 @@ files:
307
309
  - lib/rubik/diagnostics/collector.rb
308
310
  - lib/rubik/diagnostics/entry.rb
309
311
  - lib/rubik/diagnostics/parser.rb
312
+ - lib/rubik/errors.rb
310
313
  - lib/rubik/event_bus.rb
311
314
  - lib/rubik/events.rb
312
315
  - lib/rubik/kernel/dispatcher.rb
@@ -329,10 +332,13 @@ files:
329
332
  - lib/rubik/log.rb
330
333
  - lib/rubik/lsp.rb
331
334
  - lib/rubik/lsp/client.rb
335
+ - lib/rubik/lsp/document_store.rb
332
336
  - lib/rubik/lsp/manager.rb
333
337
  - lib/rubik/lsp/server_command.rb
338
+ - lib/rubik/lsp/transport.rb
334
339
  - lib/rubik/mcp.rb
335
340
  - lib/rubik/mcp/boot_lifecycle.rb
341
+ - lib/rubik/mcp/boot_run.rb
336
342
  - lib/rubik/mcp/client.rb
337
343
  - lib/rubik/mcp/errors.rb
338
344
  - lib/rubik/mcp/manager.rb
@@ -357,6 +363,7 @@ files:
357
363
  - lib/rubik/orchestrator/goal_ledger/verify_spec.rb
358
364
  - lib/rubik/orchestrator/goal_ledger/xml_render.rb
359
365
  - lib/rubik/orchestrator/goal_registry.rb
366
+ - lib/rubik/orchestrator/goal_session.rb
360
367
  - lib/rubik/orchestrator/goal_state.rb
361
368
  - lib/rubik/orchestrator/goal_wait.rb
362
369
  - lib/rubik/orchestrator/loop.rb
@@ -364,6 +371,7 @@ files:
364
371
  - lib/rubik/orchestrator/maestro_gate.rb
365
372
  - lib/rubik/orchestrator/provider_recovery.rb
366
373
  - lib/rubik/orchestrator/provider_resolver.rb
374
+ - lib/rubik/orchestrator/resume_window.rb
367
375
  - lib/rubik/orchestrator/shell_deps.rb
368
376
  - lib/rubik/orchestrator/step_executor.rb
369
377
  - lib/rubik/orchestrator/stream_manager.rb
@@ -459,6 +467,7 @@ files:
459
467
  - lib/rubik/repl/commands/mcp.rb
460
468
  - lib/rubik/repl/commands/plugins.rb
461
469
  - lib/rubik/repl/commands/pruner.rb
470
+ - lib/rubik/repl/commands/secrets.rb
462
471
  - lib/rubik/repl/commands/session.rb
463
472
  - lib/rubik/repl/commands/skills.rb
464
473
  - lib/rubik/repl/commands/storage.rb
@@ -466,6 +475,7 @@ files:
466
475
  - lib/rubik/repl/commands/system.rb
467
476
  - lib/rubik/repl/commands/tasks.rb
468
477
  - lib/rubik/repl/commands/workspace.rb
478
+ - lib/rubik/repl/commands/workspace_approval.rb
469
479
  - lib/rubik/repl/composition.rb
470
480
  - lib/rubik/repl/config_wiring.rb
471
481
  - lib/rubik/repl/confirmations.rb
@@ -474,6 +484,7 @@ files:
474
484
  - lib/rubik/repl/input_loop.rb
475
485
  - lib/rubik/repl/interrupt_handler.rb
476
486
  - lib/rubik/repl/lifecycle.rb
487
+ - lib/rubik/repl/notice_router.rb
477
488
  - lib/rubik/repl/paste_support.rb
478
489
  - lib/rubik/repl/pending_notice_queue.rb
479
490
  - lib/rubik/repl/presentation.rb
@@ -503,6 +514,8 @@ files:
503
514
  - lib/rubik/runtime/index_service.rb
504
515
  - lib/rubik/runtime/loop_service.rb
505
516
  - lib/rubik/runtime/manager.rb
517
+ - lib/rubik/runtime/manifest_store.rb
518
+ - lib/rubik/runtime/overlay_guard.rb
506
519
  - lib/rubik/runtime/overlay_storage.rb
507
520
  - lib/rubik/runtime/repair_probe.rb
508
521
  - lib/rubik/runtime/sealed_coeffects.rb
@@ -521,6 +534,8 @@ files:
521
534
  - lib/rubik/sandbox/runner.rb
522
535
  - lib/rubik/sandbox/shell_resolver.rb
523
536
  - lib/rubik/security.rb
537
+ - lib/rubik/security/allowlist.rb
538
+ - lib/rubik/security/audit_log.rb
524
539
  - lib/rubik/security/blocked_guidance.rb
525
540
  - lib/rubik/security/classifier.rb
526
541
  - lib/rubik/security/classifier/classifier.rb
@@ -726,9 +741,13 @@ files:
726
741
  - lib/rubik/security/classifier/parsers/bash_extractors.rb
727
742
  - lib/rubik/security/classifier/parsers/powershell.rb
728
743
  - lib/rubik/security/classifier/pwsh_rules.rb
744
+ - lib/rubik/security/command_gate.rb
729
745
  - lib/rubik/security/errors.rb
730
746
  - lib/rubik/security/guard.rb
747
+ - lib/rubik/security/path_policy.rb
731
748
  - lib/rubik/security/redactor.rb
749
+ - lib/rubik/security/secret_store.rb
750
+ - lib/rubik/security/synthesis_gate.rb
732
751
  - lib/rubik/session.rb
733
752
  - lib/rubik/session/manager.rb
734
753
  - lib/rubik/session/recorder.rb
@@ -743,7 +762,9 @@ files:
743
762
  - lib/rubik/storage.rb
744
763
  - lib/rubik/storage/folding.rb
745
764
  - lib/rubik/storage/layout.rb
765
+ - lib/rubik/storage/ranking.rb
746
766
  - lib/rubik/storage/render.rb
767
+ - lib/rubik/storage/search.rb
747
768
  - lib/rubik/storage/service.rb
748
769
  - lib/rubik/storage/store.rb
749
770
  - lib/rubik/storage/transcript_indexer.rb
@@ -790,6 +811,7 @@ files:
790
811
  - lib/rubik/tools/diagnostic_reporter.rb
791
812
  - lib/rubik/tools/fuzzy_matcher.rb
792
813
  - lib/rubik/tools/index_messages.rb
814
+ - lib/rubik/tools/lifecycle_rollbacks.rb
793
815
  - lib/rubik/tools/native_search.rb
794
816
  - lib/rubik/tools/output.rb
795
817
  - lib/rubik/tools/preflight_runner.rb