@qilin-agent/experimental-auto-review 3.1.3 → 3.1.5

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/README.i18n.yaml CHANGED
@@ -5,60 +5,60 @@
5
5
  /:
6
6
  en: 4f245200f5345e3c
7
7
  zh: 221e9996e8ce2963
8
- /qilin-experimental-auto-review:
9
- en: 096b5782cd80f499
10
- zh: db975f2f888f73e6
11
- /qilin-experimental-auto-review/summary:
8
+ /qilin-agent-experimental-auto-review:
9
+ en: 4758786eea2f3235
10
+ zh: 68af4a3b785a40d1
11
+ /qilin-agent-experimental-auto-review/summary:
12
12
  en: 462dc82ed2bf73fa
13
13
  zh: 752fc512b284ce3a
14
- /qilin-experimental-auto-review/table-of-contents:
14
+ /qilin-agent-experimental-auto-review/table-of-contents:
15
15
  en: d152484eb41ac6b4
16
16
  zh: 09388d293f9be9cb
17
- /qilin-experimental-auto-review/use-this-package:
18
- en: bbff250eba0f1b89
19
- zh: 0a618f05cc88ee2b
20
- /qilin-experimental-auto-review/use-this-package/install-into-a-profile:
17
+ /qilin-agent-experimental-auto-review/use-this-package:
18
+ en: 8f9e85817f05aa4d
19
+ zh: f60136fb39abcf29
20
+ /qilin-agent-experimental-auto-review/use-this-package/install-into-a-profile:
21
21
  en: 2b00909b8a598b95
22
22
  zh: 53f3d4ea2c24facf
23
- /qilin-experimental-auto-review/use-this-package/what-you-get:
23
+ /qilin-agent-experimental-auto-review/use-this-package/what-you-get:
24
24
  en: d16ffda0261598d2
25
25
  zh: 036753fb1e0f7f1b
26
- /qilin-experimental-auto-review/understand-the-implementation:
26
+ /qilin-agent-experimental-auto-review/understand-the-implementation:
27
27
  en: 247d944710609cf4
28
28
  zh: 288747f1688fac99
29
- /qilin-experimental-auto-review/further-exploration:
29
+ /qilin-agent-experimental-auto-review/further-exploration:
30
30
  en: 632da083e0544a63
31
31
  zh: 5b26f33a2ec1dbef
32
- /qilin-experimental-auto-review/model-experience:
32
+ /qilin-agent-experimental-auto-review/model-experience:
33
33
  en: 215e7ba838619b7b
34
34
  zh: a311da3843709f90
35
- /qilin-experimental-auto-review/model-experience/per-call-reviewer:
35
+ /qilin-agent-experimental-auto-review/model-experience/per-call-reviewer:
36
36
  en: 7ec217b1012cd8fa
37
37
  zh: 6188796b4990f2ef
38
- /qilin-experimental-auto-review/model-experience/per-call-reviewer/what-the-model-sees:
38
+ /qilin-agent-experimental-auto-review/model-experience/per-call-reviewer/what-the-model-sees:
39
39
  en: b3e50d879db13221
40
40
  zh: 81f9c8f2793bea0d
41
- /qilin-experimental-auto-review/model-experience/per-call-reviewer/token-effect:
41
+ /qilin-agent-experimental-auto-review/model-experience/per-call-reviewer/token-effect:
42
42
  en: 9c3e575c061d53fe
43
43
  zh: 2952dd9a75943159
44
- /qilin-experimental-auto-review/model-experience/per-call-reviewer/kv-cache-effect:
44
+ /qilin-agent-experimental-auto-review/model-experience/per-call-reviewer/kv-cache-effect:
45
45
  en: 67b73d97f22f3c75
46
46
  zh: 4dd263e571043cf4
47
- /qilin-experimental-auto-review/model-experience/tool-denial:
47
+ /qilin-agent-experimental-auto-review/model-experience/tool-denial:
48
48
  en: f9b4d7b686f14fc5
49
49
  zh: a2fac9a8eaf5e2a3
50
- /qilin-experimental-auto-review/model-experience/tool-denial/what-the-model-sees:
50
+ /qilin-agent-experimental-auto-review/model-experience/tool-denial/what-the-model-sees:
51
51
  en: a0b93e8eebc1b497
52
52
  zh: e4a74a70a065b0e7
53
- /qilin-experimental-auto-review/model-experience/tool-denial/token-effect:
53
+ /qilin-agent-experimental-auto-review/model-experience/tool-denial/token-effect:
54
54
  en: 679cb3d82e97022f
55
55
  zh: 2bd88e7a3d2f2418
