@lazyingart/agintiflow 0.20.92 → 0.20.93
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.93",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Low-cost, project-aware Web and CLI agents with DeepSeek/Venice/OpenAI routing, visible tool calls, durable sessions, scouts, AAPS, SCS, and guarded local execution.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -338,8 +338,21 @@ try {
|
|
|
338
338
|
assert(localGitCommitPolicy.category === "git-workflow", "local git commit should be classified as git-workflow");
|
|
339
339
|
const localGitSwitchPolicy = evaluateCommandPolicy("git switch -c feature-a", dockerWorkspaceNoInstallsPolicy);
|
|
340
340
|
assert(localGitSwitchPolicy.allowed, "local git switch -c should be allowed without package installs");
|
|
341
|
+
const localGitCheckoutExistingPolicy = evaluateCommandPolicy("git checkout main", dockerWorkspaceNoInstallsPolicy);
|
|
342
|
+
assert(localGitCheckoutExistingPolicy.allowed, "local git checkout existing branch should be allowed without package installs");
|
|
341
343
|
const localGitMergePolicy = evaluateCommandPolicy("git merge --ff-only feature-a", dockerWorkspaceNoInstallsPolicy);
|
|
342
344
|
assert(localGitMergePolicy.allowed, "local git fast-forward merge should be allowed without package installs");
|
|
345
|
+
const localGitNoFfMergePolicy = evaluateCommandPolicy("git merge --no-ff --no-edit feature-b", dockerWorkspaceNoInstallsPolicy);
|
|
346
|
+
assert(localGitNoFfMergePolicy.allowed, "local git explicit no-ff merge should be allowed without package installs");
|
|
347
|
+
const localGitNoFfMergeAltPolicy = evaluateCommandPolicy("git merge --no-ff feature-b --no-edit", dockerWorkspaceNoInstallsPolicy);
|
|
348
|
+
assert(localGitNoFfMergeAltPolicy.allowed, "local git explicit no-ff merge alternate arg order should be allowed");
|
|
349
|
+
const localGitWorkflowSequencePolicy = evaluateCommandPolicy(
|
|
350
|
+
"cd /workspace/git-practice && git checkout main && git merge --ff-only feature-a",
|
|
351
|
+
dockerWorkspaceNoInstallsPolicy
|
|
352
|
+
);
|
|
353
|
+
assert(localGitWorkflowSequencePolicy.allowed, "local git checkout + ff-only merge sequence should be allowed without package installs");
|
|
354
|
+
const plainGitMergePolicy = evaluateCommandPolicy("git merge feature-a", dockerWorkspaceNoInstallsPolicy);
|
|
355
|
+
assert(!plainGitMergePolicy.allowed, "plain git merge should stay guarded because it can hang or make an ambiguous merge");
|
|
343
356
|
const unsafeRebasePolicy = evaluateCommandPolicy("git rebase main", dockerWorkspaceNoInstallsPolicy);
|
|
344
357
|
assert(!unsafeRebasePolicy.allowed, "git rebase should still require stronger permission because it rewrites history");
|
|
345
358
|
const unsafeCloneTarget = evaluateCommandPolicy("git clone https://github.com/lazyingart/AgInTiFlow.git ../AgInTiFlow", dockerWorkspacePolicy);
|
|
@@ -126,6 +126,25 @@ try {
|
|
|
126
126
|
});
|
|
127
127
|
assert.equal(dockerTmuxRelativeStart.allowed, true, "Docker-mode tmux_start_session should allow workspace-relative paths");
|
|
128
128
|
|
|
129
|
+
const dockerTmuxGitFfMergeStart = checkToolUse({
|
|
130
|
+
toolName: "tmux_start_session",
|
|
131
|
+
args: {
|
|
132
|
+
name: `${session}-docker-git-ff`,
|
|
133
|
+
cwd: ".",
|
|
134
|
+
command: "git checkout main && git merge --ff-only feature-a",
|
|
135
|
+
},
|
|
136
|
+
config: dockerNoInstallsConfig,
|
|
137
|
+
});
|
|
138
|
+
assert.equal(dockerTmuxGitFfMergeStart.allowed, true, "Docker-mode tmux should allow explicit local checkout + ff-only merge workflow");
|
|
139
|
+
|
|
140
|
+
const dockerTmuxGitPlainMergeStart = checkToolUse({
|
|
141
|
+
toolName: "tmux_start_session",
|
|
142
|
+
args: { name: `${session}-docker-git-plain-merge`, cwd: ".", command: "git merge feature-a" },
|
|
143
|
+
config: dockerNoInstallsConfig,
|
|
144
|
+
});
|
|
145
|
+
assert.equal(dockerTmuxGitPlainMergeStart.allowed, false, "Docker-mode tmux should keep plain git merge guarded");
|
|
146
|
+
assert.equal(dockerTmuxGitPlainMergeStart.category, "destructive", "plain git merge should keep destructive category");
|
|
147
|
+
|
|
129
148
|
const dockerTmuxRebaseStart = checkToolUse({
|
|
130
149
|
toolName: "tmux_start_session",
|
|
131
150
|
args: { name: `${session}-docker-rebase`, cwd: ".", command: "git rebase main" },
|
|
@@ -235,6 +254,8 @@ try {
|
|
|
235
254
|
"docker-tmux-start-project-path-allowed",
|
|
236
255
|
"docker-tmux-start-relative-path-allowed",
|
|
237
256
|
"docker-tmux-start-command-policy-guardrail",
|
|
257
|
+
"docker-tmux-start-git-ff-merge-allowed",
|
|
258
|
+
"docker-tmux-start-plain-git-merge-guarded",
|
|
238
259
|
"docker-tmux-send-command-policy-guardrail",
|
|
239
260
|
"docker-tmux-send-readonly-command-allowed",
|
|
240
261
|
"host-tmux-start-shell-policy-guardrail",
|
|
@@ -20,6 +20,6 @@ tools:
|
|
|
20
20
|
|
|
21
21
|
Always inspect `git status --short` and relevant diffs before committing or pushing. Keep commits scoped and stop on conflicts, divergence, or unrelated dirty work.
|
|
22
22
|
|
|
23
|
-
For local workflow practice or repository setup, prefer a disposable subdirectory if the user did not clearly target the current repository. Configure only local git identity (`git config user.name`, `git config user.email`) inside that repo; never change global git config. Use accurate git scenarios: a fast-forward merge means the target branch has not diverged; a non-fast-forward merge intentionally creates a merge commit after both branches diverge; a rebase rewrites local branch commits and should be used only in an explicitly disposable/local branch or after user approval.
|
|
23
|
+
For local workflow practice or repository setup, prefer a disposable subdirectory if the user did not clearly target the current repository. Configure only local git identity (`git config user.name`, `git config user.email`) inside that repo; never change global git config. Use policy-friendly local commands: `git switch <branch>` or `git checkout <branch>` for existing branches, `git switch -c <branch>` or `git checkout -b <branch>` for new branches, `git merge --ff-only <branch>` for fast-forward evidence, and `git merge --no-ff --no-edit <branch>` for explicit merge-commit evidence. Avoid plain `git merge <branch>` because it can hang on an editor or make an ambiguous merge. Use accurate git scenarios: a fast-forward merge means the target branch has not diverged; a non-fast-forward merge intentionally creates a merge commit after both branches diverge; a rebase rewrites local branch commits and should be used only in an explicitly disposable/local branch or after user approval.
|
|
24
24
|
|
|
25
25
|
Use `gh` for PR/release/status workflows when authenticated. Fold long command output but preserve key errors, URLs, branch names, and commit hashes.
|
package/src/command-policy.js
CHANGED
|
@@ -81,9 +81,13 @@ const GIT_WORKFLOW_PATTERNS = [
|
|
|
81
81
|
/^git\s+branch\s+[A-Za-z0-9][-\w./]*$/,
|
|
82
82
|
/^git\s+switch\s+(?:-c\s+)?[A-Za-z0-9][-\w./]*$/,
|
|
83
83
|
/^git\s+checkout\s+-b\s+[A-Za-z0-9][-\w./]*$/,
|
|
84
|
+
/^git\s+checkout\s+[A-Za-z0-9][-\w./]*$/,
|
|
84
85
|
/^git\s+merge\s+--ff-only\s+[A-Za-z0-9][-\w./]*$/,
|
|
85
86
|
/^git\s+merge\s+--no-ff\s+--no-edit\s+[A-Za-z0-9][-\w./]*$/,
|
|
87
|
+
/^git\s+merge\s+--no-ff\s+[A-Za-z0-9][-\w./]*\s+--no-edit$/,
|
|
88
|
+
/^git\s+merge\s+--no-edit\s+--no-ff\s+[A-Za-z0-9][-\w./]*$/,
|
|
86
89
|
/^git\s+merge\s+[A-Za-z0-9][-\w./]*\s+--no-ff\s+--no-edit$/,
|
|
90
|
+
/^git\s+merge\s+[A-Za-z0-9][-\w./]*\s+--no-edit\s+--no-ff$/,
|
|
87
91
|
/^git\s+fetch(?:\s+[-\w./:=]+)*$/,
|
|
88
92
|
/^git\s+pull\s+--ff-only(?:\s+[-\w./:=]+)*$/,
|
|
89
93
|
/^git\s+push(?:\s+[-\w./:=]+)*$/,
|
package/src/task-profiles.js
CHANGED
|
@@ -255,7 +255,7 @@ export const TASK_PROFILES = {
|
|
|
255
255
|
id: "github",
|
|
256
256
|
label: "GitHub maintenance",
|
|
257
257
|
prompt:
|
|
258
|
-
"Bias toward safe git and GitHub maintenance while still fixing code/docs when asked. Always inspect git status and remotes first, separate unrelated changes, run relevant checks before commits, use gh when available for PR/issues/releases, prefer fast-forward pulls, and stop on conflicts or ambiguous history. For local workflow practice, use a disposable subdirectory, set only local git identity, avoid real remotes unless explicitly requested, and describe fast-forward, non-fast-forward merge, and rebase evidence accurately.",
|
|
258
|
+
"Bias toward safe git and GitHub maintenance while still fixing code/docs when asked. Always inspect git status and remotes first, separate unrelated changes, run relevant checks before commits, use gh when available for PR/issues/releases, prefer fast-forward pulls, and stop on conflicts or ambiguous history. For local workflow practice, use a disposable subdirectory, set only local git identity, avoid real remotes unless explicitly requested, prefer `git switch <branch>`/`git checkout <branch>` for branch changes, use `git merge --ff-only <branch>` for fast-forward evidence, use `git merge --no-ff --no-edit <branch>` for intentional merge commits, avoid plain `git merge <branch>`, and describe fast-forward, non-fast-forward merge, and rebase evidence accurately.",
|
|
259
259
|
tools: ["shell", "files", "web_search", "inspect_project"],
|
|
260
260
|
},
|
|
261
261
|
word: {
|