@fusengine/harness 0.1.29 → 0.1.31
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/cache/index.mjs +2 -2
- package/dist/{cache-BzbX-ztL.mjs → cache-C9z9LclL.mjs} +1 -31
- package/dist/cli/bin.mjs +14 -3
- package/dist/{skill-triggers-BZxov1es.mjs → describe-BYqhoV4c.mjs} +363 -2
- package/dist/freshness/index.mjs +1 -1
- package/dist/{freshness-CezohJHo.mjs → freshness-otdUpuvP.mjs} +1 -1
- package/dist/handle-DW9cWdVt.mjs +3356 -0
- package/dist/{index-BqdCjaT9.d.mts → index-mISsk0ff.d.mts} +143 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +6 -6
- package/dist/{json-io-xpTDuvtn.mjs → json-io-CAn72gI4.mjs} +1 -1
- package/dist/policy/index.d.mts +2 -2
- package/dist/policy/index.mjs +2 -2
- package/dist/runtime/index.d.mts +431 -1
- package/dist/runtime/index.mjs +2 -2
- package/dist/state/index.mjs +1 -1
- package/dist/{state-Cs0Y0MG_.mjs → state-ByhLeKyD.mjs} +1 -1
- package/dist/{store-BnHpq2ZB.mjs → store-D-ge2ZPI.mjs} +1 -1
- package/dist/{store-DeIsfMg5.mjs → store-PrNPm6So.mjs} +30 -1
- package/dist/tracking/index.mjs +1 -1
- package/package.json +10 -3
- package/dist/handle-nu3GYVek.mjs +0 -1090
|
@@ -293,4 +293,146 @@ declare function detectRequiredSkills(framework: string, content: string): strin
|
|
|
293
293
|
*/
|
|
294
294
|
declare function skillTriggerGate(framework: string, content: string, refsRead: string[], forcedSkill?: string | null, cwd?: string): Prompt | null;
|
|
295
295
|
//#endregion
|
|
296
|
-
|
|
296
|
+
//#region src/policy/claude-md-context.d.ts
|
|
297
|
+
/** Dev-verb regex (FR/EN) that triggers the APEX preamble (case-insensitive). */
|
|
298
|
+
declare const DEV_VERBS: RegExp;
|
|
299
|
+
/**
|
|
300
|
+
* Detect the project type from the cwd, reproducing the legacy Python logic:
|
|
301
|
+
* package.json containing "next" → nextjs, else "react" → react; else
|
|
302
|
+
* composer.json+artisan → laravel; else Package.swift / *.xcodeproj → swift;
|
|
303
|
+
* else generic.
|
|
304
|
+
* @param cwd - Project root to scan.
|
|
305
|
+
* @returns The detected project type label.
|
|
306
|
+
*/
|
|
307
|
+
declare function detectClaudeMdProjectType(cwd: string): string;
|
|
308
|
+
/**
|
|
309
|
+
* Build the APEX instruction preamble for a development task.
|
|
310
|
+
* @param projectType - Detected project type label.
|
|
311
|
+
* @param maxLines - SOLID per-file line ceiling.
|
|
312
|
+
* @returns The APEX instruction text.
|
|
313
|
+
*/
|
|
314
|
+
declare function buildApexInstruction(projectType: string, maxLines: number): string;
|
|
315
|
+
/**
|
|
316
|
+
* Build the UserPromptSubmit injection text: read `~/.claude/CLAUDE.md` and,
|
|
317
|
+
* when the prompt matches a dev verb, prepend the APEX instruction. Returns
|
|
318
|
+
* `null` when CLAUDE.md is absent/unreadable (the hook then emits nothing).
|
|
319
|
+
* @param prompt - The raw user prompt.
|
|
320
|
+
* @param cwd - Project root (for project-type detection).
|
|
321
|
+
* @returns The injection text, or `null` to emit nothing.
|
|
322
|
+
*/
|
|
323
|
+
declare function buildClaudeMdContext(prompt: string, cwd: string): string | null;
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region src/policy/apex-task-context.d.ts
|
|
326
|
+
/** Parsed task state injected into a Task sub-agent prompt. */
|
|
327
|
+
interface ApexTaskState {
|
|
328
|
+
/** Current task id (defaults to "1"). */
|
|
329
|
+
id: string;
|
|
330
|
+
/** Task subject (defaults to ""). */
|
|
331
|
+
subject: string;
|
|
332
|
+
/** Current phase (defaults to "analyze"). */
|
|
333
|
+
phase: string;
|
|
334
|
+
/** Comma-joined consulted doc keys, or "none". */
|
|
335
|
+
docs: string;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Read the current task state from `task.json`, reproducing the legacy Python
|
|
339
|
+
* logic. Any read/parse error falls back to `("1", "", "analyze", "none")`.
|
|
340
|
+
* @param taskFile - Absolute path to `.claude/apex/task.json`.
|
|
341
|
+
* @returns The parsed {@link ApexTaskState}.
|
|
342
|
+
*/
|
|
343
|
+
declare function loadApexTaskState(taskFile: string): ApexTaskState;
|
|
344
|
+
/**
|
|
345
|
+
* Build the APEX context string injected into a Task sub-agent prompt.
|
|
346
|
+
* @param state - The parsed task state.
|
|
347
|
+
* @param maxLines - SOLID per-file line ceiling.
|
|
348
|
+
* @returns The injection text.
|
|
349
|
+
*/
|
|
350
|
+
declare function buildApexTaskContext(state: ApexTaskState, maxLines: number): string;
|
|
351
|
+
/**
|
|
352
|
+
* Build the PreToolUse Task injection, gated on the existence of the project's
|
|
353
|
+
* `.claude/apex/` directory. Returns `null` when APEX is not active (no dir).
|
|
354
|
+
* @param projectRoot - `CLAUDE_PROJECT_DIR` or cwd.
|
|
355
|
+
* @returns The injection text, or `null` to emit nothing.
|
|
356
|
+
*/
|
|
357
|
+
declare function buildApexTaskInjection(projectRoot: string): string | null;
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/policy/cartographer/indicators.d.ts
|
|
360
|
+
/**
|
|
361
|
+
* Cartographer indicators — pure data sets used to detect a project root and to
|
|
362
|
+
* exclude noise directories when walking a tree. Ports the constant tables from
|
|
363
|
+
* `generate_project_map.py` / `write_recursive.py`.
|
|
364
|
+
*/
|
|
365
|
+
/** Filenames whose presence marks a directory as a project root. */
|
|
366
|
+
declare const PROJECT_INDICATORS: ReadonlySet<string>;
|
|
367
|
+
/** Directory names skipped entirely during the tree walk. */
|
|
368
|
+
declare const EXCLUDE_DIRS: ReadonlySet<string>;
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region src/policy/cartographer/frontmatter.d.ts
|
|
371
|
+
/**
|
|
372
|
+
* Extract a single frontmatter field's value from `text`. Strips surrounding
|
|
373
|
+
* quotes; skips YAML block-scalar markers. Returns "" when absent.
|
|
374
|
+
* @param text - The full document text.
|
|
375
|
+
* @param field - The frontmatter key to read.
|
|
376
|
+
* @returns The field value, or "".
|
|
377
|
+
*/
|
|
378
|
+
declare function parseField(text: string, field: string): string;
|
|
379
|
+
/**
|
|
380
|
+
* Derive a short description from the body following the frontmatter: the first
|
|
381
|
+
* non-empty trimmed line, sliced to `maxLen`. Returns "" when none.
|
|
382
|
+
* @param text - The full document text.
|
|
383
|
+
* @param maxLen - Maximum length of the returned description.
|
|
384
|
+
* @returns The body-derived description, or "".
|
|
385
|
+
*/
|
|
386
|
+
declare function parseBodyDesc(text: string, maxLen?: number): string;
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/policy/cartographer/entry.d.ts
|
|
389
|
+
/**
|
|
390
|
+
* Tree-entry parsing — pure line regexes. Ports the line parsers of
|
|
391
|
+
* `merge_index.py` and `track-enrichment.py`.
|
|
392
|
+
*/
|
|
393
|
+
/** A parsed `prefix[name](path) — desc` tree line. */
|
|
394
|
+
interface TreeEntry {
|
|
395
|
+
prefix: string;
|
|
396
|
+
name: string;
|
|
397
|
+
path: string;
|
|
398
|
+
desc: string;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Parse a `merge_index` tree line into its parts. Returns null on no match.
|
|
402
|
+
* @param line - The raw tree line.
|
|
403
|
+
* @returns The parsed entry, or null.
|
|
404
|
+
*/
|
|
405
|
+
declare function parseEntry(line: string): TreeEntry | null;
|
|
406
|
+
/**
|
|
407
|
+
* Parse an enrichment line into `[path, desc]`, requiring a non-empty desc.
|
|
408
|
+
* @param line - The raw index line.
|
|
409
|
+
* @returns The `[path, desc]` pair, or null.
|
|
410
|
+
*/
|
|
411
|
+
declare function parseEnrichment(line: string): [string, string] | null;
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/policy/cartographer/describe.d.ts
|
|
414
|
+
/**
|
|
415
|
+
* First `# ` Markdown heading text (sans hashes), sliced to 60. "" when none.
|
|
416
|
+
* @param text - The document text.
|
|
417
|
+
* @returns The heading text, or "".
|
|
418
|
+
*/
|
|
419
|
+
declare function firstHeading(text: string): string;
|
|
420
|
+
/**
|
|
421
|
+
* First leading comment among the first 10 lines (`//`, `#` but not `#!`, or a
|
|
422
|
+
* `"""`/`'''` docstring), sliced to 60. "" when none.
|
|
423
|
+
* @param text - The source text.
|
|
424
|
+
* @returns The comment text, or "".
|
|
425
|
+
*/
|
|
426
|
+
declare function firstComment(text: string): string;
|
|
427
|
+
/**
|
|
428
|
+
* Derive a description from a file's suffix + text. For `.md`, the supplied
|
|
429
|
+
* frontmatter `description` (truncated) wins over the first heading; for known
|
|
430
|
+
* source suffixes, the first comment; else "".
|
|
431
|
+
* @param suffix - The file extension (with dot).
|
|
432
|
+
* @param text - The file text.
|
|
433
|
+
* @param mdField - The pre-parsed frontmatter `description` (md only).
|
|
434
|
+
* @returns The derived description, or "".
|
|
435
|
+
*/
|
|
436
|
+
declare function descFromText(suffix: string, text: string, mdField: string): string;
|
|
437
|
+
//#endregion
|
|
438
|
+
export { ApexGate as $, registerGuard as A, ASK_WRITERS as B, MAX_EXA_RESULTS as C, requiredArchSkill as Ct, FAIL_CLOSED as D, detectCreationIntent as E, PHP_DECL_RE as F, protectedPathGuard as G, CODE_REDIRECT as H, PY_MODEL_RE as I, securityGuard as J, ASK_PATTERNS as K, SWIFT_PROTO_RE as L, installGuard as M, GO_DECL_RE as N, GUARDS as O, JAVA_DECL_RE as P, ApexContext as Q, TS_DECL_RE as R, frameworkSolidGate as S, isApexCommand as St, capVerbosity as T, bashWriteGuard as U, CODE_MUTATORS as V, PROTECTED_FRAGMENTS as W, GuardContext as X, Guard as Y, APEX_GATES as Z, buildClaudeMdContext as _, DEV_KEYWORDS as _t, parseEnrichment as a, PolicyContext as at, skillTriggerGate as b, detectModularArchitecture as bt, parseField as c, GIT_ASK as ct, ApexTaskState as d, SYSTEM_INSTALL as dt, brainstormGate as et, buildApexTaskContext as f, matchPatterns as ft, buildApexInstruction as g, detectFramework as gt, DEV_VERBS as h, evaluateFileSize as ht, TreeEntry as i, solidReadGate as it, runGuards as j, clearUserGuards as k, EXCLUDE_DIRS as l, GIT_BLOCKED as lt, loadApexTaskState as m, countLines as mt, firstComment as n, evaluateApex as nt, parseEntry as o, PolicyResult as ot, buildApexTaskInjection as p, FileSizeVerdict as pt, CRITICAL_PATTERNS as q, firstHeading as r, freshnessGate as rt, parseBodyDesc as s, evaluate as st, descFromText as t, docConsultedGate as tt, PROJECT_INDICATORS as u, PROJECT_INSTALL as ut, detectClaudeMdProjectType as v, ModularArchitecture as vt, MAX_TOKENS as w, SKILL_TRIGGERS as x, detectProjectType as xt, detectRequiredSkills as y, ProjectType as yt, interfaceSeparationGuard as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -5,10 +5,10 @@ import { a as detectHarness, i as HarnessVia, n as HarnessInfo, o as detectMode,
|
|
|
5
5
|
import { a as isDocConsulted, i as formatDocSatisfactionStatus, n as DocSatisfactionStatus, o as resolveSessions, r as formatDocDeny, t as AuthEntry } from "./doc-helpers-CG1nuf-c.mjs";
|
|
6
6
|
import { t as incrementTrivialEditCounter } from "./index-BOBXQ91y.mjs";
|
|
7
7
|
import { i as compactJson, n as projectRoot, r as projectRootOrNull, t as isCodeFile } from "./index-C1vLIMwN.mjs";
|
|
8
|
-
import { $ as
|
|
8
|
+
import { $ as ApexGate, A as registerGuard, B as ASK_WRITERS, C as MAX_EXA_RESULTS, Ct as requiredArchSkill, D as FAIL_CLOSED, E as detectCreationIntent, F as PHP_DECL_RE, G as protectedPathGuard, H as CODE_REDIRECT, I as PY_MODEL_RE, J as securityGuard, K as ASK_PATTERNS, L as SWIFT_PROTO_RE, M as installGuard, N as GO_DECL_RE, O as GUARDS, P as JAVA_DECL_RE, Q as ApexContext, R as TS_DECL_RE, S as frameworkSolidGate, St as isApexCommand, T as capVerbosity, U as bashWriteGuard, V as CODE_MUTATORS, W as PROTECTED_FRAGMENTS, X as GuardContext, Y as Guard, Z as APEX_GATES, _ as buildClaudeMdContext, _t as DEV_KEYWORDS, a as parseEnrichment, at as PolicyContext, b as skillTriggerGate, bt as detectModularArchitecture, c as parseField, ct as GIT_ASK, d as ApexTaskState, dt as SYSTEM_INSTALL, et as brainstormGate, f as buildApexTaskContext, ft as matchPatterns, g as buildApexInstruction, gt as detectFramework, h as DEV_VERBS, ht as evaluateFileSize, i as TreeEntry, it as solidReadGate, j as runGuards, k as clearUserGuards, l as EXCLUDE_DIRS, lt as GIT_BLOCKED, m as loadApexTaskState, mt as countLines, n as firstComment, nt as evaluateApex, o as parseEntry, ot as PolicyResult, p as buildApexTaskInjection, pt as FileSizeVerdict, q as CRITICAL_PATTERNS, r as firstHeading, rt as freshnessGate, s as parseBodyDesc, st as evaluate, t as descFromText, tt as docConsultedGate, u as PROJECT_INDICATORS, ut as PROJECT_INSTALL, v as detectClaudeMdProjectType, vt as ModularArchitecture, w as MAX_TOKENS, x as SKILL_TRIGGERS, xt as detectProjectType, y as detectRequiredSkills, yt as ProjectType, z as interfaceSeparationGuard } from "./index-mISsk0ff.mjs";
|
|
9
9
|
import { n as RouteResult, r as ScoredRef, t as RefMeta } from "./types-CY5qT2X1.mjs";
|
|
10
10
|
import { a as ReminderState, c as readState, d as throttleMs, i as registryFile, l as setStateField, n as addRoot, o as lessonsFileFor, r as readRoots, s as nowStamp, t as ensureMemoryGitignore, u as stateFileFor } from "./index-DLYhervv.mjs";
|
|
11
11
|
import { a as globToRe, i as scoreReferences, n as toRefMeta, o as parseFrontmatter, r as routeReferences, t as loadRefs } from "./index-DL8MxjuP.mjs";
|
|
12
12
|
import { a as taskStart, c as ensureStateDir, d as stateFilePath, f as acquireLock, i as taskCreate, l as loadState, n as ApexTaskFile, o as ApexState, r as taskComplete, s as apexStateDir, t as ApexTask, u as saveState } from "./index-CPoF_hLP.mjs";
|
|
13
13
|
import { _ as TIME_INTERVALS, a as formatCost, c as formatTokens, d as colors, f as progressiveColor, g as PROGRESS_CHARS, h as PROGRESS_BAR_DEFAULTS, i as formatBasename, l as ColorFn, m as GRADIENT_BLOCKS, n as generateGradientBar, o as formatPath, p as COLOR_THRESHOLDS, r as generateProgressBar, s as formatTimeLeft, t as ProgressBarOptions, u as Palette } from "./index-BWK8slRi.mjs";
|
|
14
|
-
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexState, ApexTask, ApexTaskFile, AuthEntry, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, ColorFn, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DocSatisfactionStatus, FAIL_CLOSED, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, Guard, GuardContext, HarnessId, HarnessInfo, HarnessMode, HarnessVia, IndexSummary, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PY_MODEL_RE, Palette, PolicyContext, PolicyResult, ProgressBarOptions, ProjectLayout, ProjectType, Prompt, PromptKind, RefMeta, ReminderState, RouteResult, SKILL_TRIGGERS, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, ScoredRef, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, acquireLock, addRoot, apexStateDir, bashWriteGuard, brainstormGate, cacheLookup, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countLines, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, ensureStateDir, evaluate, evaluateApex, evaluateFileSize, extractText, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, jaccardSimilar, lessonsFileFor, loadIndex, loadRefs, loadState, matchPatterns, mcpCacheKey, modeFor, nowStamp, parseEnvInt, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, saveState, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, stateFilePath, summarizeIndex, taskComplete, taskCreate, taskStart, throttleMs, toRefMeta, ttlLabel };
|
|
14
|
+
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexState, ApexTask, ApexTaskFile, ApexTaskState, AuthEntry, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, ColorFn, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, DocSatisfactionStatus, EXCLUDE_DIRS, FAIL_CLOSED, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, Guard, GuardContext, HarnessId, HarnessInfo, HarnessMode, HarnessVia, IndexSummary, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PY_MODEL_RE, Palette, PolicyContext, PolicyResult, ProgressBarOptions, ProjectLayout, ProjectType, Prompt, PromptKind, RefMeta, ReminderState, RouteResult, SKILL_TRIGGERS, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, ScoredRef, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, TreeEntry, acquireLock, addRoot, apexStateDir, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, ensureStateDir, evaluate, evaluateApex, evaluateFileSize, extractText, firstComment, firstHeading, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadIndex, loadRefs, loadState, matchPatterns, mcpCacheKey, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, saveState, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, stateFilePath, summarizeIndex, taskComplete, taskCreate, taskStart, throttleMs, toRefMeta, ttlLabel };
|
package/dist/index.mjs
CHANGED
|
@@ -4,16 +4,16 @@ import { n as STATE_ROOT, r as projectLayout, t as STATE_GITIGNORE } from "./lay
|
|
|
4
4
|
import { t as compactJson } from "./compact-json-DK2nX-MK.mjs";
|
|
5
5
|
import { n as projectRoot, r as projectRootOrNull, t as isCodeFile } from "./project-root-ff0_poWU.mjs";
|
|
6
6
|
import { n as detectMode, r as modeFor, t as detectHarness } from "./harness-C8Nxxyn_.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { A as solidReadGate, C as capVerbosity, D as docConsultedGate, E as brainstormGate, F as requiredArchSkill, M as detectModularArchitecture, N as detectProjectType, O as evaluateApex, P as isApexCommand, S as MAX_TOKENS, T as APEX_GATES, _ as detectRequiredSkills, a as parseEntry, b as frameworkSolidGate, c as EXCLUDE_DIRS, d as buildApexTaskInjection, f as loadApexTaskState, g as detectClaudeMdProjectType, h as buildClaudeMdContext, i as parseEnrichment, j as DEV_KEYWORDS, k as freshnessGate, l as PROJECT_INDICATORS, m as buildApexInstruction, n as firstComment, o as parseBodyDesc, p as DEV_VERBS, r as firstHeading, s as parseField, t as descFromText, u as buildApexTaskContext, v as skillTriggerGate, w as detectCreationIntent, x as MAX_EXA_RESULTS, y as SKILL_TRIGGERS } from "./describe-BYqhoV4c.mjs";
|
|
8
8
|
import { A as evaluateFileSize, C as securityGuard, D as SYSTEM_INSTALL, E as PROJECT_INSTALL, O as matchPatterns, S as CRITICAL_PATTERNS, T as GIT_BLOCKED, _ as CODE_REDIRECT, a as registerGuard, b as protectedPathGuard, c as GO_DECL_RE, d as PY_MODEL_RE, f as SWIFT_PROTO_RE, g as CODE_MUTATORS, h as ASK_WRITERS, i as clearUserGuards, j as detectFramework, k as countLines, l as JAVA_DECL_RE, m as interfaceSeparationGuard, n as FAIL_CLOSED, o as runGuards, p as TS_DECL_RE, r as GUARDS, s as installGuard, t as evaluate, u as PHP_DECL_RE, v as bashWriteGuard, w as GIT_ASK, x as ASK_PATTERNS, y as PROTECTED_FRAGMENTS } from "./evaluate-j3gRJ_ng.mjs";
|
|
9
9
|
import { i as resolveSessions, n as formatDocSatisfactionStatus, r as isDocConsulted, t as formatDocDeny } from "./doc-helpers-Dd_x1-tZ.mjs";
|
|
10
10
|
import { i as parseFrontmatter, n as scoreReferences, r as globToRe, t as routeReferences } from "./router-D8cVrI-s.mjs";
|
|
11
11
|
import { t as formatPrompt } from "./types-ernB1Dy3.mjs";
|
|
12
12
|
import { a as nowStamp, c as stateFileFor, i as lessonsFileFor, l as throttleMs, n as readRoots, o as readState, r as registryFile, s as setStateField, t as addRoot, u as ensureMemoryGitignore } from "./memory-BkoEbdec.mjs";
|
|
13
|
-
import {
|
|
14
|
-
import { a as extractText, i as mcpCacheKey, n as cachePath, r as cacheStore, t as cacheLookup } from "./store-
|
|
15
|
-
import { t as incrementTrivialEditCounter } from "./freshness-
|
|
13
|
+
import { n as jaccardSimilar, r as queryHash, t as compactMarkdown } from "./cache-C9z9LclL.mjs";
|
|
14
|
+
import { a as extractText, i as mcpCacheKey, n as cachePath, o as loadIndex, r as cacheStore, s as summarizeIndex, t as cacheLookup } from "./store-PrNPm6So.mjs";
|
|
15
|
+
import { t as incrementTrivialEditCounter } from "./freshness-otdUpuvP.mjs";
|
|
16
16
|
import { n as toRefMeta, t as loadRefs } from "./loader-CyAoJv2W.mjs";
|
|
17
|
-
import { a as ensureStateDir, c as stateFilePath, i as apexStateDir, l as acquireLock, n as taskCreate, o as loadState, r as taskStart, s as saveState, t as taskComplete } from "./state-
|
|
17
|
+
import { a as ensureStateDir, c as stateFilePath, i as apexStateDir, l as acquireLock, n as taskCreate, o as loadState, r as taskStart, s as saveState, t as taskComplete } from "./state-ByhLeKyD.mjs";
|
|
18
18
|
import { a as formatPath, c as colors, d as GRADIENT_BLOCKS, f as PROGRESS_BAR_DEFAULTS, i as formatCost, l as progressiveColor, m as TIME_INTERVALS, n as generateProgressBar, o as formatTimeLeft, p as PROGRESS_CHARS, r as formatBasename, s as formatTokens, t as generateGradientBar, u as COLOR_THRESHOLDS } from "./statusline-D87eUNXl.mjs";
|
|
19
|
-
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, FAIL_CLOSED, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, PHP_DECL_RE, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PY_MODEL_RE, SKILL_TRIGGERS, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, acquireLock, addRoot, apexStateDir, bashWriteGuard, brainstormGate, cacheLookup, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countLines, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, ensureStateDir, evaluate, evaluateApex, evaluateFileSize, extractText, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, jaccardSimilar, lessonsFileFor, loadIndex, loadRefs, loadState, matchPatterns, mcpCacheKey, modeFor, nowStamp, parseEnvInt, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, saveState, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, stateFilePath, summarizeIndex, taskComplete, taskCreate, taskStart, throttleMs, toRefMeta, ttlLabel };
|
|
19
|
+
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, COLOR_THRESHOLDS, CRITICAL_PATTERNS, DEFAULT_MAX_LINES, DEFAULT_TTL_SEC, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GRADIENT_BLOCKS, GUARDS, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_LINES_ENV_KEY, MAX_TOKENS, PHP_DECL_RE, PROGRESS_BAR_DEFAULTS, PROGRESS_CHARS, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PY_MODEL_RE, SKILL_TRIGGERS, STATE_GITIGNORE, STATE_ROOT, SWIFT_PROTO_RE, SYSTEM_INSTALL, TIME_INTERVALS, TS_DECL_RE, TTL_ENV_KEY, acquireLock, addRoot, apexStateDir, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, cacheLookup, cachePath, cacheStore, capVerbosity, clearUserGuards, colors, compactJson, compactMarkdown, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectHarness, detectMode, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, ensureMemoryGitignore, ensureStateDir, evaluate, evaluateApex, evaluateFileSize, extractText, firstComment, firstHeading, formatBasename, formatCost, formatDocDeny, formatDocSatisfactionStatus, formatPath, formatPrompt, formatTimeLeft, formatTokens, frameworkSolidGate, freshnessGate, generateGradientBar, generateProgressBar, globToRe, incrementTrivialEditCounter, installGuard, interfaceSeparationGuard, isApexCommand, isCodeFile, isDocConsulted, jaccardSimilar, lessonsFileFor, loadApexTaskState, loadIndex, loadRefs, loadState, matchPatterns, mcpCacheKey, modeFor, nowStamp, parseBodyDesc, parseEnrichment, parseEntry, parseEnvInt, parseField, parseFrontmatter, progressiveColor, projectLayout, projectRoot, projectRootOrNull, protectedPathGuard, queryHash, readRoots, readState, registerGuard, registryFile, requiredArchSkill, resolveMaxLines, resolveSessions, resolveTtlSec, routeReferences, runGuards, saveState, scoreReferences, securityGuard, setStateField, skillTriggerGate, solidReadGate, splitTarget, stateFileFor, stateFilePath, summarizeIndex, taskComplete, taskCreate, taskStart, throttleMs, toRefMeta, ttlLabel };
|
|
@@ -37,4 +37,4 @@ async function writeJsonFile(path, data, compact = false) {
|
|
|
37
37
|
atomicWrite(path, compact ? compactJson(data) : JSON.stringify(data, null, 2));
|
|
38
38
|
}
|
|
39
39
|
//#endregion
|
|
40
|
-
export {
|
|
40
|
+
export { writeJsonFile as i, ensureDir as n, readJsonFile as r, atomicWrite as t };
|
package/dist/policy/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, FAIL_CLOSED, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, Guard, GuardContext, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PY_MODEL_RE, PolicyContext, PolicyResult, ProjectType, SKILL_TRIGGERS, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, bashWriteGuard, brainstormGate, capVerbosity, clearUserGuards, countLines, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, matchPatterns, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate };
|
|
1
|
+
import { $ as ApexGate, A as registerGuard, B as ASK_WRITERS, C as MAX_EXA_RESULTS, Ct as requiredArchSkill, D as FAIL_CLOSED, E as detectCreationIntent, F as PHP_DECL_RE, G as protectedPathGuard, H as CODE_REDIRECT, I as PY_MODEL_RE, J as securityGuard, K as ASK_PATTERNS, L as SWIFT_PROTO_RE, M as installGuard, N as GO_DECL_RE, O as GUARDS, P as JAVA_DECL_RE, Q as ApexContext, R as TS_DECL_RE, S as frameworkSolidGate, St as isApexCommand, T as capVerbosity, U as bashWriteGuard, V as CODE_MUTATORS, W as PROTECTED_FRAGMENTS, X as GuardContext, Y as Guard, Z as APEX_GATES, _ as buildClaudeMdContext, _t as DEV_KEYWORDS, a as parseEnrichment, at as PolicyContext, b as skillTriggerGate, bt as detectModularArchitecture, c as parseField, ct as GIT_ASK, d as ApexTaskState, dt as SYSTEM_INSTALL, et as brainstormGate, f as buildApexTaskContext, ft as matchPatterns, g as buildApexInstruction, gt as detectFramework, h as DEV_VERBS, ht as evaluateFileSize, i as TreeEntry, it as solidReadGate, j as runGuards, k as clearUserGuards, l as EXCLUDE_DIRS, lt as GIT_BLOCKED, m as loadApexTaskState, mt as countLines, n as firstComment, nt as evaluateApex, o as parseEntry, ot as PolicyResult, p as buildApexTaskInjection, pt as FileSizeVerdict, q as CRITICAL_PATTERNS, r as firstHeading, rt as freshnessGate, s as parseBodyDesc, st as evaluate, t as descFromText, tt as docConsultedGate, u as PROJECT_INDICATORS, ut as PROJECT_INSTALL, v as detectClaudeMdProjectType, vt as ModularArchitecture, w as MAX_TOKENS, x as SKILL_TRIGGERS, xt as detectProjectType, y as detectRequiredSkills, yt as ProjectType, z as interfaceSeparationGuard } from "../index-mISsk0ff.mjs";
|
|
2
|
+
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, ApexContext, ApexGate, ApexTaskState, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, FileSizeVerdict, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, Guard, GuardContext, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_TOKENS, ModularArchitecture, PHP_DECL_RE, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PY_MODEL_RE, PolicyContext, PolicyResult, ProjectType, SKILL_TRIGGERS, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, TreeEntry, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, loadApexTaskState, matchPatterns, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate };
|
package/dist/policy/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as solidReadGate, C as capVerbosity, D as docConsultedGate, E as brainstormGate, F as requiredArchSkill, M as detectModularArchitecture, N as detectProjectType, O as evaluateApex, P as isApexCommand, S as MAX_TOKENS, T as APEX_GATES, _ as detectRequiredSkills, a as parseEntry, b as frameworkSolidGate, c as EXCLUDE_DIRS, d as buildApexTaskInjection, f as loadApexTaskState, g as detectClaudeMdProjectType, h as buildClaudeMdContext, i as parseEnrichment, j as DEV_KEYWORDS, k as freshnessGate, l as PROJECT_INDICATORS, m as buildApexInstruction, n as firstComment, o as parseBodyDesc, p as DEV_VERBS, r as firstHeading, s as parseField, t as descFromText, u as buildApexTaskContext, v as skillTriggerGate, w as detectCreationIntent, x as MAX_EXA_RESULTS, y as SKILL_TRIGGERS } from "../describe-BYqhoV4c.mjs";
|
|
2
2
|
import { A as evaluateFileSize, C as securityGuard, D as SYSTEM_INSTALL, E as PROJECT_INSTALL, O as matchPatterns, S as CRITICAL_PATTERNS, T as GIT_BLOCKED, _ as CODE_REDIRECT, a as registerGuard, b as protectedPathGuard, c as GO_DECL_RE, d as PY_MODEL_RE, f as SWIFT_PROTO_RE, g as CODE_MUTATORS, h as ASK_WRITERS, i as clearUserGuards, j as detectFramework, k as countLines, l as JAVA_DECL_RE, m as interfaceSeparationGuard, n as FAIL_CLOSED, o as runGuards, p as TS_DECL_RE, r as GUARDS, s as installGuard, t as evaluate, u as PHP_DECL_RE, v as bashWriteGuard, w as GIT_ASK, x as ASK_PATTERNS, y as PROTECTED_FRAGMENTS } from "../evaluate-j3gRJ_ng.mjs";
|
|
3
3
|
import "../policy-la_KkjCS.mjs";
|
|
4
|
-
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, FAIL_CLOSED, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_TOKENS, PHP_DECL_RE, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PY_MODEL_RE, SKILL_TRIGGERS, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, bashWriteGuard, brainstormGate, capVerbosity, clearUserGuards, countLines, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, matchPatterns, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate };
|
|
4
|
+
export { APEX_GATES, ASK_PATTERNS, ASK_WRITERS, CODE_MUTATORS, CODE_REDIRECT, CRITICAL_PATTERNS, DEV_KEYWORDS, DEV_VERBS, EXCLUDE_DIRS, FAIL_CLOSED, GIT_ASK, GIT_BLOCKED, GO_DECL_RE, GUARDS, JAVA_DECL_RE, MAX_EXA_RESULTS, MAX_TOKENS, PHP_DECL_RE, PROJECT_INDICATORS, PROJECT_INSTALL, PROTECTED_FRAGMENTS, PY_MODEL_RE, SKILL_TRIGGERS, SWIFT_PROTO_RE, SYSTEM_INSTALL, TS_DECL_RE, bashWriteGuard, brainstormGate, buildApexInstruction, buildApexTaskContext, buildApexTaskInjection, buildClaudeMdContext, capVerbosity, clearUserGuards, countLines, descFromText, detectClaudeMdProjectType, detectCreationIntent, detectFramework, detectModularArchitecture, detectProjectType, detectRequiredSkills, docConsultedGate, evaluate, evaluateApex, evaluateFileSize, firstComment, firstHeading, frameworkSolidGate, freshnessGate, installGuard, interfaceSeparationGuard, isApexCommand, loadApexTaskState, matchPatterns, parseBodyDesc, parseEnrichment, parseEntry, parseField, protectedPathGuard, registerGuard, requiredArchSkill, runGuards, securityGuard, skillTriggerGate, solidReadGate };
|