@lunora/config 1.0.0-alpha.359 → 1.0.0-alpha.360
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/dist/cli/index.d.mts +2 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.mjs +1 -0
- package/dist/cloudflare/index.d.mts +2 -1
- package/dist/cloudflare/index.d.ts +2 -1
- package/dist/cloudflare/index.mjs +1 -1
- package/dist/index.d.mts +5 -271
- package/dist/index.d.ts +5 -271
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/LUNORA_TAG-DQTGPqcJ.mjs +1 -0
- package/dist/packem_shared/{assertWranglerSatisfiesSchema-Dd7ZPhw7.mjs → assertWranglerSatisfiesSchema-D4FA4jKB.mjs} +1 -1
- package/dist/packem_shared/blockingFindingsMessage-BVbijPdn.mjs +1 -0
- package/dist/packem_shared/deploy-driver.d-Cl96-c1l.d.mts +184 -0
- package/dist/packem_shared/deploy-driver.d-Cl96-c1l.d.ts +184 -0
- package/dist/packem_shared/index.d-Cmx4jMFV.d.ts +270 -0
- package/dist/packem_shared/index.d-DkNi7r6E.d.mts +270 -0
- package/dist/packem_shared/{infer-bindings.d-CFxssIAC.d.mts → infer-bindings.d-eFzcOnRh.d.mts} +1 -184
- package/dist/packem_shared/{infer-bindings.d-CFxssIAC.d.ts → infer-bindings.d-eFzcOnRh.d.ts} +1 -184
- package/dist/packem_shared/{reconcileBindingsSafely-7IJ58Uit.mjs → reconcileBindingsSafely-BEwmwy0q.mjs} +1 -1
- package/package.json +6 -2
- package/dist/packem_shared/LUNORA_TAG-CiQM3BkI.mjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AgentIR, ContainerIR, WorkflowIR, CodegenResult } from '@lunora/codegen';
|
|
2
2
|
export type { AgentIR, ContainerIR, WorkflowIR } from '@lunora/codegen';
|
|
3
|
+
export { A as ACCENT, a as AGENT_RULES_DIR, b as AGENT_RULES_HINT, c as AGENT_RULES_HINT_ENV, type d as AgentRulesStatus, B as BADGES, e as BADGE_COLUMN_WIDTH, type f as BadgeName, type g as BadgeSpec, D as DEFAULT_DEPLOY_TARGET, L as LUNA_ART, h as LUNA_BUNNY, i as LUNA_NAME, j as LUNA_SIGNOFF, k as LUNORA_SKILL_NAMES, l as LUNORA_TAG, type m as LevelBadgeName, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, R as ROOT_SKILL_NAME, S as STEP_BADGE_NAMES, type p as StepBadgeName, type T as ToolchainInvocation, q as addArgsFor, r as advisoryLine, s as badgeLead, t as badgeWidth, u as claimAgentRulesHint, v as deployTargetIds, w as detectAgentRules, x as detectInstalledManagers, y as detectPackageManager, z as execArgsFor, C as installArgsFor, E as isRunnableTarget, F as lunoraLine, G as padBadge, H as paintAnswer, I as paintBadge, J as planToolchainInvocation, K as readProjectDependencies, M as readProjectDependencyNames, N as readProjectManifest, O as resolveDeployDriver, Q as runScriptArgsFor, U as runScriptCommand, V as runnableTargetIds, W as targetRunsOwnDevServer, X as toolchainExecArgs } from "./packem_shared/index.d-Cmx4jMFV.js";
|
|
3
4
|
import { ChildProcess } from 'node:child_process';
|
|
4
|
-
import {
|
|
5
|
-
export { C as COMPOSED_WORKER_ENTRY,
|
|
5
|
+
import { D as DiscoveryCache } from "./packem_shared/infer-bindings.d-eFzcOnRh.js";
|
|
6
|
+
export { C as COMPOSED_WORKER_ENTRY, a as DURABLE_OBJECT_BINDINGS, type b as DiscoverSchemaInfoResult, G as GENERATED_CLASS_MODULES, c as GENERATED_MODULE_DURABLE_OBJECTS, type d as GeneratedClassModule, type I as InferOptions, type e as InferredAgent, type f as InferredBindings, type g as InferredContainer, type h as InferredWorkflow, M as MERGED_DURABLE_OBJECTS_MODULE, type S as SchemaInfo, i as createDiscoveryCache, j as discoverSchemaInfo, k as inferLunoraBindings, l as isMergedProject, m as isMergedRoleModule, s as secretSourcesFromBindings } from "./packem_shared/infer-bindings.d-eFzcOnRh.js";
|
|
6
7
|
import { Writable } from 'node:stream';
|
|
8
|
+
export type { D as DeployDriver, a as DeployRequest, b as DevRequest, c as DriverToolchain, P as ProjectedConfig, d as ProjectionPurpose, S as SecretRequest, T as TailRequest, e as ToolchainCommand } from "./packem_shared/deploy-driver.d-Cl96-c1l.js";
|
|
7
9
|
export { type A as AdditivePolicyEdit, type D as DestructivePolicyEdit, type P as PolicyEdit, type a as PolicyScaffoldFailureReason, type b as ScaffoldFileResult, type S as ScaffoldPolicyEdit, type c as WireResult, type W as WireRlsEdit, d as classifyPolicyEdit, r as resolveServerModule, s as scaffoldPolicyFile, w as wireRlsIntoProcedure } from "./packem_shared/policy-scaffold.d-D2H4_G01.js";
|
|
8
10
|
interface DiscoverAgentInfoResult {
|
|
9
11
|
/** Discovered agent definitions; `[]` when none are declared or parsing failed. */
|
|
@@ -57,61 +59,6 @@ declare const AGENT_MODE_ENV = "LUNORA_AGENT_MODE";
|
|
|
57
59
|
* both directions. Pure — pass a custom `env` in tests.
|
|
58
60
|
*/
|
|
59
61
|
declare const detectAiAgent: (env?: EnvLike) => AgentDetection | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Project-relative directory the Lunora agent skills ("rules") install into.
|
|
62
|
-
* This is the portable [Agent Skills](https://tanstack.com/intent/latest/docs/registry)
|
|
63
|
-
* location — Cursor, Claude Code, and GitHub Copilot all discover skills here.
|
|
64
|
-
*/
|
|
65
|
-
declare const AGENT_RULES_DIR = ".agents/skills";
|
|
66
|
-
/** Env var the once-per-process-tree hint guard ({@link claimAgentRulesHint}) sets. */
|
|
67
|
-
declare const AGENT_RULES_HINT_ENV = "LUNORA_RULES_HINT_SHOWN";
|
|
68
|
-
/**
|
|
69
|
-
* The Lunora agent skills shipped by `@lunora/cli`. The first entry (`lunora`)
|
|
70
|
-
* is the router skill — its presence is what {@link detectAgentRules} treats as
|
|
71
|
-
* "rules installed", since every other skill is reachable through it.
|
|
72
|
-
*
|
|
73
|
-
* `lunora rules install` enumerates `@lunora/cli`'s `skills/` directory rather
|
|
74
|
-
* than reading this list, so a skill missing here still installs — but
|
|
75
|
-
* `lunora rules check` counts against it, and reported "9/9 skills" with an
|
|
76
|
-
* empty "Missing:" line for a project holding all 14. The CLI's rules test
|
|
77
|
-
* pins the two together, since this package cannot see that directory.
|
|
78
|
-
*/
|
|
79
|
-
declare const LUNORA_SKILL_NAMES: ReadonlyArray<string>;
|
|
80
|
-
/** The router skill whose presence marks the rule set as installed. */
|
|
81
|
-
declare const ROOT_SKILL_NAME = "lunora";
|
|
82
|
-
/**
|
|
83
|
-
* The single "rules not installed" message shared by every surface (the CLI
|
|
84
|
-
* `lunora dev` summary and the Vite dev plugin), so the wording and the
|
|
85
|
-
* pointer at `lunora rules install` stay identical wherever it appears.
|
|
86
|
-
*/
|
|
87
|
-
declare const AGENT_RULES_HINT = "Lunora AI rules not installed — run `lunora rules install` so your coding agent knows how to use Lunora.";
|
|
88
|
-
/**
|
|
89
|
-
* Process-tree guard so the hint is emitted at most once. The first surface to
|
|
90
|
-
* print it sets {@link AGENT_RULES_HINT_ENV} on `process.env`; later surfaces (a
|
|
91
|
-
* Vite dev-server restart, or a child process that inherited the env) read it
|
|
92
|
-
* and stay quiet. Returns `true` the first time, `false` afterwards.
|
|
93
|
-
*/
|
|
94
|
-
declare const claimAgentRulesHint: () => boolean;
|
|
95
|
-
interface AgentRulesStatus {
|
|
96
|
-
/**
|
|
97
|
-
* True when the `lunora` router skill is installed. We key on the router
|
|
98
|
-
* (not "all nine present") so a project that intentionally trims the set
|
|
99
|
-
* still counts as installed and isn't nagged.
|
|
100
|
-
*/
|
|
101
|
-
readonly installed: boolean;
|
|
102
|
-
/** Skill names with no `SKILL.md` under `<root>/.agents/skills/<name>/`. */
|
|
103
|
-
readonly missing: ReadonlyArray<string>;
|
|
104
|
-
/** Skill names found under `<root>/.agents/skills/<name>/SKILL.md`. */
|
|
105
|
-
readonly present: ReadonlyArray<string>;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Detect whether the Lunora agent skills are installed in `projectRoot` by
|
|
109
|
-
* checking the skills folder for each `SKILL.md`. Pure filesystem reads, safe to
|
|
110
|
-
* call on every dev-server / CLI startup — the CLI, the Vite plugin, and the
|
|
111
|
-
* studio host all use it to decide whether to surface the "rules not installed"
|
|
112
|
-
* hint.
|
|
113
|
-
*/
|
|
114
|
-
declare const detectAgentRules: (projectRoot: string) => AgentRulesStatus;
|
|
115
62
|
/** Spawns the process — injectable so tests run without the binary. */
|
|
116
63
|
type DevProcessSpawner = (command: string, args: ReadonlyArray<string>, options: {
|
|
117
64
|
cwd: string;
|
|
@@ -559,61 +506,6 @@ declare const DEV_WORKER_ENV_VALUE = "development";
|
|
|
559
506
|
* declares it (in `.dev.vars` itself, or in the wrangler config's `vars`).
|
|
560
507
|
*/
|
|
561
508
|
declare const ensureDevWorkerEnv: (projectRoot: string, info: (message: string) => void) => void;
|
|
562
|
-
/** The default deploy target — today's behavior for every project. */
|
|
563
|
-
declare const DEFAULT_DEPLOY_TARGET = "cloudflare";
|
|
564
|
-
/** The ids a caller may select, for error messages and `--target` help text. */
|
|
565
|
-
declare const deployTargetIds: () => ReadonlyArray<string>;
|
|
566
|
-
/**
|
|
567
|
-
* Resolve a target name to its driver.
|
|
568
|
-
* @throws when `target` names no registered driver — never falls back to the default.
|
|
569
|
-
*/
|
|
570
|
-
declare const resolveDeployDriver: (target?: string) => DeployDriver;
|
|
571
|
-
/**
|
|
572
|
-
* Whether `target`'s driver ships a `toolchain` — i.e. whether any tool can
|
|
573
|
-
* actually build, serve or deploy it, as opposed to merely generate for it.
|
|
574
|
-
*
|
|
575
|
-
* One predicate rather than one per caller: the CLI (`deploy`, `dev`) and the
|
|
576
|
-
* Vite plugin (`build`, `dev`) must refuse the same set, and a second copy
|
|
577
|
-
* fails silently — the tool that forgot runs the WRONG pipeline for the target
|
|
578
|
-
* instead of rejecting it.
|
|
579
|
-
* @param target A target id already resolved by `resolveTargetOrThrow`. Unknown
|
|
580
|
-
* ids answer `false` rather than throwing, so this is safe to ask about
|
|
581
|
-
* arbitrary input.
|
|
582
|
-
* @returns `true` when the target can be run.
|
|
583
|
-
*/
|
|
584
|
-
declare const isRunnableTarget: (target: string) => boolean;
|
|
585
|
-
/**
|
|
586
|
-
* The subset of {@link deployTargetIds} that {@link isRunnableTarget} accepts,
|
|
587
|
-
* in the same (alphabetical) order.
|
|
588
|
-
* @returns every target id a tool can build, serve or deploy — used to name the
|
|
589
|
-
* alternatives when one is refused.
|
|
590
|
-
*/
|
|
591
|
-
declare const runnableTargetIds: () => ReadonlyArray<string>;
|
|
592
|
-
/**
|
|
593
|
-
* Whether `lunora dev` serves `target`'s worker with the host's own dev server
|
|
594
|
-
* (`DriverToolchain.devServer === "own"`) instead of workerd. The CLI's flavor
|
|
595
|
-
* choice and the Vite plugin's warning both ask this, so it is answered once.
|
|
596
|
-
*/
|
|
597
|
-
declare const targetRunsOwnDevServer: (target: string) => boolean;
|
|
598
|
-
/** A toolchain command planned against the driver's config projection, with nothing written yet. */
|
|
599
|
-
interface ToolchainInvocation {
|
|
600
|
-
command: ToolchainCommand;
|
|
601
|
-
/** Write the projection, if the driver has one. Call only once the command is going to run. */
|
|
602
|
-
commit: () => void;
|
|
603
|
-
/** The projection the command reads, and every key it left out — `undefined` when the host reads the project config as-is. */
|
|
604
|
-
projection: {
|
|
605
|
-
configPath: string;
|
|
606
|
-
dropped: ReadonlyArray<string>;
|
|
607
|
-
} | undefined;
|
|
608
|
-
}
|
|
609
|
-
/**
|
|
610
|
-
* Plan a toolchain call in the one safe order: project the config (in memory),
|
|
611
|
-
* build the argv against the projection's path — which is where a host refuses
|
|
612
|
-
* an option it cannot honour, so a refusal throws here — and only then offer the
|
|
613
|
-
* write. A refused command therefore leaves nothing on disk, and `configPath`
|
|
614
|
-
* is set on every request whose driver projects.
|
|
615
|
-
*/
|
|
616
|
-
declare const planToolchainInvocation: (driver: DeployDriver, projectRoot: string, purpose: ProjectionPurpose, build: (configPath: string | undefined) => ToolchainCommand) => ToolchainInvocation;
|
|
617
509
|
/** Directory holding per-checkout Lunora state (gitignored by convention). */
|
|
618
510
|
declare const LINKED_PROJECT_DIR = ".lunora";
|
|
619
511
|
/** The canonical link filename, relative to the project root. */
|
|
@@ -698,17 +590,6 @@ declare const detectLintTools: (projectRoot: string) => LintTool[];
|
|
|
698
590
|
* @returns one outcome per tool, in the order given.
|
|
699
591
|
*/
|
|
700
592
|
declare const applyLintIgnores: (projectRoot: string, tools: ReadonlyArray<LintTool>) => LintIgnoreOutcome[];
|
|
701
|
-
/** The painted ` lunora ` badge, prepended to the plugin's branded log lines. */
|
|
702
|
-
declare const LUNORA_TAG: string;
|
|
703
|
-
/** Prefix a message with the Lunora badge (e.g. `lunoraLine("codegen done")`). */
|
|
704
|
-
declare const lunoraLine: (message: string) => string;
|
|
705
|
-
/**
|
|
706
|
-
* A branded schema-advisory line: the level-coloured badge (`warn`/`error`/`info`)
|
|
707
|
-
* — same badges the CLI reporter uses, so the dev server reads as one tool — then
|
|
708
|
-
* the rule name, the detail, and the remediation. Replaces the old dense
|
|
709
|
-
* `lunora-badge … schema advisory [WARN] …` line with the level-appropriate badge.
|
|
710
|
-
*/
|
|
711
|
-
declare const advisoryLine: (level: "ERROR" | "INFO" | "WARN", name: string, detail: string, remediation: string) => string;
|
|
712
593
|
/** The three channels a bundler plugin reports through; `console` satisfies it, as does Rspack's `Logger`. */
|
|
713
594
|
interface FindingLogger {
|
|
714
595
|
error: (message: string) => void;
|
|
@@ -763,89 +644,6 @@ declare const LUNORA_EVENT_SOURCE = "lunora";
|
|
|
763
644
|
* — so the caller passes the original line through untouched. Pure and total.
|
|
764
645
|
*/
|
|
765
646
|
declare const formatLunoraEvent: (line: string) => LunoraFormattedLine | undefined;
|
|
766
|
-
declare class LunoraReporter {
|
|
767
|
-
#private;
|
|
768
|
-
setStdout(stdout: NodeJS.WriteStream): void;
|
|
769
|
-
setStderr(stderr: NodeJS.WriteStream): void;
|
|
770
|
-
log(meta: unknown): void;
|
|
771
|
-
}
|
|
772
|
-
type PackageManager = "pnpm" | "npm" | "yarn" | "bun";
|
|
773
|
-
/** True when `manager` is on PATH — probed by running `<manager> --version`. Injectable for tests. */
|
|
774
|
-
type PackageManagerProbe = (manager: PackageManager) => boolean;
|
|
775
|
-
/**
|
|
776
|
-
* The package managers actually installed on this machine, in preference order
|
|
777
|
-
* ({@link INSTALL_PREFERENCE} — pnpm > bun > yarn > npm). The first entry is the
|
|
778
|
-
* recommended default for the install prompt; the whole list is what the user
|
|
779
|
-
* picks from. Empty when none are found.
|
|
780
|
-
*/
|
|
781
|
-
declare const detectInstalledManagers: (probe?: PackageManagerProbe) => PackageManager[];
|
|
782
|
-
/** The argv that installs a project's dependencies with `manager` (`<manager> install`). */
|
|
783
|
-
declare const installArgsFor: (manager: PackageManager) => {
|
|
784
|
-
args: string[];
|
|
785
|
-
command: string;
|
|
786
|
-
};
|
|
787
|
-
/**
|
|
788
|
-
* The argv that adds `packages` as new dependencies with `manager` — the
|
|
789
|
-
* counterpart to {@link installArgsFor}, which reinstalls what package.json
|
|
790
|
-
* already declares rather than adding something new to it.
|
|
791
|
-
*
|
|
792
|
-
* npm's dev flag is `--save-dev` (its own docs lead with the long form); bun's
|
|
793
|
-
* is the lowercase `-d` (uppercase `-D` is not one of its recognized flags);
|
|
794
|
-
* pnpm and yarn both take `-D`.
|
|
795
|
-
*/
|
|
796
|
-
declare const addArgsFor: (manager: PackageManager, packages: ReadonlyArray<string>, options?: {
|
|
797
|
-
dev?: boolean;
|
|
798
|
-
}) => {
|
|
799
|
-
args: string[];
|
|
800
|
-
command: string;
|
|
801
|
-
};
|
|
802
|
-
/**
|
|
803
|
-
* Resolve the package manager to drive for the project rooted at (or above)
|
|
804
|
-
* `startDirectory`. Every step is a real signal — Lunora never blindly assumes a
|
|
805
|
-
* particular manager, and there is no hardcoded fallback:
|
|
806
|
-
*
|
|
807
|
-
* 1. `@visulima/package` — the nearest lock file (`pnpm-lock.yaml`, `yarn.lock`,
|
|
808
|
-
* `package-lock.json`, `bun.lockb`) or the `packageManager` field of the nearest
|
|
809
|
-
* `package.json`.
|
|
810
|
-
* 2. The manager that launched this CLI, read from `npm_config_user_agent` (so
|
|
811
|
-
* `pnpm dlx lunora …` / `npx lunora …` resolve to the right manager).
|
|
812
|
-
* 3. The first package manager actually installed on this machine
|
|
813
|
-
* ({@link detectInstalledManagers}).
|
|
814
|
-
*
|
|
815
|
-
* Throws when none of those resolve — i.e. there is no lock file / `packageManager`
|
|
816
|
-
* field, the CLI wasn't launched by a known manager, and none is on `PATH`.
|
|
817
|
-
* Surfacing that is better than silently guessing a manager that can't run.
|
|
818
|
-
*/
|
|
819
|
-
declare const detectPackageManager: (startDirectory: string) => PackageManager;
|
|
820
|
-
/** Map a package manager to the argv pair that runs an installed CLI. */
|
|
821
|
-
declare const execArgsFor: (manager: PackageManager, command: string, args: ReadonlyArray<string>) => {
|
|
822
|
-
args: string[];
|
|
823
|
-
command: string;
|
|
824
|
-
};
|
|
825
|
-
/**
|
|
826
|
-
* The argv that runs a driver's {@link ToolchainCommand}: through the package
|
|
827
|
-
* manager for a project dependency, directly for a binary on `PATH`.
|
|
828
|
-
*/
|
|
829
|
-
declare const toolchainExecArgs: (manager: PackageManager, command: ToolchainCommand) => {
|
|
830
|
-
args: string[];
|
|
831
|
-
command: string;
|
|
832
|
-
};
|
|
833
|
-
/**
|
|
834
|
-
* The argv that runs a project SCRIPT with `manager` — the counterpart to
|
|
835
|
-
* {@link execArgsFor}, which runs a BINARY.
|
|
836
|
-
*
|
|
837
|
-
* All four managers accept `<manager> run <script>`, so this is uniform. It is a
|
|
838
|
-
* separate function because reaching for `execArgsFor(manager, "run", [script])`
|
|
839
|
-
* silently produces something else entirely: `pnpm exec run <script>` fails with
|
|
840
|
-
* `Command "run" not found`, and `npx -- run <script>` resolves the registry
|
|
841
|
-
* PACKAGE named `run` and executes it.
|
|
842
|
-
*/
|
|
843
|
-
declare const runScriptArgsFor: (manager: PackageManager, script: string) => {
|
|
844
|
-
args: string[];
|
|
845
|
-
command: string;
|
|
846
|
-
};
|
|
847
|
-
/** The shell command that runs a project script with `manager` (`pnpm dev`, `npm run dev`, …). */
|
|
848
|
-
declare const runScriptCommand: (manager: PackageManager, script: string) => string;
|
|
849
647
|
/** A single secret variable required by a package. */
|
|
850
648
|
interface SecretEntry {
|
|
851
649
|
/** One sentence describing what this secret is and how to obtain it. */
|
|
@@ -999,20 +797,6 @@ declare const resolveProjectTarget: (projectRoot: string, explicit?: string) =>
|
|
|
999
797
|
* @returns the resolved, registered target id.
|
|
1000
798
|
*/
|
|
1001
799
|
declare const resolveTargetOrThrow: (projectRoot: string, explicit?: string) => string;
|
|
1002
|
-
/**
|
|
1003
|
-
* The `package.json` at `root` as a plain object, or `undefined` when it is
|
|
1004
|
-
* missing, unreadable, or not a JSON object. Best-effort on purpose: every
|
|
1005
|
-
* caller reads one fact off it (a script, a key, the dependencies) and falls
|
|
1006
|
-
* back to its default rather than failing over a broken manifest.
|
|
1007
|
-
*/
|
|
1008
|
-
declare const readProjectManifest: (root: string) => Readonly<Record<string, unknown>> | undefined;
|
|
1009
|
-
/**
|
|
1010
|
-
* The manifest's merged `devDependencies` + `dependencies` map — a runtime
|
|
1011
|
-
* dependency wins a name declared in both — or `{}` when it cannot be read.
|
|
1012
|
-
*/
|
|
1013
|
-
declare const readProjectDependencies: (root: string) => Readonly<Record<string, string>>;
|
|
1014
|
-
/** The names {@link readProjectDependencies} reads — empty when the manifest cannot be read. */
|
|
1015
|
-
declare const readProjectDependencyNames: (root: string) => ReadonlySet<string>;
|
|
1016
800
|
/**
|
|
1017
801
|
* Whether we can interactively prompt — stdin must be a TTY. In CI / piped
|
|
1018
802
|
* contexts this is false, and callers should fall back to a non-interactive
|
|
@@ -1400,54 +1184,4 @@ type ParseSchemaResult = {
|
|
|
1400
1184
|
* message per failure mode without throwing.
|
|
1401
1185
|
*/
|
|
1402
1186
|
declare const parseSchema: (source: string) => ParseSchemaResult;
|
|
1403
|
-
|
|
1404
|
-
* A badge: the short colored label that prefixes a line. `bg`/`fg` are hex so the
|
|
1405
|
-
* same value drives both colorize's `bgHex().hex()` and the tui `<Text>` props.
|
|
1406
|
-
*/
|
|
1407
|
-
interface BadgeSpec {
|
|
1408
|
-
bg: `#${string}`;
|
|
1409
|
-
fg: `#${string}`;
|
|
1410
|
-
text: string;
|
|
1411
|
-
}
|
|
1412
|
-
/** Lunora purple — the accent shared with the CLI prompt frames. */
|
|
1413
|
-
declare const ACCENT: `#${string}`;
|
|
1414
|
-
/** Standard log-level badge names (the restyled base output). */
|
|
1415
|
-
type LevelBadgeName = "debug" | "error" | "info" | "success" | "warn";
|
|
1416
|
-
/** Step-phase badge names (the create-astro-style flow transcript). */
|
|
1417
|
-
type StepBadgeName = "add" | "deps" | "dir" | "git" | "lunora" | "next" | "tmpl";
|
|
1418
|
-
type BadgeName = LevelBadgeName | StepBadgeName;
|
|
1419
|
-
/** The ordered step-phase names, used to register custom pail log types. */
|
|
1420
|
-
declare const STEP_BADGE_NAMES: ReadonlyArray<StepBadgeName>;
|
|
1421
|
-
/**
|
|
1422
|
-
* Every badge, keyed by name. Levels get their conventional colors (red/amber/
|
|
1423
|
-
* green/blue/grey); step phases follow create-astro's green→purple→cyan rhythm.
|
|
1424
|
-
*/
|
|
1425
|
-
declare const BADGES: Record<BadgeName, BadgeSpec>;
|
|
1426
|
-
/**
|
|
1427
|
-
* Luna, the mascot: the folklore rabbit-in-the-moon — a bunny tucked inside the
|
|
1428
|
-
* moon disc. Pure ASCII so it renders the same everywhere (including piped logs).
|
|
1429
|
-
* The CLI signs off the `init` flow with it, the way create-astro closes with
|
|
1430
|
-
* Houston.
|
|
1431
|
-
*/
|
|
1432
|
-
declare const LUNA_NAME = "Luna";
|
|
1433
|
-
declare const LUNA_SIGNOFF = "Safe travels, voyager.";
|
|
1434
|
-
declare const LUNA_BUNNY: string;
|
|
1435
|
-
/**
|
|
1436
|
-
* {@link LUNA_BUNNY} with its leading newline stripped, ready to render inline
|
|
1437
|
-
* (beside the name + sign-off). Both render paths — the tui mascot frame and the
|
|
1438
|
-
* pail off-TTY fallback — use this so neither re-implements the strip.
|
|
1439
|
-
*/
|
|
1440
|
-
declare const LUNA_ART: string;
|
|
1441
|
-
/** The colored part of a badge — the word with one space of padding each side. */
|
|
1442
|
-
declare const padBadge: (text: string) => string;
|
|
1443
|
-
/** Leading spaces that right-align a badge's box within the gutter. */
|
|
1444
|
-
declare const badgeLead: (text: string) => string;
|
|
1445
|
-
/** Total columns a rendered badge column occupies (lead + box), constant across badges. */
|
|
1446
|
-
declare const BADGE_COLUMN_WIDTH: number;
|
|
1447
|
-
/** Columns a rendered badge occupies — the gutter-aligned column width. */
|
|
1448
|
-
declare const badgeWidth: (_spec: BadgeSpec) => number;
|
|
1449
|
-
/** Paint a badge as an ANSI string (the non-tui path): right-aligning spaces + the colored box. */
|
|
1450
|
-
declare const paintBadge: (spec: BadgeSpec) => string;
|
|
1451
|
-
/** Dim continuation text (a step's chosen answer, shown under the question). */
|
|
1452
|
-
declare const paintAnswer: (text: string) => string;
|
|
1453
|
-
export { ACCENT, AGENT_MODE_ENV, AGENT_RULES_DIR, AGENT_RULES_HINT, AGENT_RULES_HINT_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type AgentRulesStatus, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, BADGES, BADGE_COLUMN_WIDTH, type BadgeName, type BadgeSpec, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEFAULT_DEPLOY_TARGET, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DeployDriver, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNA_ART, LUNA_BUNNY, LUNA_NAME, LUNA_SIGNOFF, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, LUNORA_SKILL_NAMES, LUNORA_TAG, type LevelBadgeName, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, LunoraReporter, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type PackageManager, type PackageManagerProbe, type ParseSchemaResult, type PostCodegenHookResult, type ProjectionPurpose, ROOT_SKILL_NAME, type RemotePreference, STEP_BADGE_NAMES, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, type StepBadgeName, type ToolchainCommand, type ToolchainInvocation, acceptsConnection, addArgsFor, advisoryLine, applyAdditiveEdit, applyLintIgnores, badgeLead, badgeWidth, blockingFindingsMessage, buildPackageSecretsBlock, claimAgentRulesHint, claimDevServerState, classifyEdit, clearDevServerState, createConfirm, deployTargetIds, detectAgentRules, detectAiAgent, detectFramework, detectInstalledManagers, detectLintTools, detectPackageManager, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, execArgsFor, fillDevSecrets, formatLunoraEvent, generateSecretValue, installArgsFor, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, isRunnableTarget, lunoraLine, padBadge, paintAnswer, paintBadge, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, planToolchainInvocation, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectDependencies, readProjectDependencyNames, readProjectManifest, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveDeployDriver, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, runScriptArgsFor, runScriptCommand, runnableTargetIds, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, targetRunsOwnDevServer, toolchainExecArgs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
|
1187
|
+
export { AGENT_MODE_ENV, type AddIndexEdit, type AddOptionalColumnEdit, type AddTableEdit, type AdditiveEdit, type AgentDetection, type ApplyEditResult, type ApplyFailureReason, type AugmentPlan, CODEGEN_ENV, type CelldDevSession, type CelldDevSessionOptions, type CelldLineOrigin, type ClaimDevServerStateResult, type ContainerLogLevel, type ContainerLogLine, type ContainerLogSource, type ContainerLogStreamHandle, type ContainerLogStreamOptions, DEV_BINDINGS_FILE, DEV_DAEMON_ENV, DEV_HANDOFF_ENV, DEV_LOG_FILE, DEV_LOG_FILE_ENV, DEV_STATE_DIR, DEV_STATE_FILE, DEV_VARS_EXAMPLE_FILE, DEV_VARS_FILE, DEV_VARS_KEY_PATTERN, DEV_WORKER_ENV_VALUE, DEV_WORKER_ENV_VAR, type DestructiveEdit, type DetectedFramework, type DevProcess, type DevProcessOptions, type DevProcessSpawner, type DevSecretsFillPlan, type DevServerMode, type DevServerState, type DiscoverAgentInfoResult, type DiscoverContainerInfoResult, type DiscoverWorkflowInfoResult, type DiscoveryCache, type DockerLike, type EnsureDevVariablesDeps, type EnsureDevVariablesResult, type EnsureDevVariablesStatus, type FillDevSecretsResult, type FindingLogger, type FrameworkClass, type FrameworkDetection, type HookLogger, type HookSpawnDescriptor, type HookSpawner, LINKED_PROJECT_DIR, LINKED_PROJECT_FILE, LUNORA_EVENT_SOURCE, LUNORA_IGNORED_PATHS, type LinkedProject, type LintIgnoreOutcome, type LintIgnoreStatus, type LintTool, type LunoraFormattedLine, type LunoraLineLevel, type MultiSelectOption, PACKAGE_SECRETS_REGISTRY, type ParseSchemaResult, type PostCodegenHookResult, type RemotePreference, type ScaffoldPlan, type SchemaColumn, type SchemaEdit, type SchemaIndex, type SchemaTable, type SecretEntry, type SelectOption, acceptsConnection, applyAdditiveEdit, applyLintIgnores, blockingFindingsMessage, buildPackageSecretsBlock, claimDevServerState, classifyEdit, clearDevServerState, createConfirm, detectAiAgent, detectFramework, detectLintTools, discoverAgentInfo, discoverContainerInfo, discoverWorkflowInfo, ensureDevVariables, ensureDevVariablesExample as ensureDevVarsExample, ensureDevWorkerEnv, escapeRegExp, fillDevSecrets, formatLunoraEvent, generateSecretValue, interpretRemote, isCodegenDisabled, isDevServerReady, isInteractive, isMintableSecretKey, isPlaceholderValue, isProcessAlive, isRecordedProcessCurrent, parseDevVariableEntries, parseSchema, planDevSecretsFill, planDevVariablesAugment, planDevVariablesScaffold, projectUsesUmbrella, promptMultiSelect, promptSelect, promptText, promptYesNo, readDevServerState, readLinkedProject, readLiveDevServerState, readProjectRemotePreference, readProjectTarget, removeDevVariableLine, reportCodegenFindings, requiredSecrets, resolveProjectTarget, resolveSchemaDirectory, resolveTargetOrThrow, runPostCodegenHook, secretsForPackages, startCelldDevSession, startDevProcess, streamContainerLogs, updateDevServerState, upsertDevVariableLine, writeDevServerState, writeDevVariablesFileAtomically, writeLinkedProject };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AGENT_MODE_ENV as o,detectAiAgent as t}from"./packem_shared/AGENT_MODE_ENV-D8MvSwPE.mjs";import{discoverAgentInfo as s}from"./packem_shared/discoverAgentInfo-pqFMJBtJ.mjs";import{AGENT_RULES_DIR as i,AGENT_RULES_HINT as n,AGENT_RULES_HINT_ENV as _,LUNORA_SKILL_NAMES as c,ROOT_SKILL_NAME as l,claimAgentRulesHint as p,detectAgentRules as D}from"./packem_shared/AGENT_RULES_DIR-HrrbNZPy.mjs";import{startCelldDevSession as m}from"./packem_shared/startCelldDevSession-BLFsd6jG.mjs";import{CODEGEN_ENV as S,isCodegenDisabled as f}from"./packem_shared/CODEGEN_ENV-ZsCxV1kP.mjs";import{discoverContainerInfo as v}from"./packem_shared/discoverContainerInfo-DzXr7Vm3.mjs";import{streamContainerLogs as N}from"./packem_shared/streamContainerLogs-0nko1qpv.mjs";import{detectFramework as g,projectUsesUmbrella as x}from"./packem_shared/detectFramework-Dfpvu6rD.mjs";import{acceptsConnection as I,startDevProcess as O}from"./packem_shared/acceptsConnection-DHhUYGjT.mjs";import{DEV_BINDINGS_FILE as u,DEV_DAEMON_ENV as C,DEV_HANDOFF_ENV as F,DEV_LOG_FILE as U,DEV_LOG_FILE_ENV as M,DEV_STATE_DIR as G,DEV_STATE_FILE as B,claimDevServerState as b,clearDevServerState as y,isDevServerReady as k,isProcessAlive as j,isRecordedProcessCurrent as K,readDevServerState as h,readLiveDevServerState as w,updateDevServerState as H,writeDevServerState as W}from"./packem_shared/DEV_BINDINGS_FILE-C0ZN_XlP.mjs";import{DEV_VARS_EXAMPLE_FILE as J,DEV_VARS_FILE as q,DEV_VARS_KEY_PATTERN as X,escapeRegExp as z,parseDevVariableEntries as Q,removeDevVariableLine as Z,upsertDevVariableLine as $}from"./packem_shared/DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{DEV_WORKER_ENV_VALUE as re,DEV_WORKER_ENV_VAR as oe,ensureDevWorkerEnv as te}from"./packem_shared/DEV_WORKER_ENV_VALUE-2XFXmRrP.mjs";import{createDiscoveryCache as se}from"./packem_shared/createDiscoveryCache-npJI4uej.mjs";import{DEFAULT_DEPLOY_TARGET as ie,deployTargetIds as ne,isRunnableTarget as _e,planToolchainInvocation as ce,resolveDeployDriver as le,runnableTargetIds as pe,targetRunsOwnDevServer as De}from"./packem_shared/DEFAULT_DEPLOY_TARGET-rR7buNQw.mjs";import{i as me,s as Ae}from"./packem_shared/infer-bindings-C1NFOdMi.mjs";import{LINKED_PROJECT_DIR as fe,LINKED_PROJECT_FILE as Le,readLinkedProject as ve,writeLinkedProject as Re}from"./packem_shared/LINKED_PROJECT_DIR-Ba5qPEwo.mjs";import{LUNORA_IGNORED_PATHS as Te,applyLintIgnores as ge,detectLintTools as xe}from"./packem_shared/LUNORA_IGNORED_PATHS-U93uPxrW.mjs";import{
|
|
1
|
+
import{AGENT_MODE_ENV as o,detectAiAgent as t}from"./packem_shared/AGENT_MODE_ENV-D8MvSwPE.mjs";import{discoverAgentInfo as s}from"./packem_shared/discoverAgentInfo-pqFMJBtJ.mjs";import{AGENT_RULES_DIR as i,AGENT_RULES_HINT as n,AGENT_RULES_HINT_ENV as _,LUNORA_SKILL_NAMES as c,ROOT_SKILL_NAME as l,claimAgentRulesHint as p,detectAgentRules as D}from"./packem_shared/AGENT_RULES_DIR-HrrbNZPy.mjs";import{startCelldDevSession as m}from"./packem_shared/startCelldDevSession-BLFsd6jG.mjs";import{CODEGEN_ENV as S,isCodegenDisabled as f}from"./packem_shared/CODEGEN_ENV-ZsCxV1kP.mjs";import{discoverContainerInfo as v}from"./packem_shared/discoverContainerInfo-DzXr7Vm3.mjs";import{streamContainerLogs as N}from"./packem_shared/streamContainerLogs-0nko1qpv.mjs";import{detectFramework as g,projectUsesUmbrella as x}from"./packem_shared/detectFramework-Dfpvu6rD.mjs";import{acceptsConnection as I,startDevProcess as O}from"./packem_shared/acceptsConnection-DHhUYGjT.mjs";import{DEV_BINDINGS_FILE as u,DEV_DAEMON_ENV as C,DEV_HANDOFF_ENV as F,DEV_LOG_FILE as U,DEV_LOG_FILE_ENV as M,DEV_STATE_DIR as G,DEV_STATE_FILE as B,claimDevServerState as b,clearDevServerState as y,isDevServerReady as k,isProcessAlive as j,isRecordedProcessCurrent as K,readDevServerState as h,readLiveDevServerState as w,updateDevServerState as H,writeDevServerState as W}from"./packem_shared/DEV_BINDINGS_FILE-C0ZN_XlP.mjs";import{DEV_VARS_EXAMPLE_FILE as J,DEV_VARS_FILE as q,DEV_VARS_KEY_PATTERN as X,escapeRegExp as z,parseDevVariableEntries as Q,removeDevVariableLine as Z,upsertDevVariableLine as $}from"./packem_shared/DEV_VARS_EXAMPLE_FILE-CqLorAxT.mjs";import{DEV_WORKER_ENV_VALUE as re,DEV_WORKER_ENV_VAR as oe,ensureDevWorkerEnv as te}from"./packem_shared/DEV_WORKER_ENV_VALUE-2XFXmRrP.mjs";import{createDiscoveryCache as se}from"./packem_shared/createDiscoveryCache-npJI4uej.mjs";import{DEFAULT_DEPLOY_TARGET as ie,deployTargetIds as ne,isRunnableTarget as _e,planToolchainInvocation as ce,resolveDeployDriver as le,runnableTargetIds as pe,targetRunsOwnDevServer as De}from"./packem_shared/DEFAULT_DEPLOY_TARGET-rR7buNQw.mjs";import{i as me,s as Ae}from"./packem_shared/infer-bindings-C1NFOdMi.mjs";import{LINKED_PROJECT_DIR as fe,LINKED_PROJECT_FILE as Le,readLinkedProject as ve,writeLinkedProject as Re}from"./packem_shared/LINKED_PROJECT_DIR-Ba5qPEwo.mjs";import{LUNORA_IGNORED_PATHS as Te,applyLintIgnores as ge,detectLintTools as xe}from"./packem_shared/LUNORA_IGNORED_PATHS-U93uPxrW.mjs";import{blockingFindingsMessage as Ie,reportCodegenFindings as Oe}from"./packem_shared/blockingFindingsMessage-BVbijPdn.mjs";import{LUNORA_EVENT_SOURCE as ue,formatLunoraEvent as Ce}from"./packem_shared/LUNORA_EVENT_SOURCE-B9ZVohjO.mjs";import{LUNORA_TAG as Ue,advisoryLine as Me,lunoraLine as Ge}from"./packem_shared/LUNORA_TAG-DQTGPqcJ.mjs";import{default as be}from"./packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as ke,detectInstalledManagers as je,detectPackageManager as Ke,execArgsFor as he,installArgsFor as we,runScriptArgsFor as He,runScriptCommand as We,toolchainExecArgs as Ye}from"./packem_shared/addArgsFor-CYZKhNIo.mjs";import{P as qe,s as Xe}from"./packem_shared/package-secrets-registry-BeheNwsP.mjs";import{runPostCodegenHook as Qe}from"./packem_shared/runPostCodegenHook-Dx3yTsYZ.mjs";import{interpretRemote as $e,readProjectRemotePreference as er,readProjectTarget as rr,resolveProjectTarget as or,resolveTargetOrThrow as tr}from"./packem_shared/interpretRemote-CcmGeGZ_.mjs";import{readProjectDependencies as sr,readProjectDependencyNames as Er,readProjectManifest as ir}from"./packem_shared/readProjectDependencies-l3uhUKjo.mjs";import{createConfirm as _r,isInteractive as cr,promptMultiSelect as lr,promptSelect as pr,promptText as Dr,promptYesNo as dr}from"./packem_shared/createConfirm-D5mKTMHj.mjs";import{default as Ar}from"./packem_shared/resolveSchemaDirectory-Ca5P6KuP.mjs";import{buildPackageSecretsBlock as fr,ensureDevVariables as Lr,ensureDevVarsExample as vr,fillDevSecrets as Rr,generateSecretValue as Nr,isMintableSecretKey as Tr,isPlaceholderValue as gr,planDevSecretsFill as xr,planDevVariablesAugment as Vr,planDevVariablesScaffold as Ir,requiredSecrets as Or,writeDevVariablesFileAtomically as Pr}from"./packem_shared/buildPackageSecretsBlock-BWV_VxqV.mjs";import{applyAdditiveEdit as Cr,classifyEdit as Fr}from"./packem_shared/applyAdditiveEdit-CH0VhMJ2.mjs";import{parseSchema as Mr}from"./packem_shared/parseSchema-D1Wbr1qv.mjs";import{classifyPolicyEdit as Br,resolveServerModule as br,scaffoldPolicyFile as yr,wireRlsIntoProcedure as kr}from"./packem_shared/classifyPolicyEdit-DJi9Fk8G.mjs";import{discoverSchemaInfo as Kr}from"./packem_shared/discoverSchemaInfo-BBRlXZop.mjs";import{ACCENT as wr,BADGES as Hr,BADGE_COLUMN_WIDTH as Wr,LUNA_ART as Yr,LUNA_BUNNY as Jr,LUNA_NAME as qr,LUNA_SIGNOFF as Xr,STEP_BADGE_NAMES as zr,badgeLead as Qr,badgeWidth as Zr,padBadge as $r,paintAnswer as eo,paintBadge as ro}from"./packem_shared/ACCENT-CotPTfv7.mjs";import{COMPOSED_WORKER_ENTRY as to,DURABLE_OBJECT_BINDINGS as ao,GENERATED_CLASS_MODULES as so,GENERATED_MODULE_DURABLE_OBJECTS as Eo,MERGED_DURABLE_OBJECTS_MODULE as io,isMergedProject as no,isMergedRoleModule as _o}from"./packem_shared/COMPOSED_WORKER_ENTRY-Ciiba5g_.mjs";import{discoverWorkflowInfo as lo}from"./packem_shared/discoverWorkflowInfo-zW7Tt0Tn.mjs";export{wr as ACCENT,o as AGENT_MODE_ENV,i as AGENT_RULES_DIR,n as AGENT_RULES_HINT,_ as AGENT_RULES_HINT_ENV,Hr as BADGES,Wr as BADGE_COLUMN_WIDTH,S as CODEGEN_ENV,to as COMPOSED_WORKER_ENTRY,ie as DEFAULT_DEPLOY_TARGET,u as DEV_BINDINGS_FILE,C as DEV_DAEMON_ENV,F as DEV_HANDOFF_ENV,U as DEV_LOG_FILE,M as DEV_LOG_FILE_ENV,G as DEV_STATE_DIR,B as DEV_STATE_FILE,J as DEV_VARS_EXAMPLE_FILE,q as DEV_VARS_FILE,X as DEV_VARS_KEY_PATTERN,re as DEV_WORKER_ENV_VALUE,oe as DEV_WORKER_ENV_VAR,ao as DURABLE_OBJECT_BINDINGS,so as GENERATED_CLASS_MODULES,Eo as GENERATED_MODULE_DURABLE_OBJECTS,fe as LINKED_PROJECT_DIR,Le as LINKED_PROJECT_FILE,Yr as LUNA_ART,Jr as LUNA_BUNNY,qr as LUNA_NAME,Xr as LUNA_SIGNOFF,ue as LUNORA_EVENT_SOURCE,Te as LUNORA_IGNORED_PATHS,c as LUNORA_SKILL_NAMES,Ue as LUNORA_TAG,be as LunoraReporter,io as MERGED_DURABLE_OBJECTS_MODULE,qe as PACKAGE_SECRETS_REGISTRY,l as ROOT_SKILL_NAME,zr as STEP_BADGE_NAMES,I as acceptsConnection,ke as addArgsFor,Me as advisoryLine,Cr as applyAdditiveEdit,ge as applyLintIgnores,Qr as badgeLead,Zr as badgeWidth,Ie as blockingFindingsMessage,fr as buildPackageSecretsBlock,p as claimAgentRulesHint,b as claimDevServerState,Fr as classifyEdit,Br as classifyPolicyEdit,y as clearDevServerState,_r as createConfirm,se as createDiscoveryCache,ne as deployTargetIds,D as detectAgentRules,t as detectAiAgent,g as detectFramework,je as detectInstalledManagers,xe as detectLintTools,Ke as detectPackageManager,s as discoverAgentInfo,v as discoverContainerInfo,Kr as discoverSchemaInfo,lo as discoverWorkflowInfo,Lr as ensureDevVariables,vr as ensureDevVarsExample,te as ensureDevWorkerEnv,z as escapeRegExp,he as execArgsFor,Rr as fillDevSecrets,Ce as formatLunoraEvent,Nr as generateSecretValue,me as inferLunoraBindings,we as installArgsFor,$e as interpretRemote,f as isCodegenDisabled,k as isDevServerReady,cr as isInteractive,no as isMergedProject,_o as isMergedRoleModule,Tr as isMintableSecretKey,gr as isPlaceholderValue,j as isProcessAlive,K as isRecordedProcessCurrent,_e as isRunnableTarget,Ge as lunoraLine,$r as padBadge,eo as paintAnswer,ro as paintBadge,Q as parseDevVariableEntries,Mr as parseSchema,xr as planDevSecretsFill,Vr as planDevVariablesAugment,Ir as planDevVariablesScaffold,ce as planToolchainInvocation,x as projectUsesUmbrella,lr as promptMultiSelect,pr as promptSelect,Dr as promptText,dr as promptYesNo,h as readDevServerState,ve as readLinkedProject,w as readLiveDevServerState,sr as readProjectDependencies,Er as readProjectDependencyNames,ir as readProjectManifest,er as readProjectRemotePreference,rr as readProjectTarget,Z as removeDevVariableLine,Oe as reportCodegenFindings,Or as requiredSecrets,le as resolveDeployDriver,or as resolveProjectTarget,Ar as resolveSchemaDirectory,br as resolveServerModule,tr as resolveTargetOrThrow,Qe as runPostCodegenHook,He as runScriptArgsFor,We as runScriptCommand,pe as runnableTargetIds,yr as scaffoldPolicyFile,Ae as secretSourcesFromBindings,Xe as secretsForPackages,m as startCelldDevSession,O as startDevProcess,N as streamContainerLogs,De as targetRunsOwnDevServer,Ye as toolchainExecArgs,H as updateDevServerState,$ as upsertDevVariableLine,kr as wireRlsIntoProcedure,W as writeDevServerState,Pr as writeDevVariablesFileAtomically,Re as writeLinkedProject};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{paintBadge as r,BADGES as o}from"./ACCENT-CotPTfv7.mjs";const A=r(o.lunora),e=n=>`${A} ${n}`,R={ERROR:o.error,INFO:o.info,WARN:o.warn},s=(n,t,a,i)=>`${r(R[n])} ${t}: ${a} — ${i}`;export{A as LUNORA_TAG,s as advisoryLine,e as lunoraLine};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{LunoraError as n}from"@lunora/errors";import{lunoraLine as i}from"./LUNORA_TAG-
|
|
1
|
+
import{LunoraError as n}from"@lunora/errors";import{lunoraLine as i}from"./LUNORA_TAG-DQTGPqcJ.mjs";import{validateWranglerProject as l}from"./UNEXPORTED_CLASS_MARKER-DwJCN8fX.mjs";const m=(e,a,t)=>{const r=l({projectRoot:e.projectRoot,schemaDir:e.schemaDir});if(!r.wranglerPath)throw new n("INTERNAL",["[lunora] wrangler.jsonc not found.",` searched in: ${e.projectRoot}`," create a wrangler.jsonc declaring at least the SHARD durable object binding."].join(`
|
|
2
2
|
`));for(const o of r.report.warnings)a(i(`wrangler validator: ${o}`));if(r.problems.length>0)throw new n("INTERNAL",["[lunora] wrangler configuration is missing bindings required by your schema.",` file: ${r.wranglerPath}`,"",...r.problems.map(o=>` - ${o}`),"",` ${t}`].join(`
|
|
3
3
|
`))};export{m as assertWranglerSatisfiesSchema};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{describeErrorLevelFindings as t,sortedUniqueNames as a}from"@lunora/codegen";import{LUNORA_TAG as l,advisoryLine as r}from"./LUNORA_TAG-DQTGPqcJ.mjs";const m=(n,i)=>{for(const e of n.advisories){const o=r(e.level,e.name,e.detail,e.remediation);e.level==="ERROR"?i.error(o):i.warn(o)}for(const e of n.platformDiagnostics){const o=r(e.level==="error"?"ERROR":"WARN",e.name,e.message,e.remediation);e.level==="error"?i.error(o):i.warn(o)}},f=n=>{const{advisoryNames:i,platformDiagnosticNames:e}=t(n),o=a([...i,...e]);if(o.length===0)return;const s=o.length===1?"advisory/platform diagnostic":"advisories/platform diagnostics";return`${l} ${String(o.length)} ERROR-level ${s} (${o.join(", ")}) — see the log above for detail.`};export{f as blockingFindingsMessage,m as reportCodegenFindings};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `DeployDriver` — the provider-neutral seam between a Lunora command and the
|
|
3
|
+
* host CLI that carries it out (plan 114, §5.3).
|
|
4
|
+
*
|
|
5
|
+
* The seam is the **toolchain surface**: which command a host runs to deploy,
|
|
6
|
+
* serve, tail, or set a secret. A driver only *describes* that command
|
|
7
|
+
* ({@link ToolchainCommand}); it never spawns. The CLI keeps ownership of
|
|
8
|
+
* running it — package-manager resolution (`pnpm exec` / `npx --` / `bun x`)
|
|
9
|
+
* and the injected spawner its tests substitute — so the driver stays free of
|
|
10
|
+
* process concerns and remains trivially testable as a pure function.
|
|
11
|
+
*
|
|
12
|
+
* Each request type below is deliberately neutral: `preview`, `environment`,
|
|
13
|
+
* `temporary` are concepts, not wrangler flags. A second host maps the same
|
|
14
|
+
* request onto its own CLI without the caller changing.
|
|
15
|
+
*
|
|
16
|
+
* Three drivers are registered: Cloudflare (`cloudflare/cloudflare-driver.ts`)
|
|
17
|
+
* and celld (`celld/celld-driver.ts`), which ship toolchains, and Node
|
|
18
|
+
* (`node/node-driver.ts`), which has none — it is a codegen target, and
|
|
19
|
+
* `lunora deploy` / `lunora dev` refuse it at selection.
|
|
20
|
+
*
|
|
21
|
+
* **What this seam deliberately does NOT carry: configuration inference.** It
|
|
22
|
+
* used to, through an `infer`/`provision` pair over a provider-neutral
|
|
23
|
+
* `ResourceGraph`. Nothing ever called either one — every consumer reads
|
|
24
|
+
* `.toolchain` or just validates the target — and the arm rotted in place: the
|
|
25
|
+
* Node driver was *only* `infer` + `provision`, so its report of what that
|
|
26
|
+
* target cannot serve (containers, undispatched crons) could not reach an
|
|
27
|
+
* operator however wrong the app was. The reason it never got wired is worth
|
|
28
|
+
* keeping: writing real host configuration needs the host's own encodings —
|
|
29
|
+
* binding names, DO class wiring, migration tags — which a neutral graph
|
|
30
|
+
* necessarily discards, so `provision` re-derived them anyway and the graph was
|
|
31
|
+
* decorative. A second target that needs to share inference should grow the
|
|
32
|
+
* seam back with a caller attached, and with an encoding escape hatch.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* A host CLI invocation, described but not run.
|
|
36
|
+
*
|
|
37
|
+
* `tool` is the binary name only (`"wrangler"`); the caller resolves how to
|
|
38
|
+
* execute it through the project's package manager (see `toolchainExecArgs`).
|
|
39
|
+
* Keeping that split means a driver never has to know whether the project uses
|
|
40
|
+
* pnpm, npm, yarn, or bun.
|
|
41
|
+
*/
|
|
42
|
+
interface ToolchainCommand {
|
|
43
|
+
/** Arguments for {@link ToolchainCommand.tool}. */
|
|
44
|
+
args: ReadonlyArray<string>;
|
|
45
|
+
/**
|
|
46
|
+
* The tool is a standalone binary installed on `PATH`, not a project
|
|
47
|
+
* dependency: run it directly. Going through the package manager would be
|
|
48
|
+
* wrong for it — `npx --` / `bun x` fetch an npm package of the same name
|
|
49
|
+
* when none is installed locally, which for a non-npm binary is somebody
|
|
50
|
+
* else's code.
|
|
51
|
+
*/
|
|
52
|
+
onPath?: boolean;
|
|
53
|
+
/** The host CLI binary, e.g. `"wrangler"`. */
|
|
54
|
+
tool: string;
|
|
55
|
+
}
|
|
56
|
+
/** Neutral options for a deploy. */
|
|
57
|
+
interface DeployRequest {
|
|
58
|
+
/** Host config file to deploy, when the flow uses a projected one (see {@link DeployDriver.projectConfig}). */
|
|
59
|
+
configPath?: string;
|
|
60
|
+
/** Validate and bundle without publishing — nothing ships. */
|
|
61
|
+
dryRun?: boolean;
|
|
62
|
+
/** Deploy this entry file instead of the host config's default (framework composition). */
|
|
63
|
+
entry?: string;
|
|
64
|
+
/** Named deployment environment, when the host supports them. */
|
|
65
|
+
environment?: string;
|
|
66
|
+
/** Write the built bundle (and any build metadata) to this directory. */
|
|
67
|
+
outDir?: string;
|
|
68
|
+
/** Upload a preview/versioned artifact instead of taking production traffic. */
|
|
69
|
+
preview?: boolean;
|
|
70
|
+
/** Deploy to a short-lived, unauthenticated account where the host offers one. */
|
|
71
|
+
temporary?: boolean;
|
|
72
|
+
}
|
|
73
|
+
/** Neutral options for a local dev server. */
|
|
74
|
+
interface DevRequest {
|
|
75
|
+
/** Host config file to run against, when the flow uses a generated one. */
|
|
76
|
+
configPath?: string;
|
|
77
|
+
/** Named environment. */
|
|
78
|
+
environment?: string;
|
|
79
|
+
/** Extra host-specific flags the caller has already resolved. */
|
|
80
|
+
extraArgs?: ReadonlyArray<string>;
|
|
81
|
+
}
|
|
82
|
+
/** Neutral options for tailing live logs. */
|
|
83
|
+
interface TailRequest {
|
|
84
|
+
/** Named environment. */
|
|
85
|
+
environment?: string;
|
|
86
|
+
/** Output format the host tail supports (`"json"`, `"pretty"`, …). */
|
|
87
|
+
format?: string;
|
|
88
|
+
/** Free-text filter. */
|
|
89
|
+
search?: string;
|
|
90
|
+
/** Status filter (`"error"`, `"ok"`, …). */
|
|
91
|
+
status?: string;
|
|
92
|
+
/** Tail a short-lived account's deployment. */
|
|
93
|
+
temporary?: boolean;
|
|
94
|
+
/** Tail a specific deployed worker/service by name, when the host addresses them individually. */
|
|
95
|
+
worker?: string;
|
|
96
|
+
}
|
|
97
|
+
/** Neutral options for reading or writing deployment secrets. */
|
|
98
|
+
interface SecretRequest {
|
|
99
|
+
/** Named environment. */
|
|
100
|
+
environment?: string;
|
|
101
|
+
/** The secret's name — required for `put`, unused for `list`. */
|
|
102
|
+
key?: string;
|
|
103
|
+
/** Operate against a short-lived account. */
|
|
104
|
+
temporary?: boolean;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The host's command-line surface. Optional as a whole: a host with no vendor
|
|
108
|
+
* CLI (the Node target; a hypothetical API-driven one) declares none, and
|
|
109
|
+
* `isRunnableTarget` refuses it for the commands that would have to shell out.
|
|
110
|
+
*
|
|
111
|
+
* `deploy` and `dev` are what make a target runnable. The secret and tail
|
|
112
|
+
* commands are optional on their own, because a runnable host can simply not
|
|
113
|
+
* have them — celld keeps configuration in plain `vars` and has no log tail —
|
|
114
|
+
* and the commands that need one say so rather than guessing a substitute.
|
|
115
|
+
*/
|
|
116
|
+
interface DriverToolchain {
|
|
117
|
+
/** The command that deploys the app. */
|
|
118
|
+
deploy: (request: DeployRequest) => ToolchainCommand;
|
|
119
|
+
/** The command that runs a local dev server. */
|
|
120
|
+
dev: (request: DevRequest) => ToolchainCommand;
|
|
121
|
+
/**
|
|
122
|
+
* Where `lunora dev` runs the worker. `"workerd"`: `wrangler dev`, or the
|
|
123
|
+
* Vite plugin's `@cloudflare/vite-plugin`, whichever flavor the project
|
|
124
|
+
* picks. `"own"`: the host's dev server ({@link DriverToolchain.dev}) on
|
|
125
|
+
* the projected config, always the standalone flavor — neither Vite nor a
|
|
126
|
+
* framework sidecar can serve the worker on that runtime.
|
|
127
|
+
*/
|
|
128
|
+
readonly devServer: "own" | "workerd";
|
|
129
|
+
/**
|
|
130
|
+
* Whether `lunora deploy` builds and pushes container images itself
|
|
131
|
+
* (railpack, into the host's registry) before `deploy`. `false` when the
|
|
132
|
+
* host CLI builds each image from its Dockerfile during the deploy.
|
|
133
|
+
*/
|
|
134
|
+
readonly prebuildsContainerImages: boolean;
|
|
135
|
+
/** The command that writes many secrets in one call, as a JSON object of name to value on stdin. Optional: hosts without it get one `secretPut` per key. */
|
|
136
|
+
secretBulk?: (request: SecretRequest) => ToolchainCommand;
|
|
137
|
+
/** The command that lists remote secret names, when the host has a secret store. */
|
|
138
|
+
secretList?: (request: SecretRequest) => ToolchainCommand;
|
|
139
|
+
/** The command that writes one secret, when the host has a secret store. Its value is passed on stdin, never argv. */
|
|
140
|
+
secretPut?: (request: SecretRequest) => ToolchainCommand;
|
|
141
|
+
/** The command that tails live logs, when the host has one. */
|
|
142
|
+
tail?: (request: TailRequest) => ToolchainCommand;
|
|
143
|
+
}
|
|
144
|
+
/** What a {@link DeployDriver.projectConfig} projection is for — a dev server may need a different source than a deploy. */
|
|
145
|
+
type ProjectionPurpose = "deploy" | "dev";
|
|
146
|
+
/**
|
|
147
|
+
* The result of {@link DeployDriver.projectConfig}: a plan, not yet on disk.
|
|
148
|
+
* The caller validates the request it is for (the toolchain's argv builder
|
|
149
|
+
* refuses unsupported options), then calls `write` — so a refused command
|
|
150
|
+
* changes nothing.
|
|
151
|
+
*/
|
|
152
|
+
interface ProjectedConfig {
|
|
153
|
+
/** Where the projection goes, to pass as the request's `configPath`. */
|
|
154
|
+
configPath: string;
|
|
155
|
+
/** Every key removed, as a dotted path (`observability`, `containers[0].rollout_step_percentage`). */
|
|
156
|
+
dropped: ReadonlyArray<string>;
|
|
157
|
+
/** Write the projection (and any build-artifact cleanup it planned). */
|
|
158
|
+
write: () => void;
|
|
159
|
+
}
|
|
160
|
+
/** A deploy target's implementation: an identity the registry resolves, and the host CLI surface (if any) behind it. */
|
|
161
|
+
interface DeployDriver {
|
|
162
|
+
/** The target id this driver serves (`"cloudflare"`, …) — matches codegen's `target`. */
|
|
163
|
+
readonly id: string;
|
|
164
|
+
/** Human-readable target name, for logs. */
|
|
165
|
+
readonly name: string;
|
|
166
|
+
/**
|
|
167
|
+
* Rewrite the project's wrangler config into the form this host's CLI
|
|
168
|
+
* accepts, and return the file to hand `deploy`/`dev` as `configPath`.
|
|
169
|
+
* Absent when the host reads the project's config as-is (Cloudflare).
|
|
170
|
+
*
|
|
171
|
+
* Needed because Lunora's reconcilers and templates write Cloudflare-only
|
|
172
|
+
* keys (`observability`, `limits`, …) that a Workers-compatible host with a
|
|
173
|
+
* strict config reader refuses outright. `dropped` names what was removed,
|
|
174
|
+
* so the caller can say so instead of silently deploying less than the
|
|
175
|
+
* config describes.
|
|
176
|
+
*/
|
|
177
|
+
readonly projectConfig?: (projectRoot: string, purpose: ProjectionPurpose) => ProjectedConfig;
|
|
178
|
+
/**
|
|
179
|
+
* The host's command-line surface, or `undefined` for a host that has none.
|
|
180
|
+
* Pure: these build argv, they never spawn.
|
|
181
|
+
*/
|
|
182
|
+
readonly toolchain?: DriverToolchain;
|
|
183
|
+
}
|
|
184
|
+
export { DeployDriver as D, ProjectedConfig as P, SecretRequest as S, TailRequest as T, DeployRequest as a, DevRequest as b, DriverToolchain as c, ProjectionPurpose as d, ToolchainCommand as e };
|