tidewave 0.9.0 → 0.9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1267db74de119b4df61724a8842bf73cf8808ca502a36595a7180806c172731
4
- data.tar.gz: 9a0661b32af7c7f0932930d0948fa7842b9da7037aa8c936707cf7349c043342
3
+ metadata.gz: 4ab18eddab48d627b651d3a52e46a351506e57401015706b088910f11c91e54f
4
+ data.tar.gz: 0740650fc83bb249def8d108beeb3434dfb3313e3a740755ac305be2663202ac
5
5
  SHA512:
6
- metadata.gz: 9b10d2635c19388de314ffeb62f27bfd3fbcde4f3ec3cdbb07476ebd598bc455423e003d04a222d81fd7231b5cee2bf778683fb67589d1cc1278ebeef1e51b29
7
- data.tar.gz: dc487bfc541140331ca32e28ad7986b8d9265ef73c696a31d8014c7766fc32f8eb1972594b301652937c07d2684ae4df2494cc4c819ab4a63458fd8965044f35
6
+ metadata.gz: 9d7a8ecabbc3139ce103a77d44f8e317044c2b78128914ee52c9bca5b4e60ee157f5506920117fd8df257daa9b2df29901882de6cdd77eb95e3fd1d8a0d72e64
7
+ data.tar.gz: eb30a267b41ffd08940674265c51757511ae8a7598eed87c8f19e9a75e70753c1357d5da7a1ee3cd3d104965bb95c86d5626b7cd8e15c8ed5b21a8155620b813
data/README.md CHANGED
@@ -74,14 +74,6 @@ Looks up the documentation for a class, method, or constant, reading from the ex
74
74
 
75
75
  Your agent can use it when it's unsure how a class or method works, so the code it generates is grounded in the docs for the exact versions of the gems your app uses, rather than training data that may be stale or a generic docs lookup that can't guarantee it matches the version your app depends on.
76
76
 
77
- ### `get_logs`
78
-
79
- Returns output from your running server's log.
80
-
81
- [![get_logs demo](docs/assets/get_logs-poster.png)](https://asciinema.org/a/1260413)
82
-
83
- Your agent can use it to see what happened after a request. For example, reading the request log and backtrace when something misbehaves, or checking the log after an action to confirm the request came in with the expected params.
84
-
85
77
  ### `get_source_location`
86
78
 
87
79
  Returns the file and line where a class, module, or method is defined, across both your app and its dependencies.
data/lib/tidewave/tool.rb CHANGED
@@ -24,6 +24,10 @@ class Tidewave
24
24
  raise NotImplementedError, "#{self.class} must implement #call"
25
25
  end
26
26
 
27
+ def include_in_tool_list?
28
+ true
29
+ end
30
+
27
31
  def validate_and_call(arguments, context = {})
28
32
  arguments ||= {}
29
33
 
@@ -58,6 +58,10 @@ class Tidewave::Tools::GetLogs < Tidewave::Tool
58
58
  matching_lines.join
59
59
  end
60
60
 
61
+ def include_in_tool_list?
62
+ false
63
+ end
64
+
61
65
  private
62
66
 
63
67
  def tail_lines(file_path)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Tidewave
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
  end
data/lib/tidewave.rb CHANGED
@@ -76,6 +76,15 @@ class Tidewave
76
76
  UPLOAD_ROUTE = "upload".freeze
77
77
  WS_ROUTE = "ws".freeze
78
78
  PROTOCOL_VERSION = "2025-03-26".freeze
79
+ INSTRUCTIONS = <<~TEXT
80
+ Tidewave connects you to this Rails application while it is running in development: the same process, database and logs the developer is using. Anything you would run through `rails runner` or `ruby -e` can run inside the already-booted app instead, with no startup cost per call. Questions about the app's actual state (data, loaded code, etc) are answered from the live process rather than inferred from files.
81
+
82
+ What is available and when each is relevant:
83
+ - project_eval: run Ruby inside the running app: models, queries, any expression or snippet. Relevant whenever you would otherwise write a script or start `rails runner` or a console.
84
+ - execute_sql_query: query the development database directly. Relevant when the answer is in the database (counts, rows, what a record looks like).
85
+ - get_source_location: where a class, module or method is defined, across the app and every gem, including Rails itself. Uses runtime information, so it works even across meta-programming. Use when you know the exact name and would otherwise grep
86
+ - get_docs: documentation for a class, module or method, app or dependency, for the exact versions this app has installed.
87
+ TEXT
79
88
  MAX_UPLOAD_SIZE = 10_000_000
80
89
  ALLOWED_UPLOAD_CONTENT_TYPES = [ "image/png", "image/jpeg", "video/webm" ].freeze
81
90
  ALLOWED_UPLOAD_TYPES = [ "screenshot", "recording" ].freeze
@@ -361,6 +370,7 @@ class Tidewave
361
370
  "tidewave" => config_data(request),
362
371
  "root" => @root.to_s,
363
372
  "wsl_distro" => ENV["WSL_DISTRO_NAME"],
373
+ "host_path" => ENV["TIDEWAVE_HOST_PATH"],
364
374
  "framework" => {}
365
375
  }
366
376
 
@@ -572,7 +582,8 @@ class Tidewave
572
582
  "name" => "tidewave",
573
583
  "version" => VERSION
574
584
  },
575
- "tools" => tool_definitions(context)
585
+ "tools" => tool_definitions(context),
586
+ "instructions" => INSTRUCTIONS
576
587
  })
577
588
  end
578
589
 
@@ -616,7 +627,7 @@ class Tidewave
616
627
  end
617
628
 
618
629
  def tool_definitions(context)
619
- context[:tools].values.map(&:definition)
630
+ context[:tools].values.select(&:include_in_tool_list?).map(&:definition)
620
631
  end
621
632
 
622
633
  def tool_error_result(message)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tidewave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yorick Jacquin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2026-08-18 00:00:00.000000000 Z
12
+ date: 2026-10-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack