paqad-ai 1.75.0 → 1.75.2
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/CHANGELOG.md +32 -0
- package/dist/cli/index.js +60 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +66 -5
- package/dist/index.js.map +1 -1
- package/dist/kernel/gate.js +58 -1
- package/dist/kernel/gate.js.map +1 -1
- package/dist/rule-scripts/index.js +38 -1
- package/dist/rule-scripts/index.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# paqad-ai
|
|
2
2
|
|
|
3
|
+
## 1.75.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 36bcf08: fix(#450): `loadChangeEvidence` now reconciles the session change-artifact
|
|
8
|
+
(`.paqad/session/changed-files.json`) against git before trusting it. A stale
|
|
9
|
+
artifact left over from an already-delivered change (its files committed and
|
|
10
|
+
clean in the working tree) is no longer attributed to a later, unrelated
|
|
11
|
+
session — which previously forced the full feature-development stage gate and a
|
|
12
|
+
`paqad-ai checks run` onto out-of-scope turns (e.g. a docs-only session). An
|
|
13
|
+
artifact entry is now kept only when git still considers it part of the current
|
|
14
|
+
change: dirty in the working tree, or committed on this branch since the
|
|
15
|
+
merge-base with the base branch. When every entry is stale, evidence falls
|
|
16
|
+
through to `git status`; when git cannot be read or has no base branch,
|
|
17
|
+
behavior is unchanged (the artifact is trusted). The fix is at the shared
|
|
18
|
+
`loadChangeEvidence` chokepoint, so every consumer (completion backstop, checks,
|
|
19
|
+
RAG, duplication, rule-scripts) is corrected at once.
|
|
20
|
+
|
|
21
|
+
## 1.75.1
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- c0edc5a: fix(#449): the completion (Stop) hook no longer forces the feature-development stage set on
|
|
26
|
+
host-agent-config-only changes. Paqad's own host-integration directories (`.claude/`, `.codex/`,
|
|
27
|
+
`.gemini/`, `.junie/`, `.cursor/`, `.windsurf/`, `.continue/`, `.aider/`, `.aiassistant/`) and the
|
|
28
|
+
`.windsurfrules` entry file are now classified as non-feature-development in the scope predicate, so
|
|
29
|
+
a session that only touches host wiring (e.g. regenerated hooks or an `mcp.json` edit) ends cleanly
|
|
30
|
+
instead of hard-blocking with a false "missing stage-evidence" failure. `.github/` stays in scope
|
|
31
|
+
(CI workflows are real code). Also fixes the #409 narration advisory so it only names stages the
|
|
32
|
+
agent itself authored (`live-mark`/`redo`), never a hook/backstop-inferred stage the agent never
|
|
33
|
+
claimed.
|
|
34
|
+
|
|
3
35
|
## 1.75.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
package/dist/cli/index.js
CHANGED
|
@@ -26051,6 +26051,7 @@ ${lines.join("\n")}
|
|
|
26051
26051
|
// src/pipeline/change-evidence.ts
|
|
26052
26052
|
init_esm_shims();
|
|
26053
26053
|
init_paths();
|
|
26054
|
+
init_git_state();
|
|
26054
26055
|
import { existsSync as existsSync45 } from "fs";
|
|
26055
26056
|
import { readFile as readFile39 } from "fs/promises";
|
|
26056
26057
|
import { join as join99 } from "path";
|
|
@@ -26058,7 +26059,10 @@ import { execa as execa3 } from "execa";
|
|
|
26058
26059
|
async function loadChangeEvidence(projectRoot) {
|
|
26059
26060
|
const tracked = await readTrackedFiles(projectRoot);
|
|
26060
26061
|
if (tracked.length > 0) {
|
|
26061
|
-
|
|
26062
|
+
const reconciled = await reconcileTrackedWithGit(projectRoot, tracked);
|
|
26063
|
+
if (reconciled.length > 0) {
|
|
26064
|
+
return { files: reconciled, source: "session-artifact" };
|
|
26065
|
+
}
|
|
26062
26066
|
}
|
|
26063
26067
|
const gitFiles = await readGitStatusFiles(projectRoot);
|
|
26064
26068
|
if (gitFiles.length > 0) {
|
|
@@ -26066,6 +26070,40 @@ async function loadChangeEvidence(projectRoot) {
|
|
|
26066
26070
|
}
|
|
26067
26071
|
return { files: [], source: "none" };
|
|
26068
26072
|
}
|
|
26073
|
+
async function reconcileTrackedWithGit(projectRoot, tracked) {
|
|
26074
|
+
const changed = await gitChangedSet(projectRoot);
|
|
26075
|
+
if (changed === null) {
|
|
26076
|
+
return tracked;
|
|
26077
|
+
}
|
|
26078
|
+
return tracked.filter((filePath) => changed.has(filePath));
|
|
26079
|
+
}
|
|
26080
|
+
async function gitChangedSet(projectRoot) {
|
|
26081
|
+
const gitState = readGitState(projectRoot);
|
|
26082
|
+
if (!gitState.head_commit || !gitState.base_commit) {
|
|
26083
|
+
return null;
|
|
26084
|
+
}
|
|
26085
|
+
const [statusFiles, committedFiles] = await Promise.all([
|
|
26086
|
+
readGitStatusFiles(projectRoot),
|
|
26087
|
+
readCommittedSinceBase(projectRoot, gitState.base_commit)
|
|
26088
|
+
]);
|
|
26089
|
+
return /* @__PURE__ */ new Set([...statusFiles, ...committedFiles]);
|
|
26090
|
+
}
|
|
26091
|
+
async function readCommittedSinceBase(projectRoot, baseCommit) {
|
|
26092
|
+
try {
|
|
26093
|
+
const result = await execa3("git", ["diff", "--name-only", `${baseCommit}..HEAD`], {
|
|
26094
|
+
cwd: projectRoot,
|
|
26095
|
+
reject: false
|
|
26096
|
+
});
|
|
26097
|
+
if (result.exitCode !== 0) {
|
|
26098
|
+
return [];
|
|
26099
|
+
}
|
|
26100
|
+
return normalizePaths(
|
|
26101
|
+
result.stdout.split("\n").map((line) => line.trim()).filter(Boolean)
|
|
26102
|
+
);
|
|
26103
|
+
} catch {
|
|
26104
|
+
return [];
|
|
26105
|
+
}
|
|
26106
|
+
}
|
|
26069
26107
|
async function readTrackedFiles(projectRoot) {
|
|
26070
26108
|
const target = join99(projectRoot, PATHS.CHANGED_FILES);
|
|
26071
26109
|
if (!existsSync45(target)) {
|
|
@@ -34147,9 +34185,29 @@ function isDocumentationPath(targetPath, projectRoot) {
|
|
|
34147
34185
|
if (/^(readme|changelog|contributing|license|licence|notice|authors)(\.|$)/i.test(p)) return true;
|
|
34148
34186
|
return false;
|
|
34149
34187
|
}
|
|
34188
|
+
var HOST_AGENT_CONFIG_DIRS = [
|
|
34189
|
+
".claude",
|
|
34190
|
+
".codex",
|
|
34191
|
+
".gemini",
|
|
34192
|
+
".junie",
|
|
34193
|
+
".cursor",
|
|
34194
|
+
".windsurf",
|
|
34195
|
+
".continue",
|
|
34196
|
+
".aider",
|
|
34197
|
+
".aiassistant"
|
|
34198
|
+
];
|
|
34199
|
+
var HOST_AGENT_CONFIG_FILES = [".windsurfrules"];
|
|
34200
|
+
function isHostAgentConfigPath(targetPath, projectRoot) {
|
|
34201
|
+
const p = toRelativePosix(targetPath, projectRoot);
|
|
34202
|
+
if (HOST_AGENT_CONFIG_FILES.includes(p)) {
|
|
34203
|
+
return true;
|
|
34204
|
+
}
|
|
34205
|
+
return HOST_AGENT_CONFIG_DIRS.some((dir) => p === dir || p.startsWith(`${dir}/`));
|
|
34206
|
+
}
|
|
34150
34207
|
function isFeatureDevEdit(targetPath, projectRoot) {
|
|
34151
34208
|
if (!targetPath) return true;
|
|
34152
34209
|
if (isFrameworkInternalPath(targetPath, projectRoot)) return false;
|
|
34210
|
+
if (isHostAgentConfigPath(targetPath, projectRoot)) return false;
|
|
34153
34211
|
if (isDocumentationPath(targetPath, projectRoot)) return false;
|
|
34154
34212
|
return true;
|
|
34155
34213
|
}
|
|
@@ -35035,7 +35093,7 @@ init_cancelled_error();
|
|
|
35035
35093
|
init_events();
|
|
35036
35094
|
|
|
35037
35095
|
// src/index.ts
|
|
35038
|
-
var VERSION = "1.75.
|
|
35096
|
+
var VERSION = "1.75.2";
|
|
35039
35097
|
|
|
35040
35098
|
// src/cli/commands/audit.ts
|
|
35041
35099
|
init_esm_shims();
|