Merge origin/master into xtr/agent-setup-hook

This commit is contained in:
_Kerman committed 2026-09-09 17:31:17 +08:00
commit 2f7a02022a
243 files changed
+3931 -2186

No files matched your search

+2 -2
View File
@@ -813,7 +813,7 @@ describe('Weighted approval workflow', () => {
})
expect(job).toMatchObject({
if: "github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'",
name: 'publish weighted approval status',
name: 'weighted approval publisher',
'runs-on': 'ubuntu-latest',
'timeout-minutes': 5,
})
@@ -837,7 +837,7 @@ describe('Weighted approval workflow', () => {
'timeout-minutes': 2,
})
expect(record).toBeDefined()
expect(record?.run).toContain('This is by automated Angry Turtle Cyborg, not a human')
expect(record?.run).toBe("echo 'Recorded a weighted approval review event.'")
expect(recordSteps).toHaveLength(1)
expect(JSON.stringify(publisher)).not.toContain('github.event.pull_request.head')
expect(JSON.stringify(publisher)).not.toContain('secrets.')
+3
View File
@@ -85,6 +85,7 @@ export const SERVICE_PAGE: Record<string, string> = {
llm: 'llm-streaming.md',
lsp: 'lsp.md',
messageFeedback: 'feedback.md',
sessionFeedback: 'feedback.md',
permissionPresets: 'permission-presets.md',
planMode: 'plan.md',
terminals: 'terminal.md',
@@ -289,6 +290,8 @@ export const LINK_MAP: Readonly<Record<string, string>> = {
MessageFeedbackFailure: 'feedback.md',
MessageFeedbackItem: 'feedback.md',
MessageFeedbackListRequest: 'feedback.md',
SessionFeedbackRecordRequest: 'feedback.md',
SessionFeedbackRecordResult: 'feedback.md',
MessageFeedbackListResult: 'feedback.md',
MessageFeedbackListValue: 'feedback.md',
MessageFeedbackNoteBlank: 'feedback.md',
+7
View File
@@ -313,6 +313,13 @@ const SERVICE_ROLES: ServiceRole[] = [
mode: 'core',
note: 'Owns per-assistant-message feedback in the canonical Session log, target validation, per-item compare-and-set, and the Host unary Remote contract. Feedback stays outside model history; log export follows the consumer policy.',
},
{
key: 'sessionFeedback',
pkg: 'command-feedback',
title: 'Session-level feedback recorder',
mode: 'core',
note: 'Records one Session-level remark with its category as a log-only feedback/record event on a live Session through the Host unary Remote contract; the /feedback command shares the same producer.',
},
{
key: 'workspaceRegistry',
pkg: 'workspace',
+1 -1
View File
@@ -1327,7 +1327,7 @@ def smoke_sdk_snapshot(base_url: str, executable: Path, update_snapshots: bool)
assert result.final_response == SNAPSHOT_FINAL_TEXT, result.final_response
feedback_types = [event.get("type") for event in result.events
if str(event.get("type")).startswith("feedback/")]
if feedback_types != ["feedback/record", "feedback/message-put", "feedback/message-put", "feedback/message-delete"]:
if feedback_types != ["feedback/record", "feedback/record", "feedback/message-put", "feedback/message-put", "feedback/message-delete"]:
raise AssertionError(f"advanced snapshot did not exercise all feedback mutations: {feedback_types}")
methods = [notification.method for notification in result.notifications]
if methods.count("subagent.started") != 2 or methods.count("subagent.finished") != 2:
@@ -1578,15 +1578,24 @@
}
},
{
"type": "feedback/message-put",
"type": "feedback/record",
"seq": 70,
"time": 0,
"data": {
"category": "other"
}
},
{
"type": "feedback/message-put",
"seq": 71,
"time": 0,
"data": {
"sessionId": "{{parent}}",
"item": {
"messageId": "{{message:1}}",
"rating": "negative",
"note": "Explain the result.",
"category": "task-result",
"version": "{{feedback-version:1}}",
"createdAt": 0,
"updatedAt": 0
@@ -1595,7 +1604,7 @@
},
{
"type": "feedback/message-put",
"seq": 71,
"seq": 72,
"time": 0,
"data": {
"sessionId": "{{parent}}",
@@ -1611,7 +1620,7 @@
},
{
"type": "feedback/message-delete",
"seq": 72,
"seq": 73,
"time": 0,
"data": {
"sessionId": "{{parent}}",
@@ -1620,7 +1629,7 @@
},
{
"type": "turn/end",
"seq": 73,
"seq": 74,
"time": 0,
"data": {
"turn": 1,
@@ -4673,15 +4682,30 @@
"payload": {
"sessionId": "{{parent}}",
"event": {
"type": "feedback/message-put",
"type": "feedback/record",
"seq": 70,
"time": 0,
"data": {
"category": "other"
}
}
}
},
{
"method": "session.event",
"payload": {
"sessionId": "{{parent}}",
"event": {
"type": "feedback/message-put",
"seq": 71,
"time": 0,
"data": {
"sessionId": "{{parent}}",
"item": {
"messageId": "{{message:1}}",
"rating": "negative",
"note": "Explain the result.",
"category": "task-result",
"version": "{{feedback-version:1}}",
"createdAt": 0,
"updatedAt": 0
@@ -4696,7 +4720,7 @@
"sessionId": "{{parent}}",
"event": {
"type": "feedback/message-put",
"seq": 71,
"seq": 72,
"time": 0,
"data": {
"sessionId": "{{parent}}",
@@ -4718,7 +4742,7 @@
"sessionId": "{{parent}}",
"event": {
"type": "feedback/message-delete",
"seq": 72,
"seq": 73,
"time": 0,
"data": {
"sessionId": "{{parent}}",
@@ -4733,7 +4757,7 @@
"sessionId": "{{parent}}",
"event": {
"type": "turn/end",
"seq": 73,
"seq": 74,
"time": 0,
"data": {
"turn": 1,
@@ -69,7 +69,8 @@
{"type":"command/run","data":{"commandId":"{{command:1}}","name":"feedback","source":{"kind":"user"}}}
{"type":"feedback/record","data":{"text":"The session needs a clearer explanation."}}
{"type":"command/done","data":{"commandId":"{{command:1}}","kind":"success","text":"Feedback recorded for session {{parent}}\nAnonymous user: {{anonymous-user}}."}}
{"type":"feedback/message-put","data":{"sessionId":"{{parent}}","item":{"messageId":"{{message:1}}","rating":"negative","note":"Explain the result.","version":"{{feedback-version:1}}","createdAt":0,"updatedAt":0}}}
{"type":"feedback/record","data":{"category":"other"}}
{"type":"feedback/message-put","data":{"sessionId":"{{parent}}","item":{"messageId":"{{message:1}}","rating":"negative","note":"Explain the result.","category":"task-result","version":"{{feedback-version:1}}","createdAt":0,"updatedAt":0}}}
{"type":"feedback/message-put","data":{"sessionId":"{{parent}}","item":{"messageId":"{{message:1}}","rating":"positive","note":"The explanation is clear now.","version":"{{feedback-version:2}}","createdAt":0,"updatedAt":0}}}
{"type":"feedback/message-delete","data":{"sessionId":"{{parent}}","messageId":"{{message:1}}"}}
{"type":"turn/end","data":{"turn":1,"reason":{"kind":"completed"}}}
+30
View File
@@ -2071,6 +2071,36 @@
"symbol": "MessageFeedbackDeleteResult",
"source": "packages/feedback/message-feedback/src/types.ts"
},
{
"doc": "docs/subsystems/feedback.md",
"symbol": "FeedbackCategory",
"source": "packages/feedback/command-feedback/src/types.ts"
},
{
"doc": "docs/subsystems/feedback.md",
"symbol": "FeedbackRecord",
"source": "packages/feedback/command-feedback/src/types.ts"
},
{
"doc": "docs/subsystems/feedback.md",
"symbol": "SessionFeedbackRecordRequest",
"source": "packages/feedback/command-feedback/src/types.ts"
},
{
"doc": "docs/subsystems/feedback.md",
"symbol": "SessionFeedbackRecordValue",
"source": "packages/feedback/command-feedback/src/types.ts"
},
{
"doc": "docs/subsystems/feedback.md",
"symbol": "SessionFeedbackSessionNotFound",
"source": "packages/feedback/command-feedback/src/types.ts"
},
{
"doc": "docs/subsystems/feedback.md",
"symbol": "SessionFeedbackRecordResult",
"source": "packages/feedback/command-feedback/src/types.ts"
},
{
"doc": "packages/client/ui-conversation/README.md",
"symbol": "ComposerChainProps",