instar 1.2.4 → 1.2.5

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.
@@ -2650,7 +2650,7 @@ export function createRoutes(ctx) {
2650
2650
  'POST /secrets/retrieve/:token — retrieve a submitted secret (one-time read)',
2651
2651
  'DELETE /secrets/pending/:token — cancel a pending request',
2652
2652
  ],
2653
- retrievalHint: 'When retrieving, ALWAYS use .instar/scripts/secret-drop-retrieve.mjs — it streams the value to stdout without ever printing the response body. The raw curl pattern leaks the secret into the Bash tool transcript.',
2653
+ retrievalHint: 'ALWAYS retrieve via `node .instar/scripts/secret-drop-retrieve.mjs TOKEN field-name` (use `--names` to discover fields). It streams the value to stdout and NEVER prints the response body. Raw curl against /secrets/retrieve dumps the secret into the Bash tool transcript — do not use it.',
2654
2654
  },
2655
2655
  topicMemory: {
2656
2656
  enabled: !!ctx.topicMemory,
@@ -7369,7 +7369,8 @@ export function createRoutes(ctx) {
7369
7369
  const systemMsg = `[secret-drop-stuck] Secret "${event.label}" was submitted but has not been consumed by an agent process. ` +
7370
7370
  `If you weren't expecting this, the consumer may have hit a bug. ` +
7371
7371
  `The submission will auto-clean in ~${event.minutesUntilCleanup} minute(s). ` +
7372
- `To retry, re-read it (non-destructive): curl -s -X POST -H "Authorization: Bearer $AUTH" http://localhost:${ctx.config.port}/secrets/retrieve/${event.token}.`;
7372
+ `To retry, use the hardened helper (non-destructive): node .instar/scripts/secret-drop-retrieve.mjs ${event.token} <field-name>. ` +
7373
+ `Discover field names with --names. DO NOT use raw curl against /secrets/retrieve.`;
7373
7374
  try {
7374
7375
  const sdRegistryPath = path.join(ctx.config.stateDir, 'topic-session-registry.json');
7375
7376
  let targetSession = null;
@@ -7492,8 +7493,10 @@ export function createRoutes(ctx) {
7492
7493
  const fieldCount = Object.keys(submission.values).length;
7493
7494
  const fieldNames = Object.keys(submission.values).join(', ');
7494
7495
  const systemMsg = `[secret-drop-received] Secret "${submission.label}" was just submitted (${fieldCount} field${fieldCount !== 1 ? 's' : ''}: ${fieldNames}). ` +
7495
- `Retrieve (non-destructive — safe to retry on parse error): curl -s -X POST -H "Authorization: Bearer $AUTH" http://localhost:${ctx.config.port}/secrets/retrieve/${req.params.token}. ` +
7496
- `When you have successfully handed off the value, consume it: append ?consume=true to the same URL. ` +
7496
+ `Retrieve with the HARDENED helper (streams field value to stdout, never prints the response body): node .instar/scripts/secret-drop-retrieve.mjs ${req.params.token} <field-name>. ` +
7497
+ `Discover field names with: node .instar/scripts/secret-drop-retrieve.mjs ${req.params.token} --names. ` +
7498
+ `Default is non-destructive (safe to retry); append --consume after successful handoff. ` +
7499
+ `DO NOT use raw curl against /secrets/retrieve — that pattern leaks the value into the Bash tool transcript. ` +
7497
7500
  `Then acknowledge receipt to the user conversationally via Telegram topic ${topicId}.`;
7498
7501
  const sdRegistryPath = path.join(ctx.config.stateDir, 'topic-session-registry.json');
7499
7502
  let targetSession = null;