@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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { b as AGENT_RULES_HINT, D as DEFAULT_DEPLOY_TARGET, l as LUNORA_TAG, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, S as STEP_BADGE_NAMES, type p as StepBadgeName, q as addArgsFor, 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, N as readProjectManifest, U as runScriptCommand, V as runnableTargetIds, X as toolchainExecArgs } from "../packem_shared/index.d-DkNi7r6E.mjs";
|
|
2
|
+
import "../packem_shared/deploy-driver.d-Cl96-c1l.mjs";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { b as AGENT_RULES_HINT, D as DEFAULT_DEPLOY_TARGET, l as LUNORA_TAG, n as LunoraReporter, type P as PackageManager, type o as PackageManagerProbe, S as STEP_BADGE_NAMES, type p as StepBadgeName, q as addArgsFor, 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, N as readProjectManifest, U as runScriptCommand, V as runnableTargetIds, X as toolchainExecArgs } from "../packem_shared/index.d-Cmx4jMFV.js";
|
|
2
|
+
import "../packem_shared/deploy-driver.d-Cl96-c1l.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{AGENT_RULES_HINT as t,claimAgentRulesHint as o,detectAgentRules as a}from"../packem_shared/AGENT_RULES_DIR-HrrbNZPy.mjs";import{DEFAULT_DEPLOY_TARGET as s,deployTargetIds as l,isRunnableTarget as A,runnableTargetIds as d}from"../packem_shared/DEFAULT_DEPLOY_TARGET-rR7buNQw.mjs";import{LUNORA_TAG as c,lunoraLine as m}from"../packem_shared/LUNORA_TAG-DQTGPqcJ.mjs";import{default as T}from"../packem_shared/LunoraReporter-f277GLNT.mjs";import{addArgsFor as x,detectInstalledManagers as E,detectPackageManager as i,execArgsFor as u,installArgsFor as R,runScriptCommand as _,toolchainExecArgs as L}from"../packem_shared/addArgsFor-CYZKhNIo.mjs";import{readProjectManifest as G}from"../packem_shared/readProjectDependencies-l3uhUKjo.mjs";import{STEP_BADGE_NAMES as M}from"../packem_shared/ACCENT-CotPTfv7.mjs";export{t as AGENT_RULES_HINT,s as DEFAULT_DEPLOY_TARGET,c as LUNORA_TAG,T as LunoraReporter,M as STEP_BADGE_NAMES,x as addArgsFor,o as claimAgentRulesHint,l as deployTargetIds,a as detectAgentRules,E as detectInstalledManagers,i as detectPackageManager,u as execArgsFor,R as installArgsFor,A as isRunnableTarget,m as lunoraLine,G as readProjectManifest,_ as runScriptCommand,d as runnableTargetIds,L as toolchainExecArgs};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { D as DeployDriver
|
|
1
|
+
import { D as DeployDriver } from "../packem_shared/deploy-driver.d-Cl96-c1l.mjs";
|
|
2
|
+
import { d as GeneratedClassModule, f as InferredBindings, S as SchemaInfo } from "../packem_shared/infer-bindings.d-eFzcOnRh.mjs";
|
|
2
3
|
import { WranglerQueueProducerIR, WranglerVariableIR } from '@lunora/codegen';
|
|
3
4
|
/** Apply one structural jsonc edit and return the rewritten text (a no-op edit returns the input). */
|
|
4
5
|
declare const applyModify: (text: string, path: ReadonlyArray<number | string>, value: unknown) => string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { D as DeployDriver
|
|
1
|
+
import { D as DeployDriver } from "../packem_shared/deploy-driver.d-Cl96-c1l.js";
|
|
2
|
+
import { d as GeneratedClassModule, f as InferredBindings, S as SchemaInfo } from "../packem_shared/infer-bindings.d-eFzcOnRh.js";
|
|
2
3
|
import { WranglerQueueProducerIR, WranglerVariableIR } from '@lunora/codegen';
|
|
3
4
|
/** Apply one structural jsonc edit and return the rewritten text (a no-op edit returns the input). */
|
|
4
5
|
declare const applyModify: (text: string, path: ReadonlyArray<number | string>, value: unknown) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{applyModify as o}from"../packem_shared/applyModify-DKP2l6S9.mjs";import{assertWranglerSatisfiesSchema as l}from"../packem_shared/assertWranglerSatisfiesSchema-
|
|
1
|
+
import{applyModify as o}from"../packem_shared/applyModify-DKP2l6S9.mjs";import{assertWranglerSatisfiesSchema as l}from"../packem_shared/assertWranglerSatisfiesSchema-D4FA4jKB.mjs";import{BINDING_MANIFEST_VERSION as i,buildBindingManifest as n}from"../packem_shared/BINDING_MANIFEST_VERSION-CfXEYG8e.mjs";import{CLOUDFLARE_CLI_CONFIG_WARNING_ENV as m,detectCloudflareCliConfig as E,warnCloudflareCliConfigOnce as s}from"../packem_shared/CLOUDFLARE_CLI_CONFIG_WARNING_ENV-BKMrOuXV.mjs";import{default as C}from"../packem_shared/CLOUDFLARE_DRIVER-CULavrYO.mjs";import{default as g}from"../packem_shared/GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG-f8CnJha3.mjs";import{hasCloudflareCredentials as R}from"../packem_shared/hasCloudflareCredentials-byvHpEiD.mjs";import{describeWithheldWorkersAi as _,withheldWorkersAi as I}from"../packem_shared/describeWithheldWorkersAi-IIxe3TuI.mjs";import{collectExportGaps as A,reconcileWranglerBindings as W}from"../packem_shared/collectExportGaps-BPuhGH2J.mjs";import{reconcileWranglerCompatibilityDate as O}from"../packem_shared/reconcileWranglerCompatibilityDate-hocXEuRA.mjs";import{describePreservedCrons as D,reconcileWranglerCrons as F}from"../packem_shared/describePreservedCrons-C5KPuPy3.mjs";import{reconcileBindingsSafely as v,reconcileWranglerExtras as B}from"../packem_shared/reconcileBindingsSafely-BEwmwy0q.mjs";import{REMOTE_ELIGIBLE_KEYS as h,injectRemoteFlags as u,isRemoteEnvEnabled as G,materializeDevWranglerConfig as U,planRemoteBindings as M,resolveRemoteEnabled as y}from"../packem_shared/REMOTE_ELIGIBLE_KEYS-PLeh_74E.mjs";import{materializeServiceDevConfigs as w}from"../packem_shared/materializeServiceDevConfigs-DLUHefD-.mjs";import{default as Y}from"../packem_shared/CLOUDFLARE_TOOLCHAIN_VERSIONS-DV5E_f_q.mjs";import{withTailConsumer as K}from"../packem_shared/withTailConsumer-DngzpJMK.mjs";import{WORKERS_CACHE_MIN_DATE as k,isCacheEnabled as z}from"../packem_shared/WORKERS_CACHE_MIN_DATE-0k9ABJtF.mjs";import{wranglerCodegenInputs as J}from"../packem_shared/wranglerCodegenInputs-CbisphsH.mjs";import{DEFAULT_OBSERVABILITY as q,resolveObservabilitySampling as Z}from"../packem_shared/DEFAULT_OBSERVABILITY-bN6UkTMx.mjs";import{mergeWranglerEnvironment as ee}from"../packem_shared/mergeWranglerEnvironment-DXiB-HcS.mjs";import{WRANGLER_FILES as oe,findWranglerFile as ae,readWranglerJsonc as le}from"../packem_shared/WRANGLER_FILES-UNW-xY5u.mjs";import{UNEXPORTED_CLASS_MARKER as ie,validateWranglerProject as ne}from"../packem_shared/UNEXPORTED_CLASS_MARKER-DwJCN8fX.mjs";import{scanWranglerVariablesForSecrets as me}from"../packem_shared/scanWranglerVariablesForSecrets-BFTVje1q.mjs";import{wranglerToAlchemy as se}from"../packem_shared/wranglerToAlchemy-CBO2ucRm.mjs";import{REQUIRED_COMPATIBILITY_DATE as Ce,REQUIRED_FLAG as de,validateWrangler as ge,validateWranglerConfig as xe}from"../packem_shared/REQUIRED_COMPATIBILITY_DATE-OLQlG0oj.mjs";export{i as BINDING_MANIFEST_VERSION,m as CLOUDFLARE_CLI_CONFIG_WARNING_ENV,C as CLOUDFLARE_DRIVER,Y as CLOUDFLARE_TOOLCHAIN_VERSIONS,q as DEFAULT_OBSERVABILITY,g as GLOBAL_FETCH_STRICTLY_PUBLIC_FLAG,h as REMOTE_ELIGIBLE_KEYS,Ce as REQUIRED_COMPATIBILITY_DATE,de as REQUIRED_FLAG,ie as UNEXPORTED_CLASS_MARKER,k as WORKERS_CACHE_MIN_DATE,oe as WRANGLER_FILES,o as applyModify,l as assertWranglerSatisfiesSchema,n as buildBindingManifest,A as collectExportGaps,D as describePreservedCrons,_ as describeWithheldWorkersAi,E as detectCloudflareCliConfig,ae as findWranglerFile,R as hasCloudflareCredentials,u as injectRemoteFlags,z as isCacheEnabled,G as isRemoteEnvEnabled,U as materializeDevWranglerConfig,w as materializeServiceDevConfigs,ee as mergeWranglerEnvironment,M as planRemoteBindings,le as readWranglerJsonc,v as reconcileBindingsSafely,W as reconcileWranglerBindings,O as reconcileWranglerCompatibilityDate,F as reconcileWranglerCrons,B as reconcileWranglerExtras,Z as resolveObservabilitySampling,y as resolveRemoteEnabled,me as scanWranglerVariablesForSecrets,ge as validateWrangler,xe as validateWranglerConfig,ne as validateWranglerProject,s as warnCloudflareCliConfigOnce,K as withTailConsumer,I as withheldWorkersAi,J as wranglerCodegenInputs,se as wranglerToAlchemy};
|
package/dist/index.d.mts
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-DkNi7r6E.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
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 };
|