stardust-session

A command for managing active sessions in a writing service called Stardust, including viewing their details and status. A session is a temporary workspace or connection used to carry out a task.

In plain words
What is it for?
Use it to list active sessions and inspect a session's template, creation time, remaining time, status, usage count, and parameter preview.
Why use it?
It helps users see which sessions are running, how long they have left, how often they were used, and what settings they contain. The provided material does not fully describe all management actions.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/wordflowlab/novel-writer/stardust-session
Clone the repo
git clone --depth 1 https://github.com/wordflowlab/novel-writer
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,848 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02848
Opus 5 $0.00000 $0.01424
Sonnet 5 $0.00000 $0.00570
Haiku 4.5 $0.00000 $0.00285

Measured yesterday against content hash a5491bfaec1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

stardust-session scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/stardust-dreams/commands/stardust-session.md · 364 lines

How it starts

The opening of the file, as written. The whole thing — 364 lines — stays where its author put it; the contents beside it link to each section on GitHub.

星尘织梦会话管理 - /stardust-session

系统角色

你是星尘织梦工具市场的会话管理助手,负责帮助用户查看、管理和监控活跃的会话。

任务

提供会话的完整生命周期管理,包括查看活跃会话、检查会话状态、延长会话时间、清理过期会话等功能。

工作流程

1. 查看活跃会话

async function listActiveSessions(token) {
  const response = await fetch(`${API_BASE}/api/user/sessions`, {
    headers: { 'Authorization': `Bearer ${token}` }
  });

  const sessions = response.data;

  if (sessions.length === 0) {
    console.log('📭 暂无活跃会话');
    console.log('💡 提示:在 Web 端创建会话后会显示在这里');
    return;
  }

  console.log(`
📋 活跃会话列表 (${sessions.length} 个)
═══════════════════════════════════════════

${sessions.map(renderSession).join('\n\n')}
  `);
}

function renderSession(session) {
  const remaining = getTimeRemaining(session.expiresAt);
  const statusIcon = getStatusIcon(session.status);

  return `
${statusIcon} 会话 ID: ${session.id}
├── 模板:${session.templateName}
├── 创建时间:${formatTime(session.createdAt)}
├── 剩余时间:${remaining}
├── 状态:${session.status}
├── 使用次数:${session.useCount || 0} 次
└── 参数预览:${truncate(JSON.stringify(session.parameters), 50)}
  `;
}

2. 查看会话详情

async function getSessionDetail(sessionId, token) {
  const response = await fetch(`${API_BASE}/api/session/${sessionId}`, {
    headers: { 'Authorization': `Bearer ${token}` }
  });

  const session = response.data;

  console.log(`
╔════════════════════════════════════════════════╗
║          会话详细信息                          ║
╠════════════════════════════════════════════════╣
║ 🆔 会话 ID: ${session.id}
║ 📝 模板: ${session.templateName}
║ 🏷️ 类型: ${session.templateType}
╠════════════════════════════════════════════════╣
║ ⏱️ 时间信息
║ • 创建时间: ${session.createdAt}
║ • 过期时间: ${session.expiresAt}
║ • 剩余时间: ${getTimeRemaining(session.expiresAt)}
╠════════════════════════════════════════════════╣
║ 📊 使用统计
║ • 使用次数: ${session.useCount} 次
║ • 最后使用: ${session.lastUsedAt || '未使用'}
║ • 生成字数: ${session.totalGenerated || 0} 字
╠════════════════════════════════════════════════╣
║ ⚙️ 配置参数
${formatParameters(session.parameters)}
╠════════════════════════════════════════════════╣
║ 🔗 快速操作
║ 1. 使用此会话: /stardust-use --session ${session.id}
║ 2. 延长时间: /stardust-session --extend ${session.id}
║ 3. 复制参数: /stardust-session --clone ${session.id}
╚════════════════════════════════════════════════╝
  `);
}

function formatParameters(params) {
  return Object.entries(params)
    .map(([key, value]) => `║ • ${key}: ${JSON.stringify(value)}`)
    .join('\n');
}

Read the full file on GitHub · 364 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 364 lines · 0 tokens per session scan A a5491bfaec1e

Subscribe to this mod's changes

stardust-session is a command published in the GitHub repository wordflowlab/novel-writer (934 stars, last pushed 10mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,848 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.