@f5-sales-demo/xcsh 23.2.2 → 23.3.4

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 (32) hide show
  1. package/package.json +8 -8
  2. package/src/commands/blindfold-args.ts +16 -3
  3. package/src/commands/blindfold-help.ts +2 -2
  4. package/src/commands/blindfold.ts +2 -2
  5. package/src/internal-urls/api-catalog-index.generated.ts +25301 -25301
  6. package/src/internal-urls/api-catalog-qmd-index.generated.ts +2 -2
  7. package/src/internal-urls/api-catalog-resolve.ts +4 -0
  8. package/src/internal-urls/api-spec-index.generated.ts +1 -1
  9. package/src/internal-urls/api-spec-resolve.ts +7 -1
  10. package/src/internal-urls/build-info.generated.ts +9 -9
  11. package/src/internal-urls/docs-index.generated.ts +2 -1
  12. package/src/internal-urls/immutable-selection.ts +178 -0
  13. package/src/internal-urls/public-citation-destinations.generated.ts +2 -2
  14. package/src/internal-urls/terraform-documentation-assets.generated.ts +28 -28
  15. package/src/internal-urls/terraform-documentation.ts +1 -1
  16. package/src/internal-urls/terraform-index.generated.ts +1 -1
  17. package/src/internal-urls/terraform-property-index.ts +14 -1
  18. package/src/internal-urls/terraform-property-ranking.ts +10 -3
  19. package/src/internal-urls/terraform-provider-pin.generated.ts +1 -1
  20. package/src/prompts/tools/xcsh-api.md +2 -0
  21. package/src/prompts/tools/xcsh-blindfold.md +1 -1
  22. package/src/services/blindfold-contract/blindfold-contract-v1.txt +1 -0
  23. package/src/services/blindfold-contract/lock.json +6 -0
  24. package/src/services/blindfold-documents.ts +1 -12
  25. package/src/services/blindfold-ensure.ts +428 -0
  26. package/src/services/blindfold.ts +16 -6
  27. package/src/terraform-documentation-smoke.ts +2 -2
  28. package/src/terraform-port-smoke.ts +15 -0
  29. package/src/tools/xcsh-api-renderer.ts +16 -0
  30. package/src/tools/xcsh-api-replacement.ts +524 -0
  31. package/src/tools/xcsh-api.ts +61 -0
  32. package/src/tools/xcsh-blindfold.ts +6 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@f5-sales-demo/xcsh",
4
- "version": "23.2.2",
4
+ "version": "23.3.4",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://github.com/f5-sales-demo/xcsh",
7
7
  "author": "Can Boluk",
@@ -68,13 +68,13 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@agentclientprotocol/sdk": "1.4.0",
71
- "@f5-sales-demo/pi-agent-core": "23.2.2",
72
- "@f5-sales-demo/pi-ai": "23.2.2",
73
- "@f5-sales-demo/pi-natives": "23.2.2",
74
- "@f5-sales-demo/pi-resource-management": "23.2.2",
75
- "@f5-sales-demo/pi-tui": "23.2.2",
76
- "@f5-sales-demo/pi-utils": "23.2.2",
77
- "@f5-sales-demo/xcsh-stats": "23.2.2",
71
+ "@f5-sales-demo/pi-agent-core": "23.3.4",
72
+ "@f5-sales-demo/pi-ai": "23.3.4",
73
+ "@f5-sales-demo/pi-natives": "23.3.4",
74
+ "@f5-sales-demo/pi-resource-management": "23.3.4",
75
+ "@f5-sales-demo/pi-tui": "23.3.4",
76
+ "@f5-sales-demo/pi-utils": "23.3.4",
77
+ "@f5-sales-demo/xcsh-stats": "23.3.4",
78
78
  "@mozilla/readability": "^0.6",
79
79
  "@resvg/resvg-wasm": "2.6.2",
80
80
  "@sinclair/typebox": "0.34.52",
@@ -3,6 +3,7 @@ import { Args, CliUsageError, Flags, parseCommandArgv } from "@f5-sales-demo/pi-
3
3
  import type { BlindfoldArgs, BlindfoldOperation } from "../services/blindfold";
4
4
 
5
5
  export const blindfoldFlags = {
6
+ file: Flags.string({ char: "f", description: "Resource manifest with x-xcsh-blindfold version 1" }),
6
7
  input: Flags.string({ description: "Secret filename or - for stdin" }),
7
8
  "public-key": Flags.string({ description: "Public key JSON/YAML file; requires --policy-document (offline)" }),
8
9
  "policy-document": Flags.string({ description: "Policy JSON/YAML file; requires --public-key (offline)" }),
@@ -25,7 +26,7 @@ export const blindfoldFlags = {
25
26
  json: Flags.boolean({ description: "Print public JSON report" }),
26
27
  };
27
28
  const aliases = { "get-public-key": "public-key", "get-policy-document": "policy", encrypt: "encrypt" } as const;
28
- const supported = ["public-key", "policy", "encrypt", "certificate", "create", "replace"];
29
+ const supported = ["public-key", "policy", "encrypt", "certificate", "create", "replace", "ensure"];
29
30
  const common = ["context-name", "output-file", "result-file", "json"];
30
31
  export function flagsForBlindfold(operation: string, compatibility = false) {
31
32
  const names =
@@ -43,7 +44,18 @@ export function flagsForBlindfold(operation: string, compatibility = false) {
43
44
  "encoding",
44
45
  ...(compatibility ? ["outfile", "outfmt"] : []),
45
46
  ]
46
- : [...common, "cert", "key", "bundle", "name", "namespace", "policy", "passphrase-env", "dry-run"];
47
+ : [
48
+ ...common,
49
+ ...(operation === "ensure" ? ["file"] : []),
50
+ "cert",
51
+ "key",
52
+ "bundle",
53
+ "name",
54
+ "namespace",
55
+ "policy",
56
+ "passphrase-env",
57
+ "dry-run",
58
+ ];
47
59
  return Object.fromEntries(names.map(name => [name, blindfoldFlags[name as keyof typeof blindfoldFlags]]));
48
60
  }
49
61
  export function parseBlindfoldCli(
@@ -70,6 +82,7 @@ export function parseBlindfoldCli(
70
82
  throw new CliUsageError("Select one secret input source");
71
83
  const args: BlindfoldArgs & { json?: boolean } = {
72
84
  operation: operation as BlindfoldOperation,
85
+ file: f.file as string | undefined,
73
86
  compatibility,
74
87
  encoding: f.encoding as "base64" | "location" | undefined,
75
88
  outfile: f.outfile as string | undefined,
@@ -125,7 +138,7 @@ export function parseBlindfoldCli(
125
138
  )
126
139
  )
127
140
  throw new CliUsageError("File paths must be nonempty");
128
- if (["certificate", "create", "replace"].includes(operation)) {
141
+ if (["certificate", "create", "replace", "ensure"].includes(operation) && !args.file) {
129
142
  if (!args.name || (args.bundle ? args.cert || args.key : !args.cert || !args.key))
130
143
  throw new CliUsageError("Use --name and either --bundle or --cert with --key");
131
144
  }
@@ -19,13 +19,13 @@ export function showBlindfoldHelp(argv: string[], bin: string): void {
19
19
  if (!operation || ["--help", "-h"].includes(operation)) {
20
20
  writeCliOutput(
21
21
  process.stdout,
22
- `${bin} ${compatibility ? "request secrets" : "blindfold"} ${compatibility ? "get-public-key | get-policy-document | encrypt" : "public-key | policy | encrypt | certificate | create | replace"}\nUse an operation followed by --help. Authentication uses xcsh context.\n`,
22
+ `${bin} ${compatibility ? "request secrets" : "blindfold"} ${compatibility ? "get-public-key | get-policy-document | encrypt" : "public-key | policy | encrypt | certificate | create | replace | ensure"}\nUse an operation followed by --help. Authentication uses xcsh context.\n`,
23
23
  );
24
24
  return;
25
25
  }
26
26
  try {
27
27
  if (
28
- !["public-key", "policy", "encrypt", "certificate", "create", "replace"].includes(operation) ||
28
+ !["public-key", "policy", "encrypt", "certificate", "create", "replace", "ensure"].includes(operation) ||
29
29
  (compatibility && !["get-public-key", "get-policy-document", "encrypt"].includes(leaf!))
30
30
  )
31
31
  throw new CliUsageError("Unknown Blindfold operation");
@@ -26,7 +26,7 @@ export async function runBlindfold(argv: string[], compatibility = false): Promi
26
26
  },
27
27
  });
28
28
  const report = await service.run(args, { signal: controller.signal });
29
- if (args.json || args.outputFile || ["create", "replace"].includes(report.operation))
29
+ if (args.json || args.outputFile || ["create", "replace", "ensure"].includes(report.operation))
30
30
  writeCliOutput(process.stdout, `${JSON.stringify(report, null, 2)}\n`);
31
31
  } catch (error) {
32
32
  writeCliOutput(
@@ -44,7 +44,7 @@ export default class Blindfold extends Command {
44
44
  static args = {
45
45
  operation: Args.string({
46
46
  required: true,
47
- description: "public-key, policy, encrypt, certificate, create, replace",
47
+ description: "public-key, policy, encrypt, certificate, create, replace, ensure",
48
48
  }),
49
49
  file: Args.string({ description: "Encryption input file or - for redirected stdin" }),
50
50
  };