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.
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +37 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +46 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +2 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +7 -4
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +70 -62
- package/src/scaffold/templates.ts +2 -1
- package/src/templates/scripts/secret-drop-retrieve.mjs +125 -0
- package/upgrades/1.2.5.md +56 -0
- package/upgrades/side-effects/secret-drop-hardened-retrieve-template.md +123 -0
package/dist/server/routes.js
CHANGED
|
@@ -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: '
|
|
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,
|
|
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
|
|
7496
|
-
`
|
|
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;
|