collavre_openclaw 0.6.3 → 0.6.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a5a10c4a59247ea763b3f635005c08375186c6bb279dfa9e00ea5e5533ae438
4
- data.tar.gz: '097534bec297da15507b18e1f060990471fc54e9076ba5f81065a36ecb88b262'
3
+ metadata.gz: badc8487c94ad358c79bae0c570927f65fc7bc43d27352cddc72f2d9831eb051
4
+ data.tar.gz: 45f1ff5326c7c843b1d39bed2a0b2dcd7bd1ae81fa10114c1a3eaa38bff2af4c
5
5
  SHA512:
6
- metadata.gz: 02f5238a8bae2f7061113189918774ebef66a855e26383127f42c3838658124721d465449751fdf0629d5ec52ffc399a5325d91a661a838bf25deb39cb0f1563
7
- data.tar.gz: b9089349ca80e5f4f575da36f38f590f4a6607e9cd14dba8dece7c570a3d7f100d6abec58974647da1d4c33b4f00ad47ac31c9c5ec6c75761e9d7e1e587ff36c
6
+ metadata.gz: 78afcd285c356f0d1238a769efee1b0bff7522713c081ea0daf0cefd95c668f1af2c5e7d2bea69ec7328e22d4f5da5fee51f04c13e7e5221a94e70cc12461155
7
+ data.tar.gz: 8f64b29e88d6578797377dd6140bf00c6d1b3d6fc06885efdd4b62a3229feafc051970bc6f16b7c9be3080c4fda3e04e8c4b1fc5c4cb4530daa4ccdd6c1b9652
@@ -42,14 +42,20 @@ module CollavreOpenclaw
42
42
  error_message = e.message
43
43
  raise
44
44
  ensure
45
- log_interaction(
46
- messages: messages_data[:messages],
47
- tools: [],
48
- response_content: response_content,
49
- error_message: error_message,
50
- input_tokens: nil,
51
- output_tokens: nil
52
- )
45
+ # Honor no-log mode (e.g. inline typo correction on *unsubmitted* drafts).
46
+ # Base Collavre::AiClient#chat gates logging behind @log_interactions; this
47
+ # prepended adapter path bypasses super, so it must gate it too — otherwise
48
+ # private drafts leak to ActivityLog for OpenClaw-backed agents.
49
+ if @log_interactions
50
+ log_interaction(
51
+ messages: messages_data[:messages],
52
+ tools: [],
53
+ response_content: response_content,
54
+ error_message: error_message,
55
+ input_tokens: nil,
56
+ output_tokens: nil
57
+ )
58
+ end
53
59
  end
54
60
 
55
61
  return response_content
@@ -11,5 +11,16 @@ Rails.application.config.to_prepare do
11
11
  Collavre::AiClient.register_adapter("openclaw", CollavreOpenclaw::OpenclawAdapter)
12
12
  Rails.logger.info("[CollavreOpenclaw] Registered OpenClaw adapter")
13
13
  end
14
+
15
+ # OpenClaw uses stateful, incremental sessions and appears in the AI-agent
16
+ # vendor dropdown. Register both into core so core needs no OpenClaw name of
17
+ # its own to decide session support or list the vendor. Both registrations
18
+ # are idempotent, so re-running on reload is safe.
19
+ if Collavre::AiClient.respond_to?(:register_session_vendor)
20
+ Collavre::AiClient.register_session_vendor("openclaw")
21
+ end
22
+ if Collavre::AiClient.respond_to?(:register_vendor_option)
23
+ Collavre::AiClient.register_vendor_option("OpenClaw", "openclaw")
24
+ end
14
25
  end
15
26
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # An OpenClaw gateway error banner marks a task result the agent never actually
4
+ # produced, so the trigger loop must retry it without consuming an iteration.
5
+ # Register the OpenClaw-specific signature into the core trigger-loop infra-error
6
+ # registry so core keeps only vendor-neutral patterns. Runs on boot and every
7
+ # reload; registration is idempotent.
8
+ Rails.application.config.to_prepare do
9
+ if defined?(Collavre::TriggerLoopCheckJob)
10
+ Collavre::TriggerLoopCheckJob.register_infrastructure_error_pattern(/OpenClaw Error/i)
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module CollavreOpenclaw
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collavre_openclaw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Collavre
@@ -92,6 +92,7 @@ files:
92
92
  - config/initializers/ai_client_extension.rb
93
93
  - config/initializers/integration_settings.rb
94
94
  - config/initializers/session_abort.rb
95
+ - config/initializers/trigger_loop_patterns.rb
95
96
  - config/locales/en.yml
96
97
  - config/locales/ko.yml
97
98
  - config/routes.rb