@peakflo/agent-harness 0.2.20 → 0.2.21-rc.1

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.
@@ -41,6 +41,13 @@ export const NON_SECRET_CREDENTIAL_FIELDS = Object.freeze([
41
41
  /** The current authenticator code: fill only, never a proxy field. */
42
42
  export const TOTP_FIELD = 'totp';
43
43
 
44
+ /**
45
+ * The newest login code e-mailed to the credential's inbox (core
46
+ * AGENT_EMAIL_CODE_FIELD): fill only, never a proxy field. Same element rule
47
+ * as TOTP.
48
+ */
49
+ export const EMAIL_CODE_FIELD = 'emailCode';
50
+
44
51
  export const CREDENTIAL_ID_RE =
45
52
  /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
46
53
  export const FIELD_RE = /^[A-Za-z][A-Za-z0-9]{0,63}$/;
@@ -132,7 +139,7 @@ export function elementAllowsField(field, info) {
132
139
  if (field === 'username') {
133
140
  return tag === 'INPUT' && (TEXTISH.has(type) || type === '');
134
141
  }
135
- if (field === TOTP_FIELD) {
142
+ if (field === TOTP_FIELD || field === EMAIL_CODE_FIELD) {
136
143
  if (tag !== 'INPUT') return false;
137
144
  if (['text', 'tel', 'number', ''].includes(type)) return true;
138
145
  return tokens.includes('one-time-code') && type === 'password';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peakflo/agent-harness",
3
- "version": "0.2.20",
3
+ "version": "0.2.21-rc.1",
4
4
  "description": "Headless Peakflo coding-agent harness. One codebase, three hosting modes: a Daytona cloud sandbox, a customer VM, and the 20x desktop.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",