← back to Norma
chore: lint (0 fixes) + refactor (STORY_TTL_MS) + v1.1.0 (session close)
02b2ffa7f23dcecca14f9aad053a89be16c17de1 · 2026-08-10 12:39:16 -0700 · Steve
Files touched
M agents/instagram-agent/package.jsonM agents/instagram-agent/skills/story.js
Diff
commit 02b2ffa7f23dcecca14f9aad053a89be16c17de1
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Aug 10 12:39:16 2026 -0700
chore: lint (0 fixes) + refactor (STORY_TTL_MS) + v1.1.0 (session close)
---
agents/instagram-agent/package.json | 2 +-
agents/instagram-agent/skills/story.js | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/agents/instagram-agent/package.json b/agents/instagram-agent/package.json
index 0fabe8e..e765df2 100644
--- a/agents/instagram-agent/package.json
+++ b/agents/instagram-agent/package.json
@@ -1,6 +1,6 @@
{
"name": "norma-instagram-agent",
- "version": "1.0.0",
+ "version": "1.1.0",
"description": "Norma Instagram Agent — Posts, Reels, and Stories via Meta Graph API",
"main": "server.js",
"scripts": {
diff --git a/agents/instagram-agent/skills/story.js b/agents/instagram-agent/skills/story.js
index 3f72696..8c4da0e 100644
--- a/agents/instagram-agent/skills/story.js
+++ b/agents/instagram-agent/skills/story.js
@@ -14,6 +14,7 @@ const accounts = require('../accounts');
const AGENT = 'instagram-agent';
const PLATFORM = 'instagram';
+const STORY_TTL_MS = 24 * 60 * 60 * 1000; // stories expire after 24 hours
/**
* @param {Object} params - Request body
@@ -51,7 +52,7 @@ module.exports = async function story(params) {
// --- Simulation mode ---
const simulatedContainerId = `ig_story_container_${Date.now()}`;
const simulatedMediaId = `ig_story_${Date.now()}_${Math.random().toString(36).substring(2, 8)}`;
- const expiresAt = new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString();
+ const expiresAt = new Date(Date.now() + STORY_TTL_MS).toISOString();
console.log(`[${AGENT}] SIMULATED story created: container=${simulatedContainerId}, media=${simulatedMediaId}`);
console.log(`[${AGENT}] Story expires at: ${expiresAt}`);
@@ -102,7 +103,7 @@ module.exports = async function story(params) {
media_source: mediaSource,
permalink,
media_type: 'STORIES',
- expires_at: new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(),
+ expires_at: new Date(Date.now() + STORY_TTL_MS).toISOString(),
simulated: false,
posted: true,
platform: PLATFORM,
← 8a9959f IG poster: --product <handle> pulls a real DW product (live
·
back to Norma
·
auto-data-snapshot: 2026-08-10T13:03:09 (1 data files) — age 85c7619 →