@cruxy/cli 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/package.json +1 -1
  2. package/dist/agent/budget.d.ts +0 -52
  3. package/dist/agent/index.d.ts +0 -3
  4. package/dist/agent/loop.d.ts +0 -159
  5. package/dist/agent/prompts.d.ts +0 -69
  6. package/dist/agent/session.d.ts +0 -212
  7. package/dist/approval/classify.d.ts +0 -18
  8. package/dist/approval/index.d.ts +0 -6
  9. package/dist/approval/mutex.d.ts +0 -45
  10. package/dist/approval/policy.d.ts +0 -43
  11. package/dist/approval/prompt.d.ts +0 -48
  12. package/dist/approval/service.d.ts +0 -36
  13. package/dist/approval/types.d.ts +0 -82
  14. package/dist/brand/index.d.ts +0 -1
  15. package/dist/brand/voice.d.ts +0 -94
  16. package/dist/checkpoint/capture.d.ts +0 -17
  17. package/dist/checkpoint/gate-hook.d.ts +0 -28
  18. package/dist/checkpoint/gate.d.ts +0 -71
  19. package/dist/checkpoint/git-store.d.ts +0 -61
  20. package/dist/checkpoint/index.d.ts +0 -10
  21. package/dist/checkpoint/restore.d.ts +0 -23
  22. package/dist/checkpoint/service.d.ts +0 -89
  23. package/dist/checkpoint/set-rollback.d.ts +0 -51
  24. package/dist/checkpoint/set.d.ts +0 -44
  25. package/dist/checkpoint/shadow-store.d.ts +0 -23
  26. package/dist/checkpoint/types.d.ts +0 -164
  27. package/dist/cli/commands/checkpoint.d.ts +0 -7
  28. package/dist/cli/commands/config.d.ts +0 -2
  29. package/dist/cli/commands/hooks.d.ts +0 -8
  30. package/dist/cli/commands/index.d.ts +0 -7
  31. package/dist/cli/commands/init.d.ts +0 -7
  32. package/dist/cli/commands/login.d.ts +0 -8
  33. package/dist/cli/commands/mcp.d.ts +0 -9
  34. package/dist/cli/commands/memory.d.ts +0 -8
  35. package/dist/cli/commands/pr.d.ts +0 -8
  36. package/dist/cli/commands/rollback.d.ts +0 -18
  37. package/dist/cli/commands/run.d.ts +0 -2
  38. package/dist/cli/commands/skills.d.ts +0 -8
  39. package/dist/cli/commands/test.d.ts +0 -9
  40. package/dist/cli/commands/usage.d.ts +0 -9
  41. package/dist/cli/onboard.d.ts +0 -25
  42. package/dist/cli/program.d.ts +0 -2
  43. package/dist/cli/repl.d.ts +0 -27
  44. package/dist/cli/session-factory.d.ts +0 -42
  45. package/dist/cli/stream-print.d.ts +0 -14
  46. package/dist/components/autocomplete.d.ts +0 -32
  47. package/dist/components/frame.d.ts +0 -28
  48. package/dist/components/fuzzy.d.ts +0 -61
  49. package/dist/components/index.d.ts +0 -6
  50. package/dist/components/input.d.ts +0 -78
  51. package/dist/components/keys.d.ts +0 -48
  52. package/dist/components/select.d.ts +0 -28
  53. package/dist/config/credentials.d.ts +0 -18
  54. package/dist/config/index.d.ts +0 -5
  55. package/dist/config/manager.d.ts +0 -39
  56. package/dist/config/owner-only.d.ts +0 -19
  57. package/dist/config/paths.d.ts +0 -9
  58. package/dist/config/project.d.ts +0 -10
  59. package/dist/config/schema.d.ts +0 -2143
  60. package/dist/constants.d.ts +0 -65
  61. package/dist/errors/boundary.d.ts +0 -43
  62. package/dist/errors/constructors.d.ts +0 -411
  63. package/dist/errors/format.d.ts +0 -31
  64. package/dist/errors/index.d.ts +0 -4
  65. package/dist/errors/types.d.ts +0 -270
  66. package/dist/hooks/config.d.ts +0 -21
  67. package/dist/hooks/index.d.ts +0 -7
  68. package/dist/hooks/router.d.ts +0 -58
  69. package/dist/hooks/runner.d.ts +0 -88
  70. package/dist/hooks/service.d.ts +0 -38
  71. package/dist/hooks/slash.d.ts +0 -48
  72. package/dist/hooks/trust.d.ts +0 -46
  73. package/dist/hooks/types.d.ts +0 -147
  74. package/dist/index.d.ts +0 -2
  75. package/dist/indexing/chunker.d.ts +0 -28
  76. package/dist/indexing/embedder.d.ts +0 -98
  77. package/dist/indexing/index.d.ts +0 -9
  78. package/dist/indexing/indexer.d.ts +0 -45
  79. package/dist/indexing/retriever.d.ts +0 -61
  80. package/dist/indexing/service.d.ts +0 -49
  81. package/dist/indexing/store.d.ts +0 -103
  82. package/dist/indexing/types.d.ts +0 -78
  83. package/dist/indexing/util.d.ts +0 -34
  84. package/dist/indexing/walker.d.ts +0 -53
  85. package/dist/jobs/approval-queue.d.ts +0 -85
  86. package/dist/jobs/dispatch-tool.d.ts +0 -34
  87. package/dist/jobs/index.d.ts +0 -6
  88. package/dist/jobs/log-buffer.d.ts +0 -31
  89. package/dist/jobs/log-renderer.d.ts +0 -32
  90. package/dist/jobs/manager.d.ts +0 -139
  91. package/dist/jobs/types.d.ts +0 -81
  92. package/dist/lsp/client.d.ts +0 -25
  93. package/dist/lsp/index.d.ts +0 -8
  94. package/dist/lsp/pool.d.ts +0 -48
  95. package/dist/lsp/registry.d.ts +0 -38
  96. package/dist/lsp/server.d.ts +0 -48
  97. package/dist/lsp/service.d.ts +0 -44
  98. package/dist/lsp/tools/common.d.ts +0 -50
  99. package/dist/lsp/tools/find-definition.d.ts +0 -23
  100. package/dist/lsp/tools/find-references.d.ts +0 -23
  101. package/dist/lsp/tools/get-diagnostics.d.ts +0 -17
  102. package/dist/lsp/tools/hover.d.ts +0 -23
  103. package/dist/lsp/tools/index.d.ts +0 -4
  104. package/dist/lsp/transport.d.ts +0 -39
  105. package/dist/lsp/types.d.ts +0 -107
  106. package/dist/mcp/adapter.d.ts +0 -44
  107. package/dist/mcp/bounds.d.ts +0 -35
  108. package/dist/mcp/client.d.ts +0 -19
  109. package/dist/mcp/demarcate.d.ts +0 -12
  110. package/dist/mcp/http-transport.d.ts +0 -89
  111. package/dist/mcp/index.d.ts +0 -12
  112. package/dist/mcp/service.d.ts +0 -71
  113. package/dist/mcp/sibling-banner.d.ts +0 -25
  114. package/dist/mcp/transport.d.ts +0 -30
  115. package/dist/mcp/trust-gate.d.ts +0 -59
  116. package/dist/mcp/trust.d.ts +0 -62
  117. package/dist/mcp/types.d.ts +0 -62
  118. package/dist/mcp/url-guard.d.ts +0 -48
  119. package/dist/memory/index.d.ts +0 -7
  120. package/dist/memory/recall.d.ts +0 -56
  121. package/dist/memory/remember-tool.d.ts +0 -28
  122. package/dist/memory/secrets.d.ts +0 -29
  123. package/dist/memory/service.d.ts +0 -92
  124. package/dist/memory/store.d.ts +0 -32
  125. package/dist/memory/trust.d.ts +0 -52
  126. package/dist/memory/types.d.ts +0 -101
  127. package/dist/net/ip-guard.d.ts +0 -55
  128. package/dist/onboarding/detect.d.ts +0 -26
  129. package/dist/onboarding/flow.d.ts +0 -28
  130. package/dist/onboarding/index.d.ts +0 -5
  131. package/dist/onboarding/io.d.ts +0 -9
  132. package/dist/onboarding/steps.d.ts +0 -17
  133. package/dist/onboarding/types.d.ts +0 -81
  134. package/dist/plan/approve.d.ts +0 -16
  135. package/dist/plan/execute.d.ts +0 -28
  136. package/dist/plan/index.d.ts +0 -7
  137. package/dist/plan/policy.d.ts +0 -26
  138. package/dist/plan/render.d.ts +0 -5
  139. package/dist/plan/service.d.ts +0 -58
  140. package/dist/plan/submit-plan.d.ts +0 -33
  141. package/dist/plan/types.d.ts +0 -60
  142. package/dist/render/capabilities.d.ts +0 -31
  143. package/dist/render/diff.d.ts +0 -18
  144. package/dist/render/highlight.d.ts +0 -47
  145. package/dist/render/index.d.ts +0 -22
  146. package/dist/render/layout.d.ts +0 -59
  147. package/dist/render/motion.d.ts +0 -76
  148. package/dist/render/plain-renderer.d.ts +0 -39
  149. package/dist/render/resize.d.ts +0 -36
  150. package/dist/render/screen-reader-renderer.d.ts +0 -45
  151. package/dist/render/state.d.ts +0 -49
  152. package/dist/render/tty-renderer.d.ts +0 -106
  153. package/dist/render/types.d.ts +0 -201
  154. package/dist/routing/index.d.ts +0 -2
  155. package/dist/routing/resolve.d.ts +0 -17
  156. package/dist/routing/router.d.ts +0 -47
  157. package/dist/routing/types.d.ts +0 -42
  158. package/dist/sandbox/detect.d.ts +0 -22
  159. package/dist/sandbox/docker-runtime.d.ts +0 -32
  160. package/dist/sandbox/index.d.ts +0 -7
  161. package/dist/sandbox/policy.d.ts +0 -26
  162. package/dist/sandbox/service.d.ts +0 -64
  163. package/dist/sandbox/types.d.ts +0 -123
  164. package/dist/skills/index.d.ts +0 -4
  165. package/dist/skills/loader.d.ts +0 -43
  166. package/dist/skills/parser.d.ts +0 -31
  167. package/dist/skills/service.d.ts +0 -41
  168. package/dist/skills/types.d.ts +0 -94
  169. package/dist/subagent/index.d.ts +0 -5
  170. package/dist/subagent/orchestrator.d.ts +0 -169
  171. package/dist/subagent/registry-scope.d.ts +0 -41
  172. package/dist/subagent/semaphore.d.ts +0 -56
  173. package/dist/subagent/spawn-tool.d.ts +0 -86
  174. package/dist/subagent/types.d.ts +0 -65
  175. package/dist/testing/detect.d.ts +0 -3
  176. package/dist/testing/index.d.ts +0 -5
  177. package/dist/testing/parse.d.ts +0 -33
  178. package/dist/testing/run-tests-tool.d.ts +0 -64
  179. package/dist/testing/runner.d.ts +0 -26
  180. package/dist/testing/sandbox-runner.d.ts +0 -16
  181. package/dist/testing/types.d.ts +0 -66
  182. package/dist/theme/index.d.ts +0 -2
  183. package/dist/theme/resolve.d.ts +0 -43
  184. package/dist/theme/tokens.d.ts +0 -125
  185. package/dist/tools/create-pull-request.d.ts +0 -27
  186. package/dist/tools/file/apply-patch.d.ts +0 -94
  187. package/dist/tools/file/edit-file.d.ts +0 -12
  188. package/dist/tools/file/glob.d.ts +0 -17
  189. package/dist/tools/file/grep-files.d.ts +0 -43
  190. package/dist/tools/file/index.d.ts +0 -7
  191. package/dist/tools/file/match.d.ts +0 -43
  192. package/dist/tools/file/paths.d.ts +0 -160
  193. package/dist/tools/file/read-file.d.ts +0 -8
  194. package/dist/tools/file/write-file.d.ts +0 -10
  195. package/dist/tools/git-status.d.ts +0 -15
  196. package/dist/tools/index.d.ts +0 -9
  197. package/dist/tools/list-files.d.ts +0 -13
  198. package/dist/tools/list-skills.d.ts +0 -9
  199. package/dist/tools/load-skill.d.ts +0 -21
  200. package/dist/tools/registry.d.ts +0 -23
  201. package/dist/tools/search-codebase.d.ts +0 -35
  202. package/dist/tools/shell/exec.d.ts +0 -53
  203. package/dist/tools/shell/index.d.ts +0 -1
  204. package/dist/tools/shell/resolve-shell.d.ts +0 -81
  205. package/dist/tools/shell/run-command.d.ts +0 -14
  206. package/dist/tools/types.d.ts +0 -257
  207. package/dist/usage/collect.d.ts +0 -53
  208. package/dist/usage/cost.d.ts +0 -19
  209. package/dist/usage/index.d.ts +0 -15
  210. package/dist/usage/store.d.ts +0 -37
  211. package/dist/usage/summary.d.ts +0 -32
  212. package/dist/usage/types.d.ts +0 -283
  213. package/dist/utils/child-tree.d.ts +0 -33
  214. package/dist/utils/git.d.ts +0 -17
  215. package/dist/utils/logger.d.ts +0 -18
  216. package/dist/utils/process-tree.d.ts +0 -16
  217. package/dist/vcs/auth.d.ts +0 -22
  218. package/dist/vcs/generate.d.ts +0 -74
  219. package/dist/vcs/git.d.ts +0 -60
  220. package/dist/vcs/github.d.ts +0 -50
  221. package/dist/vcs/guidance.d.ts +0 -20
  222. package/dist/vcs/index.d.ts +0 -7
  223. package/dist/vcs/service.d.ts +0 -61
  224. package/dist/vcs/types.d.ts +0 -73
  225. package/dist/web/demarcate.d.ts +0 -13
  226. package/dist/web/fetch.d.ts +0 -11
  227. package/dist/web/index.d.ts +0 -7
  228. package/dist/web/provider.d.ts +0 -29
  229. package/dist/web/search.d.ts +0 -17
  230. package/dist/web/ssrf.d.ts +0 -41
  231. package/dist/web/tools.d.ts +0 -20
  232. package/dist/web/types.d.ts +0 -64
  233. package/dist/workspace/add-root.d.ts +0 -27
  234. package/dist/workspace/index.d.ts +0 -6
  235. package/dist/workspace/resolve.d.ts +0 -54
  236. package/dist/workspace/select.d.ts +0 -41
  237. package/dist/workspace/types.d.ts +0 -30
  238. package/dist/workspace/workspace.d.ts +0 -61
@@ -1,78 +0,0 @@
1
- import type { RenderCapabilities } from "../render/index.js";
2
- import { type Key } from "./keys.js";
3
- /**
4
- * The one raw-mode input reader (U.7). Every interactive component — and the
5
- * refactored approval/onboarding key readers — reads keys through this seam;
6
- * nothing else in the CLI touches `setRawMode`. The lifecycle is strict:
7
- * `begin()` → `read()` loop → `restore()` in a `finally`, so the terminal is
8
- * never left in raw mode on any exit path (selection, cancel, throw).
9
- */
10
- /** The minimal stdin surface the reader needs. Injectable for tests. */
11
- export interface RawInput {
12
- isTTY?: boolean;
13
- setRawMode?(mode: boolean): unknown;
14
- resume(): unknown;
15
- pause(): unknown;
16
- on(event: "data" | "end", listener: (chunk: Buffer) => void): unknown;
17
- removeListener(event: "data" | "end", listener: (chunk: Buffer) => void): unknown;
18
- }
19
- /** Raw-mode key source with an explicit begin/read/restore lifecycle. */
20
- export interface KeyReader {
21
- /** Enter raw mode and start decoding. Safe to call once per interaction. */
22
- begin(): void;
23
- /**
24
- * The next decoded key. After stream end (or `restore()`), resolves
25
- * `{kind:"eof"}` forever — a component's read loop can never hang or reject.
26
- */
27
- read(): Promise<Key>;
28
- /** Leave raw mode, detach, pause. Idempotent; call in `finally`, always. */
29
- restore(): void;
30
- }
31
- /** Build the real reader over `stdin` (or an injected fake in tests). */
32
- export declare function createKeyReader(stdin?: RawInput): KeyReader;
33
- /**
34
- * Read exactly one key with the full begin/restore lifecycle — the shared
35
- * backend for the approval prompt's single-key read and the onboarding
36
- * `readKey`. Resolves the printable character, `"\n"` for enter, and `""` for
37
- * anything that means "no answer" (Ctrl-C, EOF, escape, arrows) — preserving
38
- * the callers' default-deny mapping.
39
- */
40
- export declare function readSingleKey(stdin?: RawInput): Promise<string>;
41
- /**
42
- * Every component resolves to a selection or a clean, typed cancellation
43
- * (Ctrl-C / EOF / escape). Cancellation is data for the caller to interpret —
44
- * never a thrown error, never a partial value.
45
- */
46
- export type InteractiveResult<T> = {
47
- kind: "selected";
48
- value: T;
49
- } | {
50
- kind: "cancelled";
51
- };
52
- /**
53
- * What a component needs from the environment, bundled so tests can script
54
- * all of it. `caps` is the existing U.2 capability detection — components
55
- * never re-probe NO_COLOR / width / TTY themselves.
56
- */
57
- export interface ComponentIO {
58
- caps: RenderCapabilities;
59
- /**
60
- * The whole interactive contract in one flag: stdin is a TTY *and* the
61
- * output supports cursor control (`TERM=dumb` fails this). When false, no
62
- * frame is drawn and no key is read — ever.
63
- */
64
- interactive: boolean;
65
- /** Transient frame bytes. Defaults to stderr so stdout stays pipe-clean. */
66
- write(text: string): void;
67
- keys: KeyReader;
68
- }
69
- /** The real environment: frames to stderr, keys from stdin, caps from stderr. */
70
- export declare function defaultComponentIO(): ComponentIO;
71
- /**
72
- * The shared non-TTY gate, run before any frame byte or key read:
73
- * - interactive → proceed;
74
- * - not interactive + a default was supplied → resolve to it immediately;
75
- * - otherwise → throw `CRUXY_E_INTERACTIVE_REQUIRED` (usage, exit 2).
76
- * Never blocks on a pipe, never silently picks an option.
77
- */
78
- export declare function resolveNonInteractive<T>(io: ComponentIO, what: string, defaultValue: T | undefined, alternatives?: string[]): InteractiveResult<T> | null;
@@ -1,48 +0,0 @@
1
- /**
2
- * Byte → key decoding for the interactive components (U.7). Pure data
3
- * transformation — no terminal, no state — so every mapping row is directly
4
- * unit-testable. The stateful raw-mode plumbing lives in `input.ts`.
5
- */
6
- /** One decoded keypress. The full vocabulary the U.7 components consume. */
7
- export type Key =
8
- /** A printable character (UTF-8; may be multi-byte, never a control char). */
9
- {
10
- kind: "char";
11
- char: string;
12
- } | {
13
- kind: "enter";
14
- } | {
15
- kind: "backspace";
16
- } | {
17
- kind: "tab";
18
- } | {
19
- kind: "escape";
20
- } | {
21
- kind: "up";
22
- } | {
23
- kind: "down";
24
- } | {
25
- kind: "left";
26
- } | {
27
- kind: "right";
28
- }
29
- /** Ctrl-C in raw mode (no SIGINT is delivered) — components must cancel. */
30
- | {
31
- kind: "ctrl-c";
32
- }
33
- /** Ctrl-D or stream end — components must cancel. */
34
- | {
35
- kind: "eof";
36
- };
37
- /**
38
- * Decode one raw-mode chunk into keys. A paste or fast typing delivers many
39
- * keys per chunk; all are returned in order.
40
- *
41
- * Escape handling is deliberately simple: `ESC [ A..D` decodes to an arrow,
42
- * any other CSI sequence (`ESC [ …final`) is swallowed whole (unmapped keys
43
- * must not leak garbage chars into a query), and a lone ESC decodes to
44
- * `escape`. Terminals send arrow sequences atomically in practice; a sequence
45
- * split across chunks degrades to `escape` + literal chars, which is safe
46
- * (escape cancels).
47
- */
48
- export declare function decodeKeys(chunk: Buffer | string): Key[];
@@ -1,28 +0,0 @@
1
- import { type ComponentIO, type InteractiveResult } from "./input.js";
2
- /**
3
- * SelectList (U.7): arrow-key pick from a short list of options. Single-select
4
- * only — multi-select is a deliberate seam for a later build (the result type
5
- * and key loop extend without breaking callers).
6
- */
7
- export interface SelectOptions<T> {
8
- /** Label an item renders under. Defaults to `String(item)`. */
9
- toLabel?: (item: T) => string;
10
- /** Header row above the options. */
11
- title?: string;
12
- /** Index highlighted first (so Enter-once picks a sensible default). */
13
- initialIndex?: number;
14
- /** Non-TTY fallback: resolve to this instead of failing loud. */
15
- defaultValue?: T;
16
- /** `--flag` alternatives listed in the non-TTY error. */
17
- nonInteractiveHint?: string[];
18
- /** Visible rows before the list scrolls (default 10). */
19
- maxVisible?: number;
20
- }
21
- /**
22
- * Pick one item: ↑/↓ move (wrapping past either end), Enter selects the
23
- * highlighted item, Esc / Ctrl-C / EOF cancel. Renders a transient frame via
24
- * the shared U.7 frame (width-truncated rows, no soft-wrap) and erases it
25
- * completely before resolving. Empty `items` resolves cancelled — there is
26
- * nothing to select.
27
- */
28
- export declare function selectList<T>(items: readonly T[], opts?: SelectOptions<T>, io?: ComponentIO): Promise<InteractiveResult<T>>;
@@ -1,18 +0,0 @@
1
- /** `~/.cruxy/credentials.json` */
2
- export declare function credentialsPath(): string;
3
- /** The stored key for `provider`, or `undefined`. Never throws. */
4
- export declare function readCredential(provider: string, file?: string): string | undefined;
5
- /**
6
- * The stored MCP bearer token for credential name `ref`, or `undefined` (C.27c).
7
- * Reads ONLY this owner-only store — never the environment, never any config file
8
- * — so a project config that merely NAMES a credential can never widen where the
9
- * secret is sourced from. Never throws.
10
- */
11
- export declare function readMcpCredential(ref: string, file?: string): string | undefined;
12
- /** Persist MCP bearer token for credential name `ref`. Same owner-only guarantee. */
13
- export declare function writeMcpCredential(ref: string, token: string, file?: string): void;
14
- /**
15
- * Persist `key` for `provider`, merging into any existing store. Written
16
- * owner-only (see {@link writeInto}); refuses loudly if that can't be enforced.
17
- */
18
- export declare function writeCredential(provider: string, key: string, file?: string): void;
@@ -1,5 +0,0 @@
1
- export * from "./schema.js";
2
- export * from "./paths.js";
3
- export * from "./manager.js";
4
- export * from "./project.js";
5
- export * from "./credentials.js";
@@ -1,39 +0,0 @@
1
- import { type CruxyConfig } from "./schema.js";
2
- export interface LoadOptions {
3
- /** Explicit config file, bypassing project discovery. */
4
- configPath?: string;
5
- /** Start dir for project-config discovery (defaults to cwd). */
6
- cwd?: string;
7
- }
8
- export interface LoadedConfig {
9
- config: CruxyConfig;
10
- sources: {
11
- global: string | null;
12
- project: string | null;
13
- explicit: string | null;
14
- };
15
- }
16
- /**
17
- * Resolution order (later wins):
18
- * schema defaults -> global file -> project file (or explicit) -> env vars
19
- */
20
- export declare function loadConfig(opts?: LoadOptions): LoadedConfig;
21
- /** Resolve a dot-path (e.g. "model.temperature") against a config object. */
22
- export declare function getPath(obj: unknown, path: string): unknown;
23
- /**
24
- * Set a dot-path on the given config file (creating it if needed), validating
25
- * the full merged result before writing. Returns the written file path.
26
- */
27
- export declare function setValue(path: string, rawValue: string, file: string): string;
28
- /** Write a default config to `file` if it does not already exist. */
29
- export declare function initConfig(file: string): {
30
- path: string;
31
- created: boolean;
32
- };
33
- /**
34
- * Provider API key, resolved **env → credentials store → undefined**. The
35
- * environment always wins (CI / one-off overrides); the credentials store
36
- * (`~/.cruxy/credentials.json`, written by onboarding / `cruxy login`) is the
37
- * persistent fallback. The key is never read from `config.json`.
38
- */
39
- export declare function resolveApiKey(provider: string): string | undefined;
@@ -1,19 +0,0 @@
1
- /**
2
- * Make `path` owner-only, or throw. On Windows the ACL is verified after the
3
- * edit (both the `icacls` exit code AND a read-back), so a returned call is a
4
- * genuine guarantee, never a best-effort attempt.
5
- *
6
- * @throws if owner-only permissions cannot be established (non-zero `icacls`,
7
- * an unresolvable SID, a filesystem without ACLs/modes, …).
8
- */
9
- export declare function enforceOwnerOnly(path: string, opts?: {
10
- directory?: boolean;
11
- }): void;
12
- /**
13
- * Whether `path` is currently owner-only. POSIX: no group/other bits. Windows:
14
- * best-effort — the ACL names no broad principal (Everyone / Authenticated
15
- * Users / Users). Used both to verify {@link enforceOwnerOnly} and to warn on a
16
- * pre-existing store with loose permissions. Returns `true` when it genuinely
17
- * cannot tell (a missing tool), so a warning path never cries wolf.
18
- */
19
- export declare function isOwnerOnly(path: string): boolean;
@@ -1,9 +0,0 @@
1
- /** ~/.cruxy */
2
- export declare function globalDir(): string;
3
- /** ~/.cruxy/config.json */
4
- export declare function globalConfigPath(): string;
5
- /**
6
- * Walk up from `startDir` looking for a project config file. Returns the first
7
- * match, or null if none is found before the filesystem root.
8
- */
9
- export declare function findProjectConfig(startDir?: string): string | null;
@@ -1,10 +0,0 @@
1
- /**
2
- * Load project instructions from `cwd`: the first of CRUXY.md, then AGENTS.md
3
- * that exists is read and returned. A missing (or unreadable) file is not an
4
- * error — it simply yields `null`. Oversized files are truncated to `MAX_BYTES`
5
- * with a trailing notice so they can't blow up the system prompt.
6
- *
7
- * Only `cwd` is consulted (no parent-directory walk) — instructions are scoped
8
- * to the project you launched cruxy in.
9
- */
10
- export declare function loadProjectInstructions(cwd: string): string | null;