feat(permission): add Auto review mode

This commit is contained in:
pku-xht committed 2026-08-29 00:56:21 +08:00
1 parent cd5ef81481
commit b3b7e00449
126 files changed
+3879 -325

No files matched your search

+1
View File
@@ -577,6 +577,7 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
WorkflowRun: 'workflow.md',
VerifiedWebhookDelivery: 'webhook.md',
WebhookRule: 'webhook.md',
PermissionPresetContribution: 'permission-presets.md',
PresetOption: 'permission-presets.md',
PresetSpec: 'permission-presets.md',
InvariantInstaller: 'invariants.md',
@@ -746,6 +746,18 @@
"parentCallId": "advanced-code",
"subCallId": "advanced-code:code:1",
"name": "snapshot_double",
"description": "Double a number for executable snapshot verification.",
"parameters": {
"type": "object",
"properties": {
"value": {
"type": "number"
}
},
"required": [
"value"
]
},
"arguments": {
"value": 21
}
@@ -2619,6 +2631,18 @@
"parentCallId": "advanced-code",
"subCallId": "advanced-code:code:1",
"name": "snapshot_double",
"description": "Double a number for executable snapshot verification.",
"parameters": {
"type": "object",
"properties": {
"value": {
"type": "number"
}
},
"required": [
"value"
]
},
"arguments": {
"value": 21
}
@@ -42,7 +42,7 @@
{"type":"assistant/chunk","data":{"turn":1,"step":3,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}}
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"tool-call","id":"advanced-code","name":"run_code","arguments":"{\"code\": \"return await tools.snapshot_double({ value: 21 })\", \"description\": \"Run the temporary Plugin tool\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"smoke-model"},"id":"{{messageId}}"},"usage":{"inputTokens":3,"outputTokens":3,"totalTokens":6}},"sourceEventSeqs":[[36,40]],"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":3,"callId":"advanced-code","name":"run_code","arguments":"{\"code\": \"return await tools.snapshot_double({ value: 21 })\", \"description\": \"Run the temporary Plugin tool\"}"}}
{"type":"tool/code-dispatch-start","data":{"rootCallId":"advanced-code","parentCallId":"advanced-code","subCallId":"advanced-code:code:1","name":"snapshot_double","arguments":{"value":21}}}
{"type":"tool/code-dispatch-start","data":{"rootCallId":"advanced-code","parentCallId":"advanced-code","subCallId":"advanced-code:code:1","name":"snapshot_double","description":"Double a number for executable snapshot verification.","parameters":{"type":"object","properties":{"value":{"type":"number"}},"required":["value"]},"arguments":{"value":21}}}
{"type":"tool/code-dispatch","data":{"rootCallId":"advanced-code","parentCallId":"advanced-code","subCallId":"advanced-code:code:1","name":"snapshot_double","arguments":{"value":21},"isError":false,"content":[{"type":"text","text":"42"}]}}
{"type":"tool/result","data":{"turn":1,"step":3,"message":{"source":{"kind":"tool","callId":"advanced-code"},"content":[{"type":"tool-result","toolCallId":"advanced-code","content":[{"type":"text","text":"42"}],"isError":false}],"role":"user","id":"{{messageId}}"}},"sourceEventSeqs":[42],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":3}}
+10
View File
@@ -806,6 +806,11 @@
"symbol": "ToolGuard",
"source": "packages/core/tools/src/index.ts"
},
{
"doc": "docs/subsystems/tools.md",
"symbol": "ToolErrorInfo",
"source": "packages/core/tools/src/index.ts"
},
{
"doc": "docs/subsystems/tools.md",
"symbol": "ToolRestriction",
@@ -1686,6 +1691,11 @@
"symbol": "Config",
"source": "packages/interaction/permission-presets/src/index.ts"
},
{
"doc": "docs/subsystems/permission-presets.md",
"symbol": "PermissionPresetContribution",
"source": "packages/interaction/permission-presets/src/index.ts"
},
{
"doc": "docs/subsystems/permission-presets.md",
"symbol": "PresetOption",