@blogic-cz/agent-tools 1.6.5 → 1.6.6
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/README.md
CHANGED
|
@@ -670,7 +670,7 @@ Python JSON parsing, dictionary iteration, and printing are not themselves evide
|
|
|
670
670
|
|
|
671
671
|
The bounded Python subprocess proof supports one immutable literal argv binding followed by one `subprocess.run` call. A literal `cwd` is replayed as a quoted, success-gated directory change before the nested argv, so relative reader operands and named directories receive the ordinary path policies. Supported directories are literal relative or absolute paths, including quoted spaces. Empty, dynamic, Unicode, escaped, tilde and other unsupported directory forms refuse rather than dropping the context. Cwd proof recursively unwraps only supported command, RTK proxy and environment wrappers. Environment directory/split-string options and unproved wrapper forms refuse. Only supported passive text, reader, metadata, literal Bun script and blocked CLI roles receive nested replay; shell executors, inline interpreter programs, unproved sed programs, find execution actions and unknown command roles refuse. Nested blocked CLI, environment, sensitive-path and custom-command policies remain active. Outer shell redirects retain their original shell directory. Arbitrary multi-call Python and `check_output` programs remain unsupported; direct Git metadata commands provide index/tree inspection.
|
|
672
672
|
|
|
673
|
-
Supported runtime script/tool operands form an argument boundary: a later tool `-c` configuration flag is data. Genuine eval and loader flags, Bun exec/repl and unproved startup-option arity still refuse. Literal Herdr prompts can compose with
|
|
673
|
+
Supported runtime script/tool operands form an argument boundary: a later tool `-c` configuration flag is data. Genuine eval and loader flags, Bun exec/repl and unproved startup-option arity still refuse. Literal Herdr prompts can compose with literal agent-get, pane-read and agent-read forms and passive consumers. Both read forms require a literal identifier followed by `--source recent-unwrapped --lines N`, with positive integer `N`. A separate `sleep N` command accepts one literal nonnegative integer or decimal duration; delay pipelines, options and extra operands receive no composition proof. Delay redirects receive the ordinary sensitive-path checks. The wrapper sleep-polling guard still applies. One literal `--sql` operand on the supported `bun run db-tool sql/query` shape can contain SQL braces; substitutions, duplicate SQL operands and unknown wrapper options receive no exception. SQL output pipelines require closed passive consumers, so shell, xargs and unknown executors refuse. Numeric `$?` can appear only in passive echo/printf data operands, with passive pipeline consumers. Explicitly approved environment names can appear in quoted equality or blankness tests, including the quoted empty default `${NAME:-}`. This does not add default-approved names or permit shell evaluators. One sed print program with numeric or escaped-regex addresses/ranges and known `-n`/`-E` flags is passive; execution/read/write callbacks, extra programs and script files receive no print proof. Local file bindings use that same closed print proof and never a generic sed-word fallback. Ordinary path and configured command policies still apply to all these forms.
|
|
674
674
|
|
|
675
675
|
Literal shell bodies receive recursive shared policy replay under exact `sh -c`/`bash -c` and `zsh -f -c` invocations, using only these bare executable names or their `/bin/` and `/usr/bin/` paths and known RTK/command wrappers. Both protected paths and blocked CLIs remain enforced inside the body, along with environment and custom-command policies. A conventional shell-family name or numeric version in an unproved executing operand/control position refuses; proved literal text, reader and file-metadata operands remain data. Only the listed sh/bash/zsh identities receive body replay; rbash/rksh/ksh93 and versioned names refuse, and arbitrary renamed executables are outside this identity proof. Replay permits only existing closed body roles/materializations, at most eight shell levels and 64 KiB per invocation. Unproved options, environment prefixes, active exec/nohup/sudo wrappers, positional/script/stdin forms, executable binders, control flow and outer directory changes around a wrapper refuse. A body-internal proved cd affects body readers; outer redirects retain the outer shell directory. This is a textual body proof, not verification of native binaries or all host startup code. In particular, zsh -f still sources the global zshenv file. For unsupported executable inventories, use separate literal metadata requests and literal candidate invocations; no program name or --version flag receives a special exception.
|
|
676
676
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/credential-guard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAmB,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAK5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAM/D,8CAA8C;AAC9C,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,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AAqB,GAAG,eAAe,CA4VrF;AAQD,kEAAkE;AAClE,eAAO,MAAM,uBAAuB,UAphGD,SAAS,UAAU,UAAU,KAAK,IAohGM,CAAC;AAE5E,oDAAoD;AACpD,eAAO,MAAM,aAAa,YAthGC,MAAM,KAAK;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAshGjB,CAAC;AAExD,yEAAyE;AACzE,eAAO,MAAM,aAAa,aAxhGE,MAAM,KAAK,OAwhGgB,CAAC;AAExD,yDAAyD;AACzD,eAAO,MAAM,aAAa,aA1hGE,MAAM,KAAK,OA0hGgB,CAAC;AAExD,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,YA5hGC,MAAM,KAAK,OA4hG0B,CAAC;AAE1E,iDAAiD;AACjD,eAAO,MAAM,iBAAiB,YA9hGC,MAAM,KAAK;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IA8hGf,CAAC;AAEhE,wDAAwD;AACxD,eAAO,MAAM,kBAAkB,YAhiGC,MAAM,KAAK,OAgiGsB,CAAC;AAElE,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB,YAliGC,MAAM,KAAK,MAAM,GAAG,IAkiGa,CAAC"}
|
package/package.json
CHANGED
|
@@ -510,23 +510,19 @@ function isLiteralLoopCommand(words: string[], marker: string, value: string): b
|
|
|
510
510
|
);
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
function isLiteralHerdrPaneRead(argv: string[]): boolean {
|
|
514
|
-
return (
|
|
515
|
-
argv.length === 8 &&
|
|
516
|
-
argv.slice(0, 3).join(" ") === "herdr pane read" &&
|
|
517
|
-
/^[A-Za-z0-9_.:-]+$/.test(argv[3] ?? "") &&
|
|
518
|
-
argv[4] === "--source" &&
|
|
519
|
-
argv[5] === "recent-unwrapped" &&
|
|
520
|
-
argv[6] === "--lines" &&
|
|
521
|
-
/^[1-9]\d*$/.test(argv[7] ?? "")
|
|
522
|
-
);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
513
|
function isLiteralHerdrRead(argv: string[]): boolean {
|
|
526
514
|
return (
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
/^[A-Za-z0-9_.:-]+$/.test(argv[3] ?? "")
|
|
515
|
+
argv[0] === "herdr" &&
|
|
516
|
+
!argv[3]?.startsWith("-") &&
|
|
517
|
+
/^[A-Za-z0-9_.:-]+$/.test(argv[3] ?? "") &&
|
|
518
|
+
((argv.length === 4 && argv[1] === "agent" && argv[2] === "get") ||
|
|
519
|
+
(argv.length === 8 &&
|
|
520
|
+
["pane", "agent"].includes(argv[1] ?? "") &&
|
|
521
|
+
argv[2] === "read" &&
|
|
522
|
+
argv[4] === "--source" &&
|
|
523
|
+
argv[5] === "recent-unwrapped" &&
|
|
524
|
+
argv[6] === "--lines" &&
|
|
525
|
+
/^[1-9]\d*$/.test(argv[7] ?? "")))
|
|
530
526
|
);
|
|
531
527
|
}
|
|
532
528
|
|
|
@@ -1944,6 +1940,13 @@ function isStaticHerdrPrompt(command: string): boolean {
|
|
|
1944
1940
|
);
|
|
1945
1941
|
if (isPassiveTextCommand(argv)) return true;
|
|
1946
1942
|
if (isLiteralHerdrRead(argv)) return index === 0;
|
|
1943
|
+
if (argv[0] === "sleep")
|
|
1944
|
+
return (
|
|
1945
|
+
index === 0 &&
|
|
1946
|
+
pipeline.length === 1 &&
|
|
1947
|
+
argv.length === 2 &&
|
|
1948
|
+
/^\d+(?:\.\d+)?$/.test(argv[1] ?? "")
|
|
1949
|
+
);
|
|
1947
1950
|
if (isStaticNavigationCommand(argv))
|
|
1948
1951
|
return index === 0 && (argv[0] !== "cd" || pipeline.length === 1);
|
|
1949
1952
|
return false;
|