@ouro.bot/cli 0.1.0-alpha.434 → 0.1.0-alpha.435

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/changelog.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.435",
6
+ "changes": [
7
+ "Structured agent-vault items like `providers/*` and `runtime/*` now take a direct Bitwarden `bw get item` lookup fast path before falling back to filtered search, so connect, auth, and runtime-config reads spend less time holding the vault lane for work that already has an exact item name.",
8
+ "The Bitwarden store only trusts that fast path on an exact name match and still falls back to the older filtered search on fuzzy hits, missing items, or malformed direct responses, so the speedup lands without weakening correctness or duplicate protection.",
9
+ "Hermetic built-runtime coverage now understands the newer direct item lookup path too, so the connect bay, startup provider checks, and vault-backed runtime reads are tested against the same Bitwarden command shape the shipped CLI now uses."
10
+ ]
11
+ },
4
12
  {
5
13
  "version": "0.1.0-alpha.434",
6
14
  "changes": [
@@ -131,6 +131,16 @@ function isBwConfigLogoutRequired(err) {
131
131
  const message = err.message.toLowerCase();
132
132
  return message.includes("logout") && message.includes("required");
133
133
  }
134
+ function shouldPreferExactItemLookup(domain) {
135
+ return domain.includes("/");
136
+ }
137
+ function isBwDirectLookupFallbackError(err) {
138
+ const message = err.message.toLowerCase();
139
+ return (message.includes("bw cli error: not found") ||
140
+ message.includes("bw cli error: item not found") ||
141
+ message.includes("invalid json from bw get item") ||
142
+ message.includes("invalid item from bw get item"));
143
+ }
134
144
  // ---------------------------------------------------------------------------
135
145
  // Cross-process bw CLI lock
136
146
  // ---------------------------------------------------------------------------
@@ -671,6 +681,19 @@ class BitwardenCredentialStore {
671
681
  }
672
682
  // --- Private ---
673
683
  async findItemByDomain(domain, session) {
684
+ if (shouldPreferExactItemLookup(domain)) {
685
+ try {
686
+ const stdout = await execBw(["get", "item", domain], session, this.appDataDir);
687
+ const item = parseBwItem(stdout, "bw get item");
688
+ if (item.name === domain)
689
+ return item;
690
+ }
691
+ catch (error) {
692
+ const err = error;
693
+ if (!isBwDirectLookupFallbackError(err))
694
+ throw err;
695
+ }
696
+ }
674
697
  const stdout = await execBw(["list", "items", "--search", domain], session, this.appDataDir);
675
698
  const items = parseBwItems(stdout, "bw list items --search");
676
699
  // Find exact match by name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.434",
3
+ "version": "0.1.0-alpha.435",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",