loopengine 0.1.89 → 0.1.90

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.
@@ -1101,10 +1101,24 @@ ${consoleShellScript}
1101
1101
  function field(channel, html) {
1102
1102
  return '<div class="notifier-fields" data-channel="' + channel + '"' + (f.channel === channel ? '' : ' hidden') + '>' + html + '</div>';
1103
1103
  }
1104
+ // A secret's state at a glance: a pill by the label, and a placeholder
1105
+ // saying whether typing replaces a saved one. Its value is never shown.
1106
+ function secretPill(isSet) {
1107
+ return isSet ? '<span class="le-pill good">Saved</span>' : '<span class="le-pill warn">Not set</span>';
1108
+ }
1109
+ // The field's name and its pill on one line (form labels stack their
1110
+ // children, which would stretch the pill across the row).
1111
+ function secretHead(name, isSet) {
1112
+ return '<span style="display:flex;align-items:center;gap:8px">' + name + secretPill(isSet) + '</span>';
1113
+ }
1114
+ function secretPlaceholder(isSet, missing) {
1115
+ return isSet ? 'Saved ' + String.fromCharCode(8212) + ' type a new one only to replace it' : missing;
1116
+ }
1117
+ var SECRET_HINTS = { slack: 'xoxb-' + String.fromCharCode(8230) + ' from OAuth & Permissions', webhook: 'A long random string, or Generate', lark: 'App Secret from the Lark developer console' };
1104
1118
  function secretField(channel, label) {
1105
1119
  var isSet = n.secretsSet && n.secretsSet[channel];
1106
- return '<label>' + label + ' <span class="hint">(' + (isSet ? 'set &mdash; leave blank to keep it' : 'not set') + '; stored in this agent&#39;s env as ' + escapeHtml(n.secretVars[channel]) + ')</span>' +
1107
- '<span style="display:flex;gap:6px"><input type="password" name="secret_' + channel + '" autocomplete="off" style="flex:1;min-width:0">' +
1120
+ return '<label>' + secretHead(label, isSet) + '<span class="hint">(stored in this agent&#39;s env as ' + escapeHtml(n.secretVars[channel]) + ')</span>' +
1121
+ '<span style="display:flex;gap:6px"><input type="password" name="secret_' + channel + '" autocomplete="off" style="flex:1;min-width:0" placeholder="' + escapeHtml(secretPlaceholder(isSet, SECRET_HINTS[channel] || '')) + '">' +
1108
1122
  (channel === 'webhook' ? '<button type="button" class="notifier-generate">Generate</button>' : '') + '</span></label>';
1109
1123
  }
1110
1124
  return '<form class="add-source" id="notifierForm" style="max-width:560px">' +
@@ -1128,9 +1142,9 @@ ${consoleShellScript}
1128
1142
  '<span style="display:flex;gap:6px"><select id="slackChannelSelect" style="flex:1;min-width:0"><option value="">' + (f.channelId ? 'Saved: ' + escapeHtml(f.channelId) : 'Load channels to pick one') + '</option></select>' +
1129
1143
  '<button type="button" id="slackLoadChannels">Load channels</button></span></label>' +
1130
1144
  '<label>Channel ID <span class="hint">(filled in when you pick a channel)</span><input name="channelId" placeholder="C0123ABC456" value="' + escapeHtml(f.channelId || '') + '"></label>' +
1131
- '<label>Signing secret <span class="hint">(optional, from Basic Information; ' +
1132
- (n.slack && n.slack.signingSecretSet ? 'set &mdash; Approve/Deny buttons are on' : 'adds Approve/Deny buttons inside Slack; without it, messages carry the approval link') + ')</span>' +
1133
- '<input type="password" name="signingSecret" autocomplete="off"></label>' +
1145
+ '<label>' + secretHead('Signing secret', n.slack && n.slack.signingSecretSet) + '<span class="hint">(from Basic Information ' + String.fromCharCode(8594) + ' App Credentials; ' +
1146
+ (n.slack && n.slack.signingSecretSet ? 'buttons and replies in Slack are on' : 'needed for buttons and replies in Slack; without it, messages only carry the approval link') + ')</span>' +
1147
+ '<input type="password" name="signingSecret" autocomplete="off" placeholder="' + escapeHtml(secretPlaceholder(n.slack && n.slack.signingSecretSet, 'Paste the Signing Secret')) + '"></label>' +
1134
1148
  '<p class="hint" style="margin:0">Buttons send their clicks to <code id="slackInteractivityUrl"></code> (the manifest already points there).</p>' +
1135
1149
  renderConversationsField(n, f) +
1136
1150
  '<p class="hint" style="margin:0" id="slackEventsNote"></p>') +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopengine",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "type": "module",
5
5
  "description": "Runtime for tool-using AI agents with a transparent ReAct loop.",
6
6
  "license": "MIT",