@kylecheng3146/agent-ops 0.4.1 → 0.5.0
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/LICENSE +91 -21
- package/README.md +4 -1
- package/dist/runtime/src/install/preauth.js +36 -4
- package/docs/en/guides/configuration.md +6 -3
- package/docs/zh-TW/guides/configuration.md +8 -5
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,91 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
Required Notice: Copyright (c) 2026 Kyle Cheng (https://github.com/kylecheng3146/agent-ops)
|
|
2
|
+
|
|
3
|
+
# PolyForm Shield License 1.0.0
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/shield/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
+
|
|
15
|
+
## Distribution License
|
|
16
|
+
|
|
17
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
18
|
+
|
|
19
|
+
## Notices
|
|
20
|
+
|
|
21
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
22
|
+
|
|
23
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
24
|
+
|
|
25
|
+
## Changes and New Works License
|
|
26
|
+
|
|
27
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
28
|
+
|
|
29
|
+
## Patent License
|
|
30
|
+
|
|
31
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Noncompete
|
|
34
|
+
|
|
35
|
+
Any purpose is a permitted purpose, except for providing any product that competes with the software or any product the licensor or any of its affiliates provides using the software.
|
|
36
|
+
|
|
37
|
+
## Competition
|
|
38
|
+
|
|
39
|
+
Goods and services compete even when they provide functionality through different kinds of interfaces or for different technical platforms. Applications can compete with services, libraries with plugins, frameworks with development tools, and so on, even if they're written in different programming languages or for different computer architectures. Goods and services compete even when provided free of charge. If you market a product as a practical substitute for the software or another product, it definitely competes.
|
|
40
|
+
|
|
41
|
+
## New Products
|
|
42
|
+
|
|
43
|
+
If you are using the software to provide a product that does not compete, but the licensor or any of its affiliates brings your product into competition by providing a new version of the software or another product using the software, you may continue using versions of the software available under these terms beforehand to provide your competing product, but not any later versions.
|
|
44
|
+
|
|
45
|
+
## Discontinued Products
|
|
46
|
+
|
|
47
|
+
You may begin using the software to compete with a product or service that the licensor or any of its affiliates has stopped providing, unless the licensor includes a plain-text line beginning with `Licensor Line of Business:` with the software that mentions that line of business. For example:
|
|
48
|
+
|
|
49
|
+
> Licensor Line of Business: YoyodyneCMS Content Management System (http://example.com/cms)
|
|
50
|
+
|
|
51
|
+
## Sales of Business
|
|
52
|
+
|
|
53
|
+
If the licensor or any of its affiliates sells a line of business developing the software or using the software to provide a product, the buyer can also enforce [Noncompete](#noncompete) for that product.
|
|
54
|
+
|
|
55
|
+
## Fair Use
|
|
56
|
+
|
|
57
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
58
|
+
|
|
59
|
+
## No Other Rights
|
|
60
|
+
|
|
61
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
62
|
+
|
|
63
|
+
## Patent Defense
|
|
64
|
+
|
|
65
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
66
|
+
|
|
67
|
+
## Violations
|
|
68
|
+
|
|
69
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
70
|
+
|
|
71
|
+
## No Liability
|
|
72
|
+
|
|
73
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
74
|
+
|
|
75
|
+
## Definitions
|
|
76
|
+
|
|
77
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
78
|
+
|
|
79
|
+
A **product** can be a good or service, or a combination of them.
|
|
80
|
+
|
|
81
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
82
|
+
|
|
83
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all its affiliates.
|
|
84
|
+
|
|
85
|
+
**Affiliates** means the other organizations than an organization has control over, is under the control of, or is under common control with.
|
|
86
|
+
|
|
87
|
+
**Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
88
|
+
|
|
89
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
90
|
+
|
|
91
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
package/README.md
CHANGED
|
@@ -412,4 +412,7 @@ Documentation:
|
|
|
412
412
|
|
|
413
413
|
## License
|
|
414
414
|
|
|
415
|
-
Copyright (c) 2026 Kyle Cheng. Released under the
|
|
415
|
+
Copyright (c) 2026 Kyle Cheng. Released under the
|
|
416
|
+
[PolyForm Shield License 1.0.0](LICENSE): free to use, change and share,
|
|
417
|
+
including inside a company, but not to build a product or service that competes
|
|
418
|
+
with agent-ops. Versions up to 0.4.1 were released under, and remain under, the MIT License.
|
|
@@ -17,14 +17,26 @@ export const CLAUDE_PREAUTH_ALLOW = [
|
|
|
17
17
|
"Bash(agent-ops review *)",
|
|
18
18
|
"Bash(agent-ops batch *)",
|
|
19
19
|
"Bash(agent-ops worktree *)",
|
|
20
|
-
"Bash(agent-ops doctor *)"
|
|
20
|
+
"Bash(agent-ops doctor *)",
|
|
21
|
+
// The PreToolUse hook still blocks a path this session does not own.
|
|
22
|
+
"EnterWorktree",
|
|
23
|
+
// A worktree commit runs the project's pre-commit hook, usually this.
|
|
24
|
+
"Bash(npx lint-staged *)"
|
|
21
25
|
];
|
|
22
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* review and batch talk to the reviewer's API, which the sandbox withholds;
|
|
28
|
+
* worktree commit and lint-staged write the main .git, which a worktree's
|
|
29
|
+
* sandbox cannot.
|
|
30
|
+
*/
|
|
23
31
|
export const CLAUDE_PREAUTH_UNSANDBOXED = [
|
|
24
32
|
"agent-ops review",
|
|
25
33
|
"agent-ops review *",
|
|
26
34
|
"agent-ops batch",
|
|
27
|
-
"agent-ops batch *"
|
|
35
|
+
"agent-ops batch *",
|
|
36
|
+
"agent-ops worktree commit",
|
|
37
|
+
"agent-ops worktree commit *",
|
|
38
|
+
"npx lint-staged",
|
|
39
|
+
"npx lint-staged *"
|
|
28
40
|
];
|
|
29
41
|
export const CODEX_RULES_PATH = "rules/agent-ops.rules";
|
|
30
42
|
export const CODEX_RULES_MARKER = "# agent-ops managed: regenerated by agent-ops init and update; do not edit.";
|
|
@@ -60,6 +72,26 @@ function rule(options) {
|
|
|
60
72
|
*/
|
|
61
73
|
export const CODEX_RULES_CONTENT = `${[
|
|
62
74
|
CODEX_RULES_MARKER,
|
|
75
|
+
...[
|
|
76
|
+
{
|
|
77
|
+
pattern: ["agent-ops", "worktree", "commit"],
|
|
78
|
+
justification: "agent-ops worktree commit runs git hooks, which write the main .git outside the sandbox.",
|
|
79
|
+
match: "agent-ops worktree commit -m message"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
pattern: ["npx", "lint-staged"],
|
|
83
|
+
justification: "lint-staged backs up through the main .git, which the sandbox cannot write from a worktree.",
|
|
84
|
+
match: "npx lint-staged --debug"
|
|
85
|
+
}
|
|
86
|
+
].map((entry) => [
|
|
87
|
+
"prefix_rule(",
|
|
88
|
+
` pattern = ${starlarkList(entry.pattern)},`,
|
|
89
|
+
' decision = "allow",',
|
|
90
|
+
` justification = ${JSON.stringify(entry.justification)},`,
|
|
91
|
+
` match = [${JSON.stringify(entry.match)}],`,
|
|
92
|
+
' not_match = ["agent-ops trust grant --scope project --yes"]',
|
|
93
|
+
")"
|
|
94
|
+
].join("\n")),
|
|
63
95
|
...[true, false].flatMap((withHost) => {
|
|
64
96
|
const host = withHost ? "AGENT_OPS_HOST=codex " : "";
|
|
65
97
|
const env = `env -u CODEX_SANDBOX_NETWORK_DISABLED ${host}agent-ops`;
|
|
@@ -240,7 +272,7 @@ async function codexChange(codexHome, desired) {
|
|
|
240
272
|
content: CODEX_RULES_CONTENT,
|
|
241
273
|
expectedHash: current?.hash ?? null
|
|
242
274
|
},
|
|
243
|
-
summary: `Writes ${join(codexHome, CODEX_RULES_PATH)}: allow rules for agent-ops review
|
|
275
|
+
summary: `Writes ${join(codexHome, CODEX_RULES_PATH)}: allow rules for agent-ops review, batch, doctor --check-auth, worktree commit and lint-staged.`,
|
|
244
276
|
ownedContent: true
|
|
245
277
|
};
|
|
246
278
|
}
|
|
@@ -236,12 +236,15 @@ evidence. Give each editing conversation its own worktree instead:
|
|
|
236
236
|
- With `worktree.mode` auto, `init` and `update` also pre-authorize what a
|
|
237
237
|
session runs itself, and the plan lists it before you confirm: in
|
|
238
238
|
`.claude/settings.local.json`, `permissions.allow` for `agent-ops task`,
|
|
239
|
-
`verify`, `review`, `worktree` and `doctor
|
|
240
|
-
|
|
239
|
+
`verify`, `review`, `worktree` and `doctor`, plus `EnterWorktree` (the hook
|
|
240
|
+
still blocks a path the session does not own) and `npx lint-staged`, and
|
|
241
|
+
`sandbox.excludedCommands` for `agent-ops review`, `batch`, `worktree commit`
|
|
242
|
+
and `npx lint-staged` (your other entries are kept, and the plan describes
|
|
241
243
|
the file instead of printing it); and, when the CLI can see Codex's home
|
|
242
244
|
(`CODEX_HOME`, else `~/.codex`), `rules/agent-ops.rules` with allow rules
|
|
243
245
|
for `agent-ops review` and `doctor --check-auth`, with and without
|
|
244
|
-
`AGENT_OPS_HOST
|
|
246
|
+
`AGENT_OPS_HOST=`, and for `agent-ops worktree commit` and `npx lint-staged`,
|
|
247
|
+
so a pre-commit hook can write the main `.git`. `trust`, `allow-stop`, `init`, `update` and `uninstall`
|
|
245
248
|
are never pre-authorized. Turning auto mode off, or `uninstall`, takes
|
|
246
249
|
exactly those entries back out; a rules file of that name agent-ops did not
|
|
247
250
|
write is left alone.
|
|
@@ -204,11 +204,14 @@ fingerprint,因此兩個對話修改同一個 checkout 會互相作廢對方
|
|
|
204
204
|
會把較舊的 matcher 回報為註冊漂移。
|
|
205
205
|
- 當 `worktree.mode` 為 auto,`init` 與 `update` 也會預先授權 session 自己會執行的
|
|
206
206
|
指令,並在你確認前先列在計畫裡:在 `.claude/settings.local.json` 寫入
|
|
207
|
-
`agent-ops task`、`verify`、`review`、`worktree`、`doctor
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
`agent-ops task`、`verify`、`review`、`worktree`、`doctor`,加上 `EnterWorktree`
|
|
208
|
+
(hook 仍會擋下 session 不擁有的路徑)與 `npx lint-staged` 的 `permissions.allow`,
|
|
209
|
+
以及 `agent-ops review`、`batch`、`worktree commit` 與 `npx lint-staged` 的
|
|
210
|
+
`sandbox.excludedCommands`(你原有的項目會保留,計畫只描述該檔案而不印出內容);
|
|
211
|
+
若 CLI 找得到 Codex 的 home(`CODEX_HOME`,否則 `~/.codex`),另寫入
|
|
212
|
+
`rules/agent-ops.rules`,內含 `agent-ops review` 與 `doctor --check-auth` 的 allow
|
|
213
|
+
規則(含與不含 `AGENT_OPS_HOST=`),以及 `agent-ops worktree commit` 與
|
|
214
|
+
`npx lint-staged` 的 allow 規則,讓 pre-commit hook 能寫入主 `.git`。`trust`、
|
|
212
215
|
`allow-stop`、`init`、`update`、`uninstall` 永遠不會被預先授權。關閉 auto 模式或
|
|
213
216
|
`uninstall` 會精確移除這些項目;同名但不是 agent-ops 寫的規則檔不會被動到。
|
|
214
217
|
- `review` 與 `doctor` 支援 `--output <file>`:JSON envelope 寫入該檔(權限 0600),
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kylecheng3146/agent-ops",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Evidence-driven development loops for agy, Codex, Claude Code, and opencode",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"repository": "github:kylecheng3146/agent-ops",
|
|
8
8
|
"engines": {
|
|
9
9
|
"node": ">=22.14.0"
|