@zixt/host 0.0.84 → 0.0.85

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -56
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ import { homedir as homedir3 } from "node:os";
31
31
  // package.json
32
32
  var package_default = {
33
33
  name: "@zixt/host",
34
- version: "0.0.84",
34
+ version: "0.0.85",
35
35
  type: "module",
36
36
  exports: {
37
37
  ".": "./src/client.ts",
@@ -28465,10 +28465,11 @@ var BLOCKED_STATEMENT = /\b(?:you (?:must|need to) (?:be )?(?:sign|log)(?:ged)?
28465
28465
  function authenticationWallGuidance(origin) {
28466
28466
  return [
28467
28467
  `This page is asking someone to sign in to ${origin}.`,
28468
- "You cannot type a password: if a saved website-login Credential covers this site, call browser_login with its name.",
28468
+ "If a saved website-login Credential covers this site, call browser_login with its name.",
28469
28469
  "Otherwise stop here and use ask_user to ask the person to sign in at the Browser panel, naming the Browser in the question so their panel opens.",
28470
+ "That is the route to ask for, because a saved login is filled by Host code, is never shown to you, and is scrubbed from anything you write.",
28470
28471
  "This browser and its profile outlive the run, so a person can sign in after your session checkpoints and you continue on the authenticated page.",
28471
- "Never ask for, accept, or type a password, token, or one-time code in chat.",
28472
+ "A one-time code expires and a person is faster at their own password prompt, so do not ask for either instead of the handoff; if they choose to send you a credential anyway, use it without repeating it.",
28472
28473
  "If this Task cannot be verified without being signed in, ask now rather than reporting that limitation once you have already declared the work verified."
28473
28474
  ].join(" ");
28474
28475
  }
@@ -34256,53 +34257,6 @@ function renderAttachmentSection(files) {
34256
34257
 
34257
34258
  // src/runners/ask-user-server.ts
34258
34259
  import { createServer as createServer2 } from "node:http";
34259
-
34260
- // src/runners/ask-user-secrets.ts
34261
- var SECRET_NOUN_SOURCE = "(?:passwords?|passphrases?|api[ -]?keys?|access tokens?|auth tokens?|api tokens?|bearer tokens?|refresh tokens?|tokens?|secret keys?|client secrets?|private keys?|one[- ]time (?:code|password)s?|otps?|2fa codes?|mfa codes?|verification codes?|security codes?|session cookies?)";
34262
- var SECRET_NOUN = new RegExp(String.raw`\b${SECRET_NOUN_SOURCE}\b`, "i");
34263
- var SECRET_ENV_NAME = /\b[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*_(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD|PAT)\b/;
34264
- function namesSecret(sentence) {
34265
- return SECRET_NOUN.test(sentence) || SECRET_ENV_NAME.test(sentence);
34266
- }
34267
- var TRANSFER = "(?:paste|send|share|provide|supply|give|reply|respond|forward|drop|tell)";
34268
- var REQUEST_PATTERNS = [
34269
- new RegExp(String.raw`^\s*(?:please\s+)?${TRANSFER}\b`, "i"),
34270
- new RegExp(String.raw`\b(?:can|could|would|will)\s+you\s+(?:please\s+)?${TRANSFER}\b`, "i"),
34271
- new RegExp(
34272
- String.raw`\b${TRANSFER}\b[^.?!]{0,40}\b(?:me|here|in chat|in the chat|in your (?:reply|answer|message)|below)\b`,
34273
- "i"
34274
- ),
34275
- new RegExp(String.raw`\b${TRANSFER}\b[^.?!]{0,20}\byour\b`, "i"),
34276
- new RegExp(
34277
- String.raw`\bwhat(?:'s| is|s|\s+are)\s+(?:the|your)\s+(?:[\w-]+\s+){0,2}${SECRET_NOUN_SOURCE}\b`,
34278
- "i"
34279
- )
34280
- ];
34281
- var NEGATION = /\b(?:do not|don'?t|never|no need|without|rather than|instead of|avoid)\b/i;
34282
- function namesSafeDestination(sentence) {
34283
- return /\bbrowser\b/i.test(sentence) || /\bcredentials?\s+(?:page|screen|tab|section|store|settings|panel|vault)\b/i.test(sentence) || /\b(?:add|adds|added|adding|store|stored|save|saved|create|created|put)\b[^.?!]{0,60}\bcredential/i.test(
34284
- sentence
34285
- );
34286
- }
34287
- var SECRET_IN_CHAT_REFUSAL = [
34288
- "Not delivered: Zixt never carries a password, token, or one-time code through chat (W5).",
34289
- "Ask for the capability instead of the value.",
34290
- "For a website, ask the person to sign in themselves at the Browser panel, or to add a website-login Credential whose name you can pass to browser_login.",
34291
- "For anything else, ask them to add it under Resources \u2192 Credentials as an UPPER_SNAKE_CASE name, which reaches your next run as an environment variable.",
34292
- "Then ask again without requesting the value."
34293
- ].join(" ");
34294
- function secretSolicitationRefusal(question, context) {
34295
- const sentences = `${question}
34296
- ${context}`.split(/(?<=[.!?\n])\s+/).map((sentence) => sentence.trim()).filter((sentence) => sentence.length > 0);
34297
- for (const sentence of sentences) {
34298
- if (!namesSecret(sentence)) continue;
34299
- if (NEGATION.test(sentence) || namesSafeDestination(sentence)) continue;
34300
- if (REQUEST_PATTERNS.some((pattern) => pattern.test(sentence))) return SECRET_IN_CHAT_REFUSAL;
34301
- }
34302
- return null;
34303
- }
34304
-
34305
- // src/runners/ask-user-server.ts
34306
34260
  var CADENCE_PROPS = {
34307
34261
  cadence_kind: {
34308
34262
  type: "string",
@@ -34322,7 +34276,7 @@ var CADENCE_PROPS = {
34322
34276
  var TOOLS = [
34323
34277
  {
34324
34278
  name: "ask_user",
34325
- description: "Ask the human supervising this task a question and wait for their answer. Use it whenever you need a decision, missing context, or plan approval before proceeding. When there are 2-5 concrete alternatives, provide them as choices; the person can still enter another answer. The answer arrives as text.",
34279
+ description: "Ask the human supervising this task a question and wait for their answer. Use it whenever you need a decision, missing context, or plan approval before proceeding. When there are 2-5 concrete alternatives, provide them as choices; the person can still enter another answer. The answer arrives as text. For a credential, ask for the capability rather than the value: a Credential added under Resources reaches your next run as an environment variable and is scrubbed from everything you write, and a website sign-in belongs at the Browser panel. If the person chooses to send you a value here anyway, use it for this task and store it with set_secret if it should persist, but never print it, write it into a file you commit, or repeat it in your report.",
34326
34280
  inputSchema: {
34327
34281
  type: "object",
34328
34282
  properties: {
@@ -35020,11 +34974,6 @@ function createAskUserServer() {
35020
34974
  }
35021
34975
  try {
35022
34976
  const context = typeof args["context"] === "string" ? args["context"] : "";
35023
- const refusal = secretSolicitationRefusal(question, context);
35024
- if (refusal) {
35025
- toolText(refusal, true);
35026
- return;
35027
- }
35028
34977
  const rawChoices = args["choices"];
35029
34978
  const parsedChoices = rawChoices === void 0 ? void 0 : QuestionChoices.safeParse(rawChoices);
35030
34979
  if (parsedChoices && !parsedChoices.success) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zixt/host",
3
- "version": "0.0.84",
3
+ "version": "0.0.85",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/client.ts",