flycal-cli 0.6.0 → 0.6.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: d3dde0dd31d735707a1fc4e9f1e125c2f8a189749e3a3458ba3ff5e54eb9b47b
4
- data.tar.gz: edc5fcb47573491a2b23ca784bd263a6f920c60cbdb497bc2cad9e28fca6e0f8
3
+ metadata.gz: b7333fcbb8ba227c7694b96cba4b35893e324c13e38bdc6d996e69f54cc3d64a
4
+ data.tar.gz: aab159e8f8e68368db1e45d1a799dd93386f79a0f2f9c29bb92aba776bcefa21
5
5
  SHA512:
6
- metadata.gz: 0f86a8a043423dab082ba55e203ab87d8e04053e4aa667fd0db3af829afe7296a528af8f7be895a69b8dce851d3e515538771ee50d13ad01d0ae073a775cd597
7
- data.tar.gz: 48149823ec2ce21517a1c9479b4c9579390a699ece675813cf3e4cccadfb5693eb4ee5886c02c45410353afd4fa8b1d0f100ce68b536757e6f6eb99143d62b49
6
+ metadata.gz: 2036031048ebcb74e1954ff1d574051945407bdef922f161f4b1ad7e8be7cd1f3dfdec6dea2efe671502a1310ba834cee44426d837a3b7dfee4fb76fbd504117
7
+ data.tar.gz: 40646b4ce7bfaa3256a35c435cdf6dcb3913aaf2a3811370219e32c510fc88d7469d652b573973016d96b9e1d5f49cca8da159bfad7d787742dc8c0bba9239d0
@@ -142,16 +142,13 @@ module FlycalCli
142
142
  end
143
143
 
144
144
  def slots_in_gap(start_at, end_at)
145
- slots = []
146
- cursor = round_up_15(start_at)
147
- gap_limit = round_down_15(end_at)
145
+ rounded_start = round_up_15(start_at)
146
+ rounded_end = round_down_15(end_at)
147
+ return [] if rounded_start >= rounded_end
148
+ return [] if (rounded_end - rounded_start) < @slot_duration_seconds
148
149
 
149
- while cursor + @slot_duration_seconds <= gap_limit
150
- slots << [cursor, cursor + @slot_duration_seconds]
151
- cursor += STEP_SECONDS
152
- end
153
-
154
- slots
150
+ # One continuous free range (not sliding windows of fixed duration)
151
+ [[rounded_start, rounded_end]]
155
152
  end
156
153
 
157
154
  def round_up_15(time)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FlycalCli
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
data/mcp/tools.json CHANGED
@@ -256,7 +256,7 @@
256
256
  {
257
257
  "name": "flycal_slots",
258
258
  "title": "Find free time slots",
259
- "description": "Find free slots within configured hours, subtracting busy events from slots.exclude_calendars (or calendar_default if that list is empty). Starts from --from (default: config slots.defaults.from or now) for a window of --in (default: 1 week). Duration defaults to slots.defaults.default_duration (45min). Respects free_before and free_after buffers from config. Output begins with a multi-line header, calendar names, a Google Calendar day link, then fixed-duration slots. Read-only.",
259
+ "description": "Find free slots within configured hours, subtracting busy events from slots.exclude_calendars (or calendar_default if that list is empty). Starts from --from (default: config slots.defaults.from or now) for a window of --in (default: 1 week). Duration defaults to slots.defaults.default_duration (45min). Respects free_before and free_after buffers from config. Output begins with a multi-line header, calendar names, a Google Calendar day link, then continuous free ranges (each at least as long as duration). Read-only.",
260
260
  "interactive": false,
261
261
  "requires_auth": true,
262
262
  "command": {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flycal-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - flycal-cli