56
- /qilin-experimental-auto-review/model-experience/tool-denial/kv-cache-effect:
56
+ /qilin-agent-experimental-auto-review/model-experience/tool-denial/kv-cache-effect:
57
57
  en: 8da1089dee147f94
58
58
  zh: 87361347bfd10c6c
59
- /qilin-experimental-auto-review/known-limitations-and-deferred-work:
59
+ /qilin-agent-experimental-auto-review/known-limitations-and-deferred-work:
60
60
  en: 3cb6e76d79ab3a38
61
61
  zh: f2b7d40d9b5631dd
62
- /qilin-experimental-auto-review/known-limitations-and-deferred-work/dev-note:
62
+ /qilin-agent-experimental-auto-review/known-limitations-and-deferred-work/dev-note:
63
63
  en: e67f633dc6fe7773
64
64
  zh: 3bb0c20c93f16f98
package/README.md CHANGED
@@ -25,6 +25,8 @@ Add Auto review to the current-session permission pickers in a Web profile. Befo
25
25
  <a id="use-this-package"></a>
26
26
  ## Use this package
27
27
 
28
+ The review environment records the Session's current working directory for the pending action.
29
+
28
30
  ### Install into a profile
29
31
 
30
32
  From this source checkout, install the package into the Web profile through the existing CLI:
package/README.zh.md CHANGED
@@ -25,6 +25,8 @@ kind: "package-bundle"
25
25
  <a id="use-this-package"></a>
26
26
  ## 使用本包
27
27
 
28
+ 评审环境记录待执行操作对应的 Session 当前工作目录。
29
+
28
30
  ### 安装到 profile
29
31
 
30
32
  从源码 checkout 通过既有 CLI 将包安装到 Web profile:
package/lib/index.js CHANGED
@@ -47,7 +47,8 @@ const inject = [
47
47
  "llm",
48
48
  "permissionPresets",
49
49
  "sessions",
50
- "tools"
50
+ "tools",
51
+ "workingDirectory"
51
52
  ];
52
53
  /** Return JSON text for one immutable logged value. */
