@mrciphersmith/keryx 0.2.102 → 0.2.105
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.js +40 -21
- package/dist/core.js +25 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10266,6 +10266,28 @@ var init_templates3 = __esm(() => {
|
|
|
10266
10266
|
init_default_tasks();
|
|
10267
10267
|
});
|
|
10268
10268
|
|
|
10269
|
+
// src/lib/git-env.ts
|
|
10270
|
+
function withoutGitDiscoveryOverrides(env) {
|
|
10271
|
+
const clean = {};
|
|
10272
|
+
for (const [key, value] of Object.entries(env)) {
|
|
10273
|
+
if (value !== undefined && !GIT_DISCOVERY_OVERRIDE_VARS.includes(key)) {
|
|
10274
|
+
clean[key] = value;
|
|
10275
|
+
}
|
|
10276
|
+
}
|
|
10277
|
+
return clean;
|
|
10278
|
+
}
|
|
10279
|
+
var GIT_DISCOVERY_OVERRIDE_VARS;
|
|
10280
|
+
var init_git_env = __esm(() => {
|
|
10281
|
+
GIT_DISCOVERY_OVERRIDE_VARS = [
|
|
10282
|
+
"GIT_DIR",
|
|
10283
|
+
"GIT_WORK_TREE",
|
|
10284
|
+
"GIT_INDEX_FILE",
|
|
10285
|
+
"GIT_OBJECT_DIRECTORY",
|
|
10286
|
+
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
10287
|
+
"GIT_COMMON_DIR"
|
|
10288
|
+
];
|
|
10289
|
+
});
|
|
10290
|
+
|
|
10269
10291
|
// src/metrics/provenance.ts
|
|
10270
10292
|
async function collectGitProvenance(cwd) {
|
|
10271
10293
|
const [commit, branch, worktree] = await Promise.all([
|
|
@@ -11676,7 +11698,12 @@ function pathExistsSync(filePath) {
|
|
|
11676
11698
|
return existsSync11(filePath);
|
|
11677
11699
|
}
|
|
11678
11700
|
async function runCommand(command, cwd) {
|
|
11679
|
-
const proc = Bun.spawn(command, {
|
|
11701
|
+
const proc = Bun.spawn(command, {
|
|
11702
|
+
cwd,
|
|
11703
|
+
env: withoutGitDiscoveryOverrides(process.env),
|
|
11704
|
+
stdout: "pipe",
|
|
11705
|
+
stderr: "pipe"
|
|
11706
|
+
});
|
|
11680
11707
|
const [stdout, stderr, exitCode] = await Promise.all([
|
|
11681
11708
|
new Response(proc.stdout).text(),
|
|
11682
11709
|
new Response(proc.stderr).text(),
|
|
@@ -11839,6 +11866,7 @@ function normalizePath3(file) {
|
|
|
11839
11866
|
var IGNORED_DIRS, TEST_FILE_RE2, SOURCE_FILE_RE, CONFIG_FILE_RE, CI_FILE_RE, INSTRUCTION_FILE_RE, IMPORT_RE, DEFAULT_TESTING_CONFIG, BASE_STRATEGIES, BUN_LOCKFILES;
|
|
11840
11867
|
var init_service2 = __esm(() => {
|
|
11841
11868
|
init_fs();
|
|
11869
|
+
init_git_env();
|
|
11842
11870
|
init_lifecycle();
|
|
11843
11871
|
init_guard2();
|
|
11844
11872
|
init_capability();
|
|
@@ -27379,9 +27407,6 @@ var init_slate_terminal_state = __esm(() => {
|
|
|
27379
27407
|
});
|
|
27380
27408
|
|
|
27381
27409
|
// src/commands/agent.ts
|
|
27382
|
-
function isDurableToolCall(name, risk) {
|
|
27383
|
-
return risk !== "read" || DURABLE_READ_TOOL_NAMES.has(name);
|
|
27384
|
-
}
|
|
27385
27410
|
function resolveAgentMaxRounds(env = process.env) {
|
|
27386
27411
|
const raw = env[ENV_AGENT_MAX_ROUNDS];
|
|
27387
27412
|
if (raw === undefined || raw.trim().length === 0) {
|
|
@@ -27997,7 +28022,8 @@ async function runAgentTurnCore(io, deps, history, userLine, options = {}) {
|
|
|
27997
28022
|
return {};
|
|
27998
28023
|
}
|
|
27999
28024
|
const risk = toolByName.get(call.name)?.definition.risk;
|
|
28000
|
-
|
|
28025
|
+
const isPureReadTool = risk === "read" && !DURABLE_READ_TOOL_NAMES.has(call.name);
|
|
28026
|
+
if (!isPureReadTool && (untrustedContentSeen || batchContainsUntrustedWeb)) {
|
|
28001
28027
|
const result = {
|
|
28002
28028
|
output: "tool blocked: external web content cannot authorize further tool calls in this turn",
|
|
28003
28029
|
isError: true
|
|
@@ -45321,6 +45347,7 @@ init_templates3();
|
|
|
45321
45347
|
init_service2();
|
|
45322
45348
|
|
|
45323
45349
|
// src/testing/templates.ts
|
|
45350
|
+
init_git_env();
|
|
45324
45351
|
function renderTestingConfig(input) {
|
|
45325
45352
|
return `${JSON.stringify({
|
|
45326
45353
|
schemaVersion: 1,
|
|
@@ -45513,6 +45540,11 @@ function renderTestingPrePushHook() {
|
|
|
45513
45540
|
return 0
|
|
45514
45541
|
fi
|
|
45515
45542
|
|
|
45543
|
+
# Git exports GIT_DIR to hooks. Inherited by the suite, it redirects every
|
|
45544
|
+
# fixture repo a test creates onto this checkout, so a fixture's
|
|
45545
|
+
# 'git config user.name' rewrites the identity of the repo being pushed.
|
|
45546
|
+
unset ${GIT_DISCOVERY_OVERRIDE_VARS.join(" ")}
|
|
45547
|
+
|
|
45516
45548
|
if command -v keryx >/dev/null 2>&1; then
|
|
45517
45549
|
keryx test run --changed --strict
|
|
45518
45550
|
return $?
|
|
@@ -48260,7 +48292,7 @@ import path47 from "path";
|
|
|
48260
48292
|
// package.json
|
|
48261
48293
|
var package_default = {
|
|
48262
48294
|
name: "@mrciphersmith/keryx",
|
|
48263
|
-
version: "0.2.
|
|
48295
|
+
version: "0.2.105",
|
|
48264
48296
|
description: "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
|
|
48265
48297
|
private: false,
|
|
48266
48298
|
publishConfig: {
|
|
@@ -79557,23 +79589,10 @@ function builtinReadOnlyTools(root) {
|
|
|
79557
79589
|
|
|
79558
79590
|
// src/harness/tool/builtin/apply-patch-tool.ts
|
|
79559
79591
|
init_patch_risk();
|
|
79592
|
+
init_git_env();
|
|
79560
79593
|
var MAX_OUTPUT_BYTES = 20000;
|
|
79561
|
-
var GIT_DISCOVERY_OVERRIDE_VARS = [
|
|
79562
|
-
"GIT_DIR",
|
|
79563
|
-
"GIT_WORK_TREE",
|
|
79564
|
-
"GIT_INDEX_FILE",
|
|
79565
|
-
"GIT_OBJECT_DIRECTORY",
|
|
79566
|
-
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
79567
|
-
"GIT_COMMON_DIR"
|
|
79568
|
-
];
|
|
79569
79594
|
function gitDiscoveryCleanEnv() {
|
|
79570
|
-
|
|
79571
|
-
for (const [key, value] of Object.entries(process.env)) {
|
|
79572
|
-
if (value !== undefined && !GIT_DISCOVERY_OVERRIDE_VARS.includes(key)) {
|
|
79573
|
-
env[key] = value;
|
|
79574
|
-
}
|
|
79575
|
-
}
|
|
79576
|
-
return env;
|
|
79595
|
+
return withoutGitDiscoveryOverrides(process.env);
|
|
79577
79596
|
}
|
|
79578
79597
|
async function spawnGitApply(args, patch, cwd) {
|
|
79579
79598
|
try {
|
package/dist/core.js
CHANGED
|
@@ -16331,6 +16331,25 @@ import { existsSync as existsSync7 } from "fs";
|
|
|
16331
16331
|
import { mkdir as mkdir21, readFile as readFile29, readdir as readdir10, writeFile as writeFile17 } from "fs/promises";
|
|
16332
16332
|
import path58 from "path";
|
|
16333
16333
|
|
|
16334
|
+
// src/lib/git-env.ts
|
|
16335
|
+
var GIT_DISCOVERY_OVERRIDE_VARS = [
|
|
16336
|
+
"GIT_DIR",
|
|
16337
|
+
"GIT_WORK_TREE",
|
|
16338
|
+
"GIT_INDEX_FILE",
|
|
16339
|
+
"GIT_OBJECT_DIRECTORY",
|
|
16340
|
+
"GIT_ALTERNATE_OBJECT_DIRECTORIES",
|
|
16341
|
+
"GIT_COMMON_DIR"
|
|
16342
|
+
];
|
|
16343
|
+
function withoutGitDiscoveryOverrides(env) {
|
|
16344
|
+
const clean = {};
|
|
16345
|
+
for (const [key, value] of Object.entries(env)) {
|
|
16346
|
+
if (value !== undefined && !GIT_DISCOVERY_OVERRIDE_VARS.includes(key)) {
|
|
16347
|
+
clean[key] = value;
|
|
16348
|
+
}
|
|
16349
|
+
}
|
|
16350
|
+
return clean;
|
|
16351
|
+
}
|
|
16352
|
+
|
|
16334
16353
|
// src/metrics/lifecycle.ts
|
|
16335
16354
|
init_fs();
|
|
16336
16355
|
init_guard();
|
|
@@ -17244,7 +17263,12 @@ function pathExistsSync(filePath) {
|
|
|
17244
17263
|
return existsSync7(filePath);
|
|
17245
17264
|
}
|
|
17246
17265
|
async function runCommand2(command, cwd) {
|
|
17247
|
-
const proc = Bun.spawn(command, {
|
|
17266
|
+
const proc = Bun.spawn(command, {
|
|
17267
|
+
cwd,
|
|
17268
|
+
env: withoutGitDiscoveryOverrides(process.env),
|
|
17269
|
+
stdout: "pipe",
|
|
17270
|
+
stderr: "pipe"
|
|
17271
|
+
});
|
|
17248
17272
|
const [stdout, stderr, exitCode] = await Promise.all([
|
|
17249
17273
|
new Response(proc.stdout).text(),
|
|
17250
17274
|
new Response(proc.stderr).text(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrciphersmith/keryx",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.105",
|
|
4
4
|
"description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|