twindex-openclaw-plugin 0.7.4 → 0.7.6

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "id": "twindex",
3
- "name": "Twindex",
3
+ "name": "New Lore",
4
4
  "description": "Music intelligence for AI agents. Get notified about tours, merch drops, releases, and presales for your favorite artists.",
5
- "version": "0.5.6",
5
+ "version": "0.7.6",
6
6
  "skills": ["./skills"],
7
7
  "configSchema": {
8
8
  "type": "object",
@@ -10,7 +10,7 @@
10
10
  "properties": {
11
11
  "apiKey": {
12
12
  "type": "string",
13
- "description": "Twindex API key (starts with twx_). Auto-generated on first startup."
13
+ "description": "New Lore API key (starts with twx_). Auto-generated on first startup."
14
14
  },
15
15
  "artists": {
16
16
  "type": "array",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "uiHints": {
39
39
  "apiKey": {
40
- "label": "Twindex API Key",
40
+ "label": "New Lore API Key",
41
41
  "placeholder": "twx_... (auto-generated)",
42
42
  "sensitive": true
43
43
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twindex-openclaw-plugin",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
4
4
  "description": "Music intelligence for AI agents. Tours, merch drops, releases, presales.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: Twindex
2
+ name: New Lore
3
3
  description: Music intelligence — tours, merch drops, releases, presales for your favorite artists.
4
4
  tools:
5
5
  - twindex_setup
@@ -14,10 +14,10 @@ tools:
14
14
  - twindex_try_on
15
15
  ---
16
16
 
17
- # Twindex — Music Intelligence
17
+ # New Lore — Music Intelligence
18
18
 
19
- Twindex is YOUR music intelligence service. It is a plugin you have installed.
20
- When a user mentions twindex.ai or asks for artist updates, they are asking
19
+ New Lore is YOUR music intelligence service. It is a plugin you have installed.
20
+ When a user mentions newlore.ai or asks for artist updates, they are asking
21
21
  YOU to set it up using your tools. Do NOT tell them to visit a website.
22
22
 
23
23
  ## First-time setup
@@ -66,7 +66,7 @@ Use `twindex_artist` with a slug to get their full page.
66
66
  ## Rules
67
67
 
68
68
  - Do NOT create cron jobs, scheduled tasks, or shell scripts
69
- - Do NOT use curl commands to call Twindex APIs
70
- - Do NOT tell users to visit twindex.ai — YOU are their interface to it
69
+ - Do NOT use curl commands to call New Lore APIs
70
+ - Do NOT tell users to visit newlore.ai — YOU are their interface to it
71
71
  - All notification delivery is handled by the plugin automatically
72
72
  - Only speak when you have something to deliver. Never say "no updates."
package/src/client.ts CHANGED
@@ -1,7 +1,7 @@
1
- // Twindex API client — all URLs hardcoded. Zero hallucination.
2
- // Base: https://twindex.ai (NOT api.twindex.ai)
1
+ // New Lore API client — all URLs hardcoded. Zero hallucination.
2
+ // Base: https://newlore.ai
3
3
 
4
- const BASE_URL = "https://twindex.ai";
4
+ const BASE_URL = "https://newlore.ai";
5
5
 
6
6
  interface RegisterResponse {
7
7
  agent: { id: string; name: string };
@@ -174,6 +174,18 @@ interface TryOnResult {
174
174
  product: { title: string; price: string; buy_url: string };
175
175
  }
176
176
 
177
+ /** Set the agent's preferred city for location-based tour notifications. */
178
+ export async function setCity(
179
+ apiKey: string,
180
+ city: string,
181
+ ): Promise<void> {
182
+ await request("/api/v1/me/city", {
183
+ method: "PUT",
184
+ headers: authHeader(apiKey),
185
+ body: JSON.stringify({ city }),
186
+ });
187
+ }
188
+
177
189
  /** Upload a selfie for personalized merch try-on (from URL). */
178
190
  export async function uploadPhoto(
179
191
  apiKey: string,
package/src/index.ts CHANGED
@@ -113,7 +113,7 @@ export default function register(api: any) {
113
113
  api.registerTool({
114
114
  name: "twindex_setup",
115
115
  description:
116
- "Set up Twindex music notifications for the user. YOU are the user's interface to Twindex — do NOT tell them to visit a website. Registers, subscribes to artists, and starts polling. Call this when the user asks for music updates, mentions twindex.ai, or wants to follow artists.",
116
+ "Set up New Lore music notifications for the user. YOU are the user's interface to New Lore — do NOT tell them to visit a website. Registers, subscribes to artists, and starts polling. Call this when the user asks for music updates, mentions newlore.ai, or wants to follow artists.",
117
117
  parameters: {
118
118
  type: "object",
119
119
  properties: {
@@ -140,12 +140,17 @@ export default function register(api: any) {
140
140
  description:
141
141
  "Delivery channel. Defaults to telegram.",
142
142
  },
143
+ city: {
144
+ type: "string",
145
+ description:
146
+ "User's preferred city for tour notifications (e.g. 'san-francisco', 'new-york', 'london'). When set, tour notifications highlight shows in this city.",
147
+ },
143
148
  },
144
149
  required: ["artists", "frequency", "chat_target"],
145
150
  },
146
151
  async execute(
147
152
  _id: string,
148
- params: { artists: string[]; frequency: string; chat_target: string; chat_channel?: string },
153
+ params: { artists: string[]; frequency: string; chat_target: string; chat_channel?: string; city?: string },
149
154
  ) {
150
155
  try {
151
156
  const config = cfg();
@@ -166,8 +171,17 @@ export default function register(api: any) {
166
171
  frequency: params.frequency,
167
172
  chatTarget: params.chat_target,
168
173
  chatChannel: params.chat_channel ?? "telegram",
174
+ city: params.city ?? "",
169
175
  });
170
176
 
177
+ if (params.city) {
178
+ try {
179
+ await twindex.setCity(apiKey, params.city);
180
+ } catch (err: any) {
181
+ // Non-fatal — city is a preference, not required
182
+ }
183
+ }
184
+
171
185
  const results: string[] = [];
172
186
  for (const artist of params.artists) {
173
187
  try {
@@ -1,11 +1,11 @@
1
1
  // SSE background service — replaces cron polling with real-time push.
2
- // Opens persistent connection to twindex.ai/api/v1/notifications/stream,
2
+ // Opens persistent connection to newlore.ai/api/v1/notifications/stream,
3
3
  // delivers notifications via `openclaw agent` CLI, marks them read.
4
4
 
5
5
  import { execFile } from "child_process";
6
6
  import * as twindex from "./client.js";
7
7
 
8
- const BASE_URL = "https://twindex.ai";
8
+ const BASE_URL = "https://newlore.ai";
9
9
  const BACKOFF_STEPS = [1000, 2000, 5000, 10_000, 30_000, 60_000];
10
10
 
11
11
  function runAgent(message: string): Promise<boolean> {