53
54
  function json(value) {
@@ -211,14 +212,12 @@ function ptcAction(exec, start, visibleParentKeys) {
211
212
  * @param exec - immutable pending execution.
212
213
  * @returns the exact route and four data sections paired with {@link REVIEW_POLICY}.
213
214
  */
214
- function snapshotAutoReview(agent, exec) {
215
+ function snapshotAutoReview(agent, exec, cwd) {
215
216
  const { session } = agent;
216
217
  const events = session.snapshotEvents();
217
218
  const nodes = [...session.surface.nodes];
218
219
  const header = session.requestHeader();
219
220
  if (header === void 0 || header.config.provider.length === 0 || header.config.model.length === 0) throw new Error("auto-review: no complete request-header route is available");
220
- const cwd = session.header.cwd;
221
- if (cwd === void 0 || cwd.length === 0) throw new Error("auto-review: the session has no working directory");
222
221
  const nativeCalls = events.filter((event) => event.type === "tool/call");
223
222
  const { starts, openStep: currentStep } = scopePtcStarts(events);
224
223
  const initialPromptSeq = directParentInitialPromptSeq(agent, events);
@@ -397,7 +396,7 @@ async function readDecision(stream) {
397
396
  }
398
397
  /** Review one frozen pending action with the fixed policy and current LLM route. */
399
398
  async function classifyRisk(ctx, agent, exec, signal) {
400
- const snapshot = snapshotAutoReview(agent, exec);
399
+ const snapshot = snapshotAutoReview(agent, exec, await ctx.workingDirectory.ensure(agent, signal));
401
400
  const options = deepFreeze({
402
401
  provider: snapshot.provider,
403
402
  model: snapshot.model,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@qilin-agent/experimental-auto-review",
3
3
  "description": "Per-tool LLM authorization review for the QiLin Auto permission preset",
4
4
  "icon": "./icon.svg",
5
- "version": "3.1.3",
5
+ "version": "3.1.5",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/kkutysllb/QiLin.git",
@@ -33,47 +33,49 @@
33
33
  ],
34
34
  "license": "MIT",
35
35
  "peerDependencies": {
36
- "@qilin-agent/agent": "3.1.3",
37
- "@qilin-agent/llm": "3.1.3",
38
- "@qilin-agent/agent-instructions": "3.1.3",
39
- "@qilin-agent/permission-presets": "3.1.3",
40
- "@qilin-agent/tools": "3.1.3",
41
- "@qilin-agent/session": "3.1.3",
42
- "@qilin-agent/kylin": "~4.0.3"
36
+ "@qilin-agent/llm": "3.1.5",
37
+ "@qilin-agent/agent-instructions": "3.1.5",
38
+ "@qilin-agent/permission-presets": "3.1.5",
39
+ "@qilin-agent/agent": "3.1.5",
40
+ "@qilin-agent/session": "3.1.5",
41
+ "@qilin-agent/working-directory": "3.1.5",
42
+ "@qilin-agent/kylin": "~4.0.3",
43
+ "@qilin-agent/tools": "3.1.5"
43
44
  },
44
45
  "dependencies": {
45
- "@qilin-agent/util-values": "3.1.3"
46
+ "@qilin-agent/util-values": "3.1.5"
46
47
  },
47
48
  "devDependencies": {
48
- "@qilin-agent/agent": "3.1.3",
49
- "@qilin-agent/agent-instructions": "3.1.3",
50
- "@qilin-agent/agent-loop": "3.1.3",
51
- "@qilin-agent/agent-loop-testkit": "3.1.3",
52
- "@qilin-agent/bash-sandbox": "3.1.3",
53
- "@qilin-agent/compaction": "3.1.3",
54
- "@qilin-agent/fs-local": "3.1.3",
55
- "@qilin-agent/fs-sandbox": "3.1.3",
56
- "@qilin-agent/fs-observation-policy": "3.1.3",
57
- "@qilin-agent/llm-deepseek": "3.1.3",
58
- "@qilin-agent/llm": "3.1.3",
59
- "@qilin-agent/ptc-runtime-node": "3.1.3",
60
- "@qilin-agent/sandbox": "3.1.3",
61
- "@qilin-agent/permission-presets": "3.1.3",
62
- "@qilin-agent/sandbox-policy": "3.1.3",
63
- "@qilin-agent/session": "3.1.3",
64
- "@qilin-agent/session-projection": "3.1.3",
65
- "@qilin-agent/shell": "3.1.3",
66
- "@qilin-agent/shell-env": "3.1.3",
67
- "@qilin-agent/subagent": "3.1.3",
68
- "@qilin-agent/subprocess-local": "3.1.3",
69
- "@qilin-agent/tool-fs": "3.1.3",
70
- "@qilin-agent/tool-bash": "3.1.3",
71
- "@qilin-agent/llm-deepseek-api-key": "3.1.3",
72
- "@qilin-agent/tool-subagent": "3.1.3",
73
- "@qilin-agent/system-prompt": "3.1.3",
74
- "@qilin-agent/user-approval": "3.1.3",
75
- "@qilin-agent/tools": "3.1.3",
76
- "@qilin-agent/kylin": "~4.0.3"
49
+ "@qilin-agent/agent-loop": "3.1.5",
50
+ "@qilin-agent/bash-sandbox": "3.1.5",
51
+ "@qilin-agent/agent": "3.1.5",
52
+ "@qilin-agent/agent-loop-testkit": "3.1.5",
53
+ "@qilin-agent/agent-instructions": "3.1.5",
54
+ "@qilin-agent/compaction": "3.1.5",
55
+ "@qilin-agent/fs-local": "3.1.5",
56
+ "@qilin-agent/fs-observation-policy": "3.1.5",
57
+ "@qilin-agent/fs-sandbox": "3.1.5",
58
+ "@qilin-agent/llm": "3.1.5",
59
+ "@qilin-agent/llm-deepseek": "3.1.5",
60
+ "@qilin-agent/llm-deepseek-api-key": "3.1.5",
61
+ "@qilin-agent/permission-presets": "3.1.5",
62
+ "@qilin-agent/sandbox": "3.1.5",
63
+ "@qilin-agent/sandbox-policy": "3.1.5",
64
+ "@qilin-agent/ptc-runtime-node": "3.1.5",
65
+ "@qilin-agent/session": "3.1.5",
66
+ "@qilin-agent/shell": "3.1.5",
67
+ "@qilin-agent/shell-env": "3.1.5",
68
+ "@qilin-agent/subagent": "3.1.5",
69
+ "@qilin-agent/subprocess-local": "3.1.5",
70
+ "@qilin-agent/session-projection": "3.1.5",
71
+ "@qilin-agent/system-prompt": "3.1.5",
72
+ "@qilin-agent/tool-fs": "3.1.5",
73
+ "@qilin-agent/tool-bash": "3.1.5",
74
+ "@qilin-agent/tool-subagent": "3.1.5",
75
+ "@qilin-agent/user-approval": "3.1.5",
76
+ "@qilin-agent/working-directory": "3.1.5",
77
+ "@qilin-agent/kylin": "~4.0.3",
78
+ "@qilin-agent/tools": "3.1.5"
77
79
  },
78
80
  "publishConfig": {
79
81
  "access": "public"