@pluginfinity/cli 0.3.5 → 0.3.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/cli/program.js CHANGED
@@ -7,7 +7,7 @@ import { validateCommand } from "../commands/validate.js";
7
7
  import { CliAudience } from "@effected/cli";
8
8
  import { Command } from "effect/cli";
9
9
 
10
- //#region src/cli/program.ts
10
+ // src/cli/program.ts
11
11
  const root = (launch) => Command.make("pluginfinity").pipe(Command.withDescription("Build one agent-plugin source into per-host plugin outputs (Claude Code, GitHub Copilot)"), Command.withSharedFlags(CliAudience.flags()), Command.withSubcommands([
12
12
  initCommand,
13
13
  pluginCommand,
@@ -28,5 +28,4 @@ const root = (launch) => Command.make("pluginfinity").pipe(Command.withDescripti
28
28
  */
29
29
  const program = (args, deps) => CliAudience.runWith(root(deps), { version: deps.version })(args);
30
30
 
31
- //#endregion
32
31
  export { program };
package/cli/run.js CHANGED
@@ -4,7 +4,7 @@ import { CurrentDistribution, distributionSuffix } from "@effected/engine";
4
4
  import { ToolDiscoveryLive } from "@pluginfinity/engine";
5
5
  import { Effect } from "effect";
6
6
 
7
- //#region src/cli/run.ts
7
+ // src/cli/run.ts
8
8
  /**
9
9
  * Run `args` through the program under `CliRuntime.main`.
10
10
  *
@@ -35,5 +35,4 @@ const run = (args, options) => Effect.gen(function* () {
35
35
  });
36
36
  });
37
37
 
38
- //#endregion
39
38
  export { run };
package/commands/build.js CHANGED
@@ -7,7 +7,7 @@ import { Audience } from "@effected/env";
7
7
  import { ENGINE_VERSION, build } from "@pluginfinity/engine";
8
8
  import { Console, Effect, Option } from "effect";
9
9
 
10
- //#region src/commands/build.ts
10
+ // src/commands/build.ts
11
11
  /** `pluginfinity build [path]`: regenerate `builds/<id>/` from source. */
12
12
  const buildCommand = (launch) => Command.make("build", {
13
13
  path: pathArgument,
@@ -34,5 +34,4 @@ const buildCommand = (launch) => Command.make("build", {
34
34
  }
35
35
  }).pipe(reportFindings)).pipe(Command.withDescription("Regenerate builds/<id>/ from source"));
36
36
 
37
- //#endregion
38
37
  export { buildCommand };
@@ -6,7 +6,7 @@ import { Audience } from "@effected/env";
6
6
  import { runDoctor } from "@pluginfinity/engine";
7
7
  import { Console, Effect } from "effect";
8
8
 
9
- //#region src/commands/doctor.ts
9
+ // src/commands/doctor.ts
10
10
  /** `pluginfinity doctor [path]`: report on the environment. */
11
11
  const doctorCommand = (launch) => Command.make("doctor", {
12
12
  path: pathArgument,
@@ -24,5 +24,4 @@ const doctorCommand = (launch) => Command.make("doctor", {
24
24
  if (input.strict && !report.ok) yield* CliExit.set(1);
25
25
  })).pipe(Command.withDescription("Report on the environment: runtime, host CLIs, tools and the config"));
26
26
 
27
- //#endregion
28
27
  export { doctorCommand };
package/commands/init.js CHANGED
@@ -4,7 +4,7 @@ import { Argument, Command, Flag } from "effect/cli";
4
4
  import { NotImplemented } from "@pluginfinity/engine";
5
5
  import { Effect } from "effect";
6
6
 
7
- //#region src/commands/init.ts
7
+ // src/commands/init.ts
8
8
  /** `pluginfinity init [dir]`: create a plugin repository and its first plugin. A stub. */
9
9
  const initCommand = Command.make("init", {
10
10
  dir: Argument.String("dir").pipe(Argument.optional, Argument.withDescription("where to create the repository (default: ./<name>/)")),
@@ -29,5 +29,4 @@ const initCommand = Command.make("init", {
29
29
  return yield* Effect.fail(new NotImplemented({ operation: "init" }));
30
30
  })).pipe(Command.withDescription("Create a plugin repository and its first plugin"));
31
31
 
32
- //#endregion
33
32
  export { initCommand };
package/commands/logs.js CHANGED
@@ -7,7 +7,7 @@ import { Audience } from "@effected/env";
7
7
  import { configPluginNames, listLogPlugins, logRoot, parseLogLine, readLog, readLogFrom } from "@pluginfinity/engine";
8
8
  import { Console, Context, Effect, FileSystem, Option } from "effect";
9
9
 
10
- //#region src/commands/logs.ts
10
+ // src/commands/logs.ts
11
11
  /** A follow that never stops by itself, checking twice a second. */
12
12
  const DEFAULT_FOLLOW = {
13
13
  stop: Effect.never,
@@ -83,5 +83,4 @@ const logsCommand = (launch) => Command.make("logs", {
83
83
  }));
84
84
  }).pipe(reportFindings)).pipe(Command.withDescription("Show the logs plugins write under the XDG state directory, optionally following them"));
85
85
 
86
- //#endregion
87
86
  export { CurrentFollow, DEFAULT_FOLLOW, logsCommand };
package/commands/name.js CHANGED
@@ -2,9 +2,8 @@ import { CliError } from "effect/cli";
2
2
  import { Effect, Schema } from "effect";
3
3
  import { PluginName } from "@pluginfinity/core";
4
4
 
5
- //#region src/commands/name.ts
5
+ // src/commands/name.ts
6
6
  /** Check a plugin name from the command line: kebab-case, or a usage error naming the flag. */
7
7
  const checkPluginName = (label, name) => Schema.decodeUnknownEffect(PluginName)(name).pipe(Effect.mapError(() => new CliError.UserError({ cause: `${label} "${name}" must be kebab-case: lowercase letters and digits separated by single hyphens` })));
8
8
 
9
- //#endregion
10
9
  export { checkPluginName };
@@ -4,7 +4,7 @@ import { Argument, Command, Flag } from "effect/cli";
4
4
  import { NotImplemented } from "@pluginfinity/engine";
5
5
  import { Effect } from "effect";
6
6
 
7
- //#region src/commands/plugin.ts
7
+ // src/commands/plugin.ts
8
8
  /** `pluginfinity plugin add <name>`: add a plugin source. A stub. */
9
9
  const addCommand = Command.make("add", {
10
10
  name: Argument.String("name").pipe(Argument.withDescription("the new plugin's name")),
@@ -17,5 +17,4 @@ const addCommand = Command.make("add", {
17
17
  /** `pluginfinity plugin`: the plugin group. A bare invocation prints its help. */
18
18
  const pluginCommand = Command.make("plugin").pipe(Command.withDescription("Manage the plugins in this repository"), Command.withSubcommands([addCommand]));
19
19
 
20
- //#endregion
21
20
  export { pluginCommand };
@@ -2,7 +2,7 @@ import { Argument, CliError, Flag } from "effect/cli";
2
2
  import { Effect, FileSystem, Path } from "effect";
3
3
  import { KNOWN_TARGET_IDS } from "@pluginfinity/targets";
4
4
 
5
- //#region src/commands/shared.ts
5
+ // src/commands/shared.ts
6
6
  /** `--target <id>`, repeatable. An unknown id is a usage error at parse time. */
7
7
  const targetFlag = Flag.Literals("target", KNOWN_TARGET_IDS).pipe(Flag.atLeast(0), Flag.withDescription("a target id; repeatable (default: every enabled target)"));
8
8
  /** `--all`: every plugin config below `[path]`. */
@@ -34,5 +34,4 @@ const toSelection = (launch, input) => Effect.gen(function* () {
34
34
  };
35
35
  });
36
36
 
37
- //#endregion
38
37
  export { allFlag, configFlag, pathArgument, targetFlag, toSelection };
@@ -7,7 +7,7 @@ import { Audience } from "@effected/env";
7
7
  import { ENGINE_VERSION, validate } from "@pluginfinity/engine";
8
8
  import { Console, Effect, Option } from "effect";
9
9
 
10
- //#region src/commands/validate.ts
10
+ // src/commands/validate.ts
11
11
  /** `pluginfinity validate [path]`: pluginfinity's own checks, then each host's CLI. */
12
12
  const validateCommand = (launch) => Command.make("validate", {
13
13
  path: pathArgument,
@@ -34,5 +34,4 @@ const validateCommand = (launch) => Command.make("validate", {
34
34
  }
35
35
  }).pipe(reportFindings)).pipe(Command.withDescription("Run pluginfinity's own checks, then each host's CLI"));
36
36
 
37
- //#endregion
38
37
  export { validateCommand };
package/index.d.ts CHANGED
@@ -6,7 +6,6 @@ import { Effect, PlatformError } from "effect";
6
6
  import { CliError, Command } from "effect/cli";
7
7
  import { Distribution } from "@effected/engine";
8
8
  import "effect/process";
9
- //#region src/commands/shared.d.ts
10
9
  /**
11
10
  * The process values a command needs, read once in `main.ts`.
12
11
  *
@@ -20,8 +19,6 @@ interface LaunchFacts {
20
19
  /** The XDG state directory (`$XDG_STATE_HOME`, else `~/.local/state`): where `logs` finds `pluginfinity/<plugin>/`. */
21
20
  readonly stateHome: string;
22
21
  }
23
- //#endregion
24
- //#region src/cli/program.d.ts
25
22
  /**
26
23
  * The process values the program runs against, read once in `main.ts`.
27
24
  *
@@ -42,8 +39,6 @@ interface ProgramDeps extends LaunchFacts {
42
39
  * @public
43
40
  */
44
41
  export declare const program: (args: ReadonlyArray<string>, deps: ProgramDeps) => Effect.Effect<void, CliError.CliError | NotImplemented | PlatformError.PlatformError, Audience | CliExit | ToolDiscovery | Command.Environment>;
45
- //#endregion
46
- //#region src/cli/run.d.ts
47
42
  /**
48
43
  * Options for `main`.
49
44
  *
@@ -56,6 +51,5 @@ interface MainOptions {
56
51
  */
57
52
  readonly distribution?: Distribution | undefined;
58
53
  }
59
- //#endregion
60
54
  export type { LaunchFacts, MainOptions, ProgramDeps };
61
55
  //# sourceMappingURL=index.d.ts.map
package/main.d.ts CHANGED
@@ -6,7 +6,6 @@ import "@effected/cli";
6
6
  import "@effected/env";
7
7
  import "@pluginfinity/engine";
8
8
  import "effect/cli";
9
- //#region src/cli/run.d.ts
10
9
  /**
11
10
  * Options for `main`.
12
11
  *
@@ -19,8 +18,6 @@ interface MainOptions {
19
18
  */
20
19
  readonly distribution?: Distribution | undefined;
21
20
  }
22
- //#endregion
23
- //#region src/main.d.ts
24
21
  /**
25
22
  * Run pluginfinity against this process's arguments and streams.
26
23
  *
@@ -29,6 +26,5 @@ interface MainOptions {
29
26
  * @public
30
27
  */
31
28
  export declare const main: (options?: MainOptions) => void;
32
- //#endregion
33
29
  export type { MainOptions };
34
30
  //# sourceMappingURL=main.d.ts.map
package/main.js CHANGED
@@ -7,7 +7,7 @@ import { homedir } from "node:os";
7
7
  import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
8
8
  import * as NodeServices from "@effect/platform-node/NodeServices";
9
9
 
10
- //#region src/main.ts
10
+ // src/main.ts
11
11
  const exitAfterFlush = (following) => (exit, onExit) => Runtime.defaultTeardown(following() && !Exit.isSuccess(exit) && Cause.hasInterruptsOnly(exit.cause) ? Exit.void : exit, (code) => {
12
12
  process.stdout.write("", () => {
13
13
  onExit(code);
@@ -40,5 +40,4 @@ const main = (options = {}) => {
40
40
  })), { teardown: exitAfterFlush(() => following) });
41
41
  };
42
42
 
43
- //#endregion
44
43
  export { main };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluginfinity/cli",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "private": false,
5
5
  "description": "The pluginfinity command-line front end. Install the pluginfinity package to get the pluginfinity bin.",
6
6
  "keywords": [
@@ -40,18 +40,18 @@
40
40
  "./package.json": "./package.json"
41
41
  },
42
42
  "dependencies": {
43
- "@effect/platform-node": "^4.0.5",
44
- "@effected/cli": "^0.19.0",
45
- "@effected/commands": "^0.14.0",
46
- "@effected/engine": "^0.7.0",
47
- "@effected/env": "^0.4.0",
48
- "@effected/glob": "^0.13.0",
49
- "@effected/semver": "^0.14.0",
50
- "@effected/walker": "^0.18.0",
43
+ "@effect/platform-node": "^4.0.6",
44
+ "@effected/cli": "^0.20.0",
45
+ "@effected/commands": "^0.15.0",
46
+ "@effected/engine": "^0.8.0",
47
+ "@effected/env": "^0.5.0",
48
+ "@effected/glob": "^0.14.0",
49
+ "@effected/semver": "^0.15.0",
50
+ "@effected/walker": "^0.19.0",
51
51
  "@pluginfinity/core": "0.3.0",
52
- "@pluginfinity/engine": "0.3.3",
52
+ "@pluginfinity/engine": "0.3.4",
53
53
  "@pluginfinity/targets": "0.3.0",
54
- "effect": "^4.0.5",
54
+ "effect": "^4.0.6",
55
55
  "jiti": "^2.6.1"
56
56
  },
57
57
  "engines": {
package/render/build.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { BUILD_NOTE_KINDS } from "@pluginfinity/engine";
2
2
 
3
- //#region src/render/build.ts
3
+ // src/render/build.ts
4
4
  const counts = (build) => `${build.plan.added.length} added, ${build.plan.changed.length} changed, ${build.plan.removed.length} removed`;
5
5
  /**
6
6
  * One indented line per component, in the notes' order: kinds in
@@ -45,5 +45,4 @@ const validateJson = (validation) => ({
45
45
  notes: validation.notes.map(noteJson)
46
46
  });
47
47
 
48
- //#endregion
49
48
  export { buildJson, buildLines, noteLines, validateJson, validateLines };
@@ -4,7 +4,7 @@ import { Audience } from "@effected/env";
4
4
  import { ENGINE_VERSION, isBuildError, isConfigError } from "@pluginfinity/engine";
5
5
  import { Console, Effect, Option } from "effect";
6
6
 
7
- //#region src/render/config-error.ts
7
+ // src/render/config-error.ts
8
8
  /** Whether `error` is a finding {@link reportConfigError} reports. */
9
9
  const isFinding = (error) => isConfigError(error) || isBuildError(error);
10
10
  /** Report a config or build error for the current audience and record exit code 1. */
@@ -34,5 +34,4 @@ const reportConfigError = (error) => Effect.gen(function* () {
34
34
  */
35
35
  const reportFindings = (self) => self.pipe(Effect.catch((error) => isFinding(error) ? reportConfigError(error) : Effect.fail(error)));
36
36
 
37
- //#endregion
38
37
  export { isFinding, reportConfigError, reportFindings };
package/render/doctor.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/render/doctor.ts
1
+ // src/render/doctor.ts
2
2
  const GROUP_TITLES = [
3
3
  ["runtime", "Runtime"],
4
4
  ["hosts", "Hosts"],
@@ -27,5 +27,4 @@ const doctorJson = (report) => JSON.stringify({
27
27
  }))
28
28
  });
29
29
 
30
- //#endregion
31
30
  export { doctorJson, doctorLines };
package/render/logs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ENGINE_VERSION, parseLogLine } from "@pluginfinity/engine";
2
2
 
3
- //#region src/render/logs.ts
3
+ // src/render/logs.ts
4
4
  /** The header that opens a file's section. */
5
5
  const sectionHeader = (plugin, file) => `==> ${plugin}/${file} <==`;
6
6
  const absentLine = (file) => file === "debug.log" ? " (no debug.log; set PLUGINFINITY_DEBUG=1 to write one)" : " (no error.log yet; nothing has been logged)";
@@ -31,5 +31,4 @@ const logsJson = (view, distribution) => JSON.stringify({
31
31
  entries: tailEntries(view.tails)
32
32
  });
33
33
 
34
- //#endregion
35
34
  export { entryJson, isFound, logsJson, logsLines, sectionHeader, tailEntries };
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/version.ts
1
+ // src/version.ts
2
2
  /**
3
3
  * The version of `@pluginfinity/cli` this build was made from: what `--version`
4
4
  * prints before any distribution suffix.
@@ -8,7 +8,6 @@
8
8
  * with this package's own version, so this is not a runtime environment read.
9
9
  * `"0.0.0"` is the unbuilt-source fallback.
10
10
  */
11
- const CLI_VERSION = "0.3.5";
11
+ const CLI_VERSION = "0.3.6";
12
12
 
13
- //#endregion
14
13
  export { CLI_VERSION };