@hardfin/cli 0.1.1-dev.39 → 0.1.1-dev.41

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
@@ -342,6 +342,10 @@ The server is the hosted one at the authorization server's host, `https://api.ha
342
342
  by default. Every other server in an MCP config, and everything in `AGENTS.md` outside the
343
343
  markers, is left as it was. A config that does not hold JSON is skipped, never overwritten.
344
344
 
345
+ `init` refuses an address that `config.local.json` or `.env` in the folder chose, because the
346
+ address goes into files every agent in the project reads. Pass `--issuer-url` to use it. The
347
+ address must be https, or this machine.
348
+
345
349
  The skill lives in `skills/` and the section in `templates/AGENTS.md`. Both ship in the npm
346
350
  package, so `init` writes the copy that matches the installed CLI.
347
351
 
@@ -373,7 +377,8 @@ asking and ask before anything changes.
373
377
 
374
378
  A command is a read when its endpoint's method is GET, or for `hardfin api` when no other
375
379
  `--method` is given. Anything else is a write, and `hardfin_read` refuses it by naming
376
- `hardfin_write`. Both tools carry a title, the read-only or destructive hint, and a link to
380
+ `hardfin_write`. The server asks the CLI's own parser what a call would run, so a flag whose
381
+ value is `--help`, or a `--method` given twice, is placed by what the command would do. Both tools carry a title, the read-only or destructive hint, and a link to
377
382
  the API reference, which Claude's connector directory requires.
378
383
 
379
384
  A tool call runs the CLI itself, so an agent and a person get identical parsing, output and
@@ -386,12 +391,33 @@ exit codes. Each call has these limits:
386
391
  | One argument | 128 KiB | Refused, pointing at the `input` argument |
387
392
  | Standard input | The call's `input` argument, or nothing | Always closed, so `--input -` never waits |
388
393
 
394
+ ### What a call may touch on this machine
395
+
396
+ An agent acts on what it reads, and a record can hold text written to steer it. So a call is
397
+ held to rules a person at a terminal is not.
398
+
399
+ | A call that | Is |
400
+ | -------------------------------------------------------------- | ------------------------------------------------------ |
401
+ | Names a path outside the folder the server runs in | Refused, links followed first |
402
+ | Names a hidden file or folder, such as `.env` or `.git` | Refused |
403
+ | Names `config.local.json`, the env file, or the sign in's file | Refused |
404
+ | Writes a file that already exists | Refused |
405
+ | Downloads with `--output <path>` | A write, so it runs through `hardfin_write` |
406
+ | Downloads with no `--output` | Refused, naming `--output -` to read the file in place |
407
+
408
+ The rules cover every flag that takes a path: `--input`, `--file` and `--output`. A person
409
+ runs the command themselves for a file the server will not reach.
410
+
389
411
  ### What it signs in as
390
412
 
391
413
  The server uses whatever credential this machine holds, so an agent acts as the person who
392
414
  ran `hardfin login`. Give an agent an API key through `HARDFIN_API_KEY` when it should act
393
415
  as an integration instead.
394
416
 
417
+ A call cannot set `--api-url`, `--api-key` or `--issuer-url`. Both tools refuse them, because
418
+ a call that chose the host could send the credential to it. Set `HARDFIN_API_URL`,
419
+ `HARDFIN_API_KEY` or `HARDFIN_ISSUER_URL` where the server is started.
420
+
395
421
  ## Diagnosing a problem
396
422
 
397
423
  `hardfin status` prints everything a support request needs, and is the first thing to send.
@@ -467,7 +493,11 @@ settings, and the one nearest the top wins.
467
493
  | Config file | `config.local.json` in the working directory | the defaults |
468
494
  | Default | the published API | nothing |
469
495
 
470
- An exported variable beats `.env` because Node leaves a variable that is already set alone.
496
+ An exported variable beats `.env`, because the CLI leaves a variable that is already set alone.
497
+
498
+ An env file sets only variables that begin with `HARDFIN_`. Anything else in it is ignored,
499
+ so a `.env` in a folder you cloned cannot set a variable such as `NODE_OPTIONS` for the
500
+ programs the CLI starts.
471
501
 
472
502
  ### What a local build writes
473
503
 
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ee01278c-9a53-5677-8abd-c28911112932")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="12877cfa-09aa-5239-8a24-ecc77a951641")}catch(e){}}();
4
4
  import module from "node:module";
5
5
  //#region src/cli.ts
6
6
  module.enableCompileCache?.();
@@ -14,7 +14,7 @@ process.on("unhandledRejection", (error) => void toCrash(error));
14
14
  try {
15
15
  const answer = await toQuickAnswer(process.argv.slice(2));
16
16
  if (answer === void 0) {
17
- const { toCli, toParseExitCode, wasReportAttempted } = await import("./program-d7dXAbE4.js");
17
+ const { toCli, toParseExitCode, wasReportAttempted } = await import("./program-C1-jZp6K.js");
18
18
  try {
19
19
  await toCli().parseAsync(process.argv);
20
20
  } catch (error) {
@@ -33,7 +33,7 @@ async function toCrash(error) {
33
33
  isCrashing = true;
34
34
  process.stderr.write(`error: ${error instanceof Error ? error.message : String(error)}\n`);
35
35
  try {
36
- const { toReported } = await import("./program-d7dXAbE4.js");
36
+ const { toReported } = await import("./program-C1-jZp6K.js");
37
37
  await toReported(error, false, void 0, "fatal");
38
38
  } finally {
39
39
  process.exit(1);
@@ -45,10 +45,10 @@ async function toCrash(error) {
45
45
  */
46
46
  async function toQuickAnswer(args) {
47
47
  if (args[0] !== "__complete" || args[1] !== "--") return;
48
- return (await import("./completion-quick-BJHDp8OL.js")).toQuickAnswer(args.slice(2));
48
+ return (await import("./completion-quick-CDIRcOd5.js")).toQuickAnswer(args.slice(2));
49
49
  }
50
50
  //#endregion
51
51
  export {};
52
52
 
53
53
  //# sourceMappingURL=cli.js.map
54
- //# debugId=ee01278c-9a53-5677-8abd-c28911112932
54
+ //# debugId=12877cfa-09aa-5239-8a24-ecc77a951641
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a0e4ab3e-9a55-518b-a49b-37189993952e")}catch(e){}}();
4
- import { n as toCompletion, t as toAnswer } from "./completion-tree-rR_Rmeij.js";
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="341721a8-c4a0-58a0-9e77-8b3adc3fcaa4")}catch(e){}}();
4
+ import { n as toAnswer, r as toCompletion } from "./completion-tree-DLC6ARLR.js";
5
5
  import { readFileSync } from "node:fs";
6
6
  //#region src/command/completion-quick.ts
7
7
  /**
@@ -21,5 +21,5 @@ function toQuickAnswer(words, location = new URL("./completion-tree.json", impor
21
21
  //#endregion
22
22
  export { toQuickAnswer };
23
23
 
24
- //# sourceMappingURL=completion-quick-BJHDp8OL.js.map
25
- //# debugId=a0e4ab3e-9a55-518b-a49b-37189993952e
24
+ //# sourceMappingURL=completion-quick-CDIRcOd5.js.map
25
+ //# debugId=341721a8-c4a0-58a0-9e77-8b3adc3fcaa4
@@ -2,7 +2,7 @@
2
2
  //#region src/command/completion-tree.ts
3
3
  /** Directive is the last line of an answer, which tells the script what to do beyond the candidates. */
4
4
 
5
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b5b3cdcd-37e1-50f6-880a-13e965b5e7ed")}catch(e){}}();
5
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4e67c834-5903-544d-a89c-f716e2f51582")}catch(e){}}();
6
6
  const Directive = {
7
7
  NONE: ":0",
8
8
  FILES: ":1"
@@ -159,7 +159,7 @@ function toLine(description) {
159
159
  return description.replace(/\s+/g, " ").trim();
160
160
  }
161
161
  //#endregion
162
- export { toCompletion as n, toAnswer as t };
162
+ export { toAnswer as n, toCompletion as r, PATH_VALUES as t };
163
163
 
164
- //# sourceMappingURL=completion-tree-rR_Rmeij.js.map
165
- //# debugId=b5b3cdcd-37e1-50f6-880a-13e965b5e7ed
164
+ //# sourceMappingURL=completion-tree-DLC6ARLR.js.map
165
+ //# debugId=4e67c834-5903-544d-a89c-f716e2f51582