worldmonitor 0.1.1 → 0.1.2
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 +4 -4
- data/README.md +1 -1
- data/lib/worldmonitor/version.rb +1 -1
- data/lib/worldmonitor.rb +9 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f18135a89a4477f6dbc945d3b8f5616ac884dd324b2ea033defbbfb775e5d06
|
|
4
|
+
data.tar.gz: 919f2ebbc2e35c6bd4c82365838c5dc777835600a550b0e6f4ed5d6bd18dd9c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dcec69f1fab5be413340256a1223b4c537f3030c590e2509ec14a6ed4881263fa0659e80aaf4f794b104ceec7d920c969c9a6fde76f4d9d64b07d5469d1cd0ec
|
|
7
|
+
data.tar.gz: '0148a5cfb62dda40d0a680b6c27dad08a29c49b1428ef192860973006d276ef032d1dfe84644f909d3dc79ee9f035d4fecf8164e38d95694c7f681489a1555a9'
|
data/README.md
CHANGED
|
@@ -24,7 +24,7 @@ client.call_tool("get_market_data", asset_class: "crypto") # any MCP tool
|
|
|
24
24
|
client.get("/api/health") # raw REST GET
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
`get_sources` is the sole credential-free, daily-quota-free data tool; anonymous calls use a separate fail-closed 10/minute/IP ceiling. Every other data-bearing `tools/call` needs a subscription API key — get one at [worldmonitor.app/pro](https://www.worldmonitor.app/pro). Listing tools, prompts, and resources is public.
|
|
28
28
|
|
|
29
29
|
## Server-side projection
|
|
30
30
|
|
data/lib/worldmonitor/version.rb
CHANGED
data/lib/worldmonitor.rb
CHANGED
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
# Stdlib-only (Net::HTTP), MCP-first — the same design as the `worldmonitor`
|
|
6
6
|
# npm CLI this mirrors (`cli/` in the main repository). The MCP server
|
|
7
7
|
# (https://worldmonitor.app/mcp) is the live, documented agent surface:
|
|
8
|
-
# `tools/list` is public
|
|
9
|
-
#
|
|
10
|
-
# (`get`/`health`) rounds it out for
|
|
8
|
+
# `tools/list` is public. `get_sources` is the only data tool that can be
|
|
9
|
+
# called without a key; the other `tools/call` operations authenticate with a
|
|
10
|
+
# user API key. A small REST escape hatch (`get`/`health`) rounds it out for
|
|
11
|
+
# host-relative and self-hosted use.
|
|
11
12
|
#
|
|
13
|
+
# WorldMonitor::Client.new(env: {}).call_tool("get_sources", view: "summary")
|
|
12
14
|
# client = WorldMonitor::Client.new(api_key: "wm_...")
|
|
13
15
|
# client.country_risk("IR")
|
|
14
16
|
# client.call_tool("get_market_data", asset_class: "crypto")
|
|
@@ -83,7 +85,10 @@ module WorldMonitor
|
|
|
83
85
|
def initialize(api_key: nil, base_url: nil, mcp_url: nil,
|
|
84
86
|
timeout: DEFAULT_TIMEOUT, transport: nil, env: ENV)
|
|
85
87
|
@api_key = api_key || env["WORLDMONITOR_API_KEY"] || env["WM_API_KEY"]
|
|
86
|
-
@base_url =
|
|
88
|
+
@base_url = base_url || env["WORLDMONITOR_BASE_URL"] || DEFAULT_BASE_URL
|
|
89
|
+
end_index = @base_url.bytesize
|
|
90
|
+
end_index -= 1 while end_index.positive? && @base_url.getbyte(end_index - 1) == 47
|
|
91
|
+
@base_url = @base_url.byteslice(0, end_index)
|
|
87
92
|
@mcp_url = mcp_url || env["WORLDMONITOR_MCP_URL"] || DEFAULT_MCP_URL
|
|
88
93
|
@timeout = timeout
|
|
89
94
|
@transport = transport || method(:http_transport)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: worldmonitor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- World Monitor
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Country briefs, risk scores, conflict/cyber/market/news feeds, and MCP
|
|
14
14
|
tools from the World Monitor global-intelligence API without writing an HTTP integration.
|