pandora-cli-skills 1.1.63 → 1.1.64

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.
package/SKILL.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: pandora-cli-skills
3
3
  summary: Canonical skill and operator guide for Pandora CLI including mirror, polymarket, resolve, and LP flows.
4
- version: 1.1.63
4
+ version: 1.1.64
5
5
  ---
6
6
 
7
7
  # Pandora CLI & Skills
@@ -14,6 +14,19 @@ function toTimestampSeconds(value) {
14
14
  return Math.floor(parsed / 1000);
15
15
  }
16
16
 
17
+ function resolvePolymarketTimestampValue(row) {
18
+ if (!row || typeof row !== 'object') return null;
19
+ return (
20
+ row.game_start_time ||
21
+ row.gameStartTime ||
22
+ row.endDateIso ||
23
+ row.end_date_iso ||
24
+ row.endDate ||
25
+ row.closedTime ||
26
+ null
27
+ );
28
+ }
29
+
17
30
  function normalizeTokens(tokens) {
18
31
  if (!Array.isArray(tokens) || !tokens.length) {
19
32
  return { yes: null, no: null, diagnostics: ['No token prices available from Polymarket market payload.'] };
@@ -92,9 +105,7 @@ function mapGammaRow(row) {
92
105
  const marketId = row && (row.conditionId || row.condition_id || row.id || row.questionID) ? String(
93
106
  row.conditionId || row.condition_id || row.id || row.questionID,
94
107
  ) : null;
95
- const closeTimestamp = toTimestampSeconds(
96
- row && (row.endDateIso || row.end_date_iso || row.endDate || row.game_start_time || row.closedTime),
97
- );
108
+ const closeTimestamp = toTimestampSeconds(resolvePolymarketTimestampValue(row));
98
109
  return {
99
110
  legId: `polymarket:${String(marketId || '')}`,
100
111
  venue: 'polymarket',
@@ -123,7 +134,7 @@ function mapPolymarketRow(row) {
123
134
  venue: 'polymarket',
124
135
  marketId,
125
136
  question,
126
- closeTimestamp: toTimestampSeconds(row.end_date_iso || row.game_start_time),
137
+ closeTimestamp: toTimestampSeconds(resolvePolymarketTimestampValue(row)),
127
138
  yesPct: mapped.yes,
128
139
  noPct: mapped.no,
129
140
  liquidityUsd: null,
@@ -49,6 +49,21 @@ function toTimestampSeconds(value) {
49
49
  return numeric > 1e12 ? Math.floor(numeric / 1000) : Math.floor(numeric);
50
50
  }
51
51
 
52
+ function resolvePolymarketEventTimestamp(row) {
53
+ if (!row || typeof row !== 'object') return null;
54
+ return (
55
+ row.game_start_time ||
56
+ row.gameStartTime ||
57
+ row.end_date_iso ||
58
+ row.endDateIso ||
59
+ row.endDate ||
60
+ row.end_date ||
61
+ row.accepting_orders_timestamp ||
62
+ row.closeTime ||
63
+ null
64
+ );
65
+ }
66
+
52
67
  function normalizeHostList(hostInput) {
53
68
  const rawValues = Array.isArray(hostInput) ? hostInput : String(hostInput || '').split(',');
54
69
  const hosts = rawValues
@@ -409,16 +424,7 @@ function normalizeMarketRow(row) {
409
424
  eventSlug: toStringOrNull(row && (row.event_slug || row.eventSlug)),
410
425
  eventTitle: toStringOrNull(row && (row.event_title || row.eventTitle)),
411
426
  description: rulesSections.length ? rulesSections.join('\n\n') : null,
412
- closeTimestamp: toTimestampSeconds(
413
- row &&
414
- (row.end_date_iso ||
415
- row.endDate ||
416
- row.end_date ||
417
- row.endDateIso ||
418
- row.accepting_orders_timestamp ||
419
- row.game_start_time ||
420
- row.closeTime),
421
- ),
427
+ closeTimestamp: toTimestampSeconds(resolvePolymarketEventTimestamp(row)),
422
428
  yesPct: tokens.yes,
423
429
  noPct: tokens.no,
424
430
  yesTokenId: tokens.yesTokenId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pandora-cli-skills",
3
- "version": "1.1.63",
3
+ "version": "1.1.64",
4
4
  "description": "Pandora CLI & Skills",
5
5
  "main": "cli/pandora.cjs",
6
6
  "bin": {