@zq-silk/yui 2.2.0 → 2.4.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/README.md +19 -3
- package/dist/artifacts/artifactCapability.js +39 -10
- package/dist/artifacts/imageMetadata.js +120 -0
- package/dist/artifacts/managedGit.js +7 -4
- package/dist/artifacts/taskArtifactRepository.js +6 -0
- package/dist/cli/commandCatalog.js +25 -11
- package/dist/cli/interactionPolicy.js +4 -0
- package/dist/cli/invocationAuthority.js +1 -1
- package/dist/commands/executionAuditCommands.js +5 -0
- package/dist/commands/globalRoleCommands.js +41 -3
- package/dist/commands/projectCommands.js +89 -94
- package/dist/commands/roleSkillValidation.js +4 -8
- package/dist/commands/taskCommands.js +30 -9
- package/dist/commands/taskIntegrationCommands.js +5 -16
- package/dist/commands/taskUsageCommand.js +38 -0
- package/dist/context/roleSessionContext.js +18 -2
- package/dist/context/runContextPack.js +5 -1
- package/dist/context/sessionBootstrapManifest.js +10 -1
- package/dist/context/skillCatalog.js +108 -0
- package/dist/context/skillPackage.js +161 -0
- package/dist/context/taskContext.js +3 -2
- package/dist/context/taskSearch.js +127 -0
- package/dist/controlPlaneCli.js +51 -39
- package/dist/controller/clientRuntime.js +3 -2
- package/dist/controller/fileSchedulerStoreAdapter.js +32 -6
- package/dist/controller/jobControl.js +2 -0
- package/dist/controller/nativeHostInput.js +37 -0
- package/dist/controller/runtime.js +93 -2
- package/dist/controller/runtimeEventInbox.js +2 -2
- package/dist/controller/runtimeEventProcessor.js +3 -3
- package/dist/doctor/doctor.js +10 -0
- package/dist/execution/reviewMainRun.js +1 -0
- package/dist/execution/workItemMainRun.js +1 -0
- package/dist/executor/codexConfigConflict.js +6 -4
- package/dist/executor/effectiveLaunch.js +24 -1
- package/dist/executor/fileRoleLaunchPlanner.js +13 -5
- package/dist/integration/gitIntegrationService.js +15 -79
- package/dist/integration/integrationSourceApplication.js +4 -2
- package/dist/job/httpPreview.js +61 -0
- package/dist/job/jobCleanupInspection.js +67 -0
- package/dist/job/jobRunner.js +12 -2
- package/dist/kernel/builtinCapabilities.js +3 -1
- package/dist/message/message.js +15 -1
- package/dist/output/rolePresentation.js +4 -1
- package/dist/repository/executionLaneGitSnapshot.js +2 -1
- package/dist/repository/gitCompatibility.js +62 -0
- package/dist/repository/gitWorkspace.js +86 -80
- package/dist/repository/gitWorktreeInventory.js +121 -0
- package/dist/repository/project.js +74 -25
- package/dist/repository/taskWorkspaceCoordinator.js +72 -145
- package/dist/repository/taskWorkspacePreparer.js +39 -43
- package/dist/repository/workspaceCleanupInspection.js +88 -7
- package/dist/resources/resourceDiscovery.js +2 -2
- package/dist/resources/resourceGc.js +7 -4
- package/dist/resources/resourceRegistrar.js +18 -11
- package/dist/runtime/agentEndpoint.js +8 -0
- package/dist/runtime/agentHost.js +170 -3
- package/dist/runtime/codexAppServerRuntime.js +1 -1
- package/dist/runtime/codexNativeAccess.js +175 -0
- package/dist/runtime/controlledCodexTui.js +116 -0
- package/dist/runtime/integrationRuntimeIsolation.js +21 -0
- package/dist/runtime/publicReply.js +23 -0
- package/dist/runtime/runtimeObservation.js +48 -0
- package/dist/runtime/structuredProviderHost.js +16 -7
- package/dist/runtime/taskCostMetrics.js +133 -0
- package/dist/runtime/taskRuntimeIsolation.js +91 -21
- package/dist/runtime/taskUsageMetrics.js +11 -2
- package/dist/runtime/taskUsageQuery.js +38 -0
- package/dist/scheduler/taskExecutionProjection.js +2 -0
- package/dist/scheduler/taskObservabilityProjection.js +9 -1
- package/dist/storage/homeLayout.js +13 -0
- package/dist/storage/sqliteSchema.js +44 -0
- package/dist/storage/sqliteStore.js +53 -0
- package/dist/storage/storageVersions.js +1 -1
- package/dist/storage/storeRpc.js +2 -0
- package/dist/storage/taskSearch.js +35 -0
- package/dist/storage/upgrade/projectKnowledgeMigration.js +52 -0
- package/dist/task/archiveDiagnostics.js +26 -8
- package/dist/task/archivePreflight.js +26 -9
- package/dist/task/leaderArchive.js +9 -15
- package/dist/task/ordinaryArchive.js +42 -0
- package/dist/tmux/tmuxManager.js +8 -8
- package/dist/web/assets/assetManifest.js +11 -51
- package/dist/web/assets/client/app/catalog.js +215 -0
- package/dist/web/assets/client/app/main.js +148 -0
- package/dist/web/assets/client/app/selection.js +139 -0
- package/dist/web/assets/client/app/settings.js +326 -0
- package/dist/web/assets/client/app/taskView.js +280 -0
- package/dist/web/assets/client/domain/context.js +96 -0
- package/dist/web/assets/client/domain/records.js +126 -0
- package/dist/web/assets/client/domain/runs.js +119 -0
- package/dist/web/assets/client/domain/taskForms.js +197 -0
- package/dist/web/assets/client/domain/vocab.js +69 -0
- package/dist/web/assets/client/domain/work.js +116 -0
- package/dist/web/assets/client/i18n/en.js +900 -0
- package/dist/web/assets/client/i18n/zh-CN.js +898 -0
- package/dist/web/assets/client/index.js +114 -0
- package/dist/web/assets/client/layout/resizer.js +37 -0
- package/dist/web/assets/client/layout/router.js +35 -0
- package/dist/web/assets/client/layout/shortcuts.js +45 -0
- package/dist/web/assets/client/layout/sizing.js +95 -0
- package/dist/web/assets/client/layout/workspace.js +247 -0
- package/dist/web/assets/client/{api.js → lib/api.js} +28 -4
- package/dist/web/assets/client/{dom.js → lib/dom.js} +24 -12
- package/dist/web/assets/client/{format.js → lib/format.js} +7 -0
- package/dist/web/assets/client/lib/i18n.js +54 -0
- package/dist/web/assets/client/lib/markdown.js +167 -0
- package/dist/web/assets/client/lib/prefs.js +28 -0
- package/dist/web/assets/client/lib/theme.js +68 -0
- package/dist/web/assets/client/ui/containers.js +101 -0
- package/dist/web/assets/client/ui/controls.js +51 -0
- package/dist/web/assets/client/ui/forms.js +48 -0
- package/dist/web/assets/client/ui/metrics.js +137 -0
- package/dist/web/assets/client/ui/primitives.js +92 -0
- package/dist/web/assets/client/ui/text.js +33 -0
- package/dist/web/assets/client/ui/toast.js +12 -0
- package/dist/web/assets/client/views/bodySearch.js +172 -0
- package/dist/web/assets/client/views/createTask.js +85 -0
- package/dist/web/assets/client/views/dock/conversation.js +612 -0
- package/dist/web/assets/client/views/dock/discussion.js +173 -0
- package/dist/web/assets/client/views/dock/preview.js +129 -0
- package/dist/web/assets/client/views/dock/terminal.js +199 -0
- package/dist/web/assets/client/views/globalInput.js +67 -0
- package/dist/web/assets/client/{overview.js → views/overview.js} +62 -56
- package/dist/web/assets/client/{sidebar.js → views/sidebar.js} +56 -62
- package/dist/web/assets/client/views/skills.js +152 -0
- package/dist/web/assets/client/views/task/actions.js +36 -0
- package/dist/web/assets/client/views/task/delivery.js +185 -0
- package/dist/web/assets/client/views/task/deliveryResults.js +159 -0
- package/dist/web/assets/client/views/task/files.js +272 -0
- package/dist/web/assets/client/views/task/observation.js +153 -0
- package/dist/web/assets/client/views/task/overview.js +161 -0
- package/dist/web/assets/client/views/task/page.js +131 -0
- package/dist/web/assets/client/views/task/records.js +163 -0
- package/dist/web/assets/client/views/task/runtime.js +130 -0
- package/dist/web/assets/client/views/task/timeline.js +190 -0
- package/dist/web/assets/shared/geometry.js +19 -0
- package/dist/web/assets/{icons.js → shared/icons.js} +4 -0
- package/dist/web/assets/shared/taskTabs.js +8 -0
- package/dist/web/assets/shared/themes.js +93 -0
- package/dist/web/assets/shell/dialogs.js +63 -0
- package/dist/web/assets/shell/dock.js +40 -0
- package/dist/web/assets/shell/index.js +40 -0
- package/dist/web/assets/shell/settings.js +34 -0
- package/dist/web/assets/shell/sidebar.js +45 -0
- package/dist/web/assets/styles/index.js +41 -0
- package/dist/web/assets/styles/{responsive.js → layout/responsive.js} +15 -13
- package/dist/web/assets/styles/{layout.js → layout/workspace.js} +17 -24
- package/dist/web/assets/styles/markdown.js +22 -3
- package/dist/web/assets/styles/tokens.js +10 -63
- package/dist/web/assets/styles/ui/controls.js +76 -0
- package/dist/web/assets/styles/ui/forms.js +46 -0
- package/dist/web/assets/styles/ui/surfaces.js +122 -0
- package/dist/web/assets/styles/views/delivery.js +29 -0
- package/dist/web/assets/styles/views/dock.js +71 -0
- package/dist/web/assets/styles/views/page.js +32 -0
- package/dist/web/assets/styles/views/records.js +70 -0
- package/dist/web/assets/styles/views/settings.js +26 -0
- package/dist/web/assets/styles/views/sidebar.js +74 -0
- package/dist/web/assets/styles/views/task.js +80 -0
- package/dist/web/assets/styles/views/terminal.js +38 -0
- package/dist/web/taskPreviews.js +205 -0
- package/dist/web/tmuxWebTerminal.js +16 -9
- package/dist/web/webConversation.js +373 -0
- package/dist/web/webMaterials.js +155 -0
- package/dist/web/webServer.js +306 -18
- package/dist/web/webSettings.js +331 -0
- package/dist/web/webSkills.js +86 -0
- package/dist/web/webSnapshot.js +40 -8
- package/dist/web/webTaskSurface.js +114 -9
- package/dist/workspace/gitChangeSetCapture.js +3 -1
- package/docs/managed-turn-and-session-runtime.md +9 -0
- package/docs/managed-turn-and-session-runtime.zh-CN.md +7 -0
- package/docs/observability/README.md +13 -3
- package/docs/observability/README.zh-CN.md +10 -3
- package/docs/release-workflow.md +53 -0
- package/docs/release-workflow.zh-CN.md +40 -0
- package/docs/storage-baseline.md +38 -1
- package/docs/storage-baseline.zh-CN.md +22 -0
- package/docs/task-delivery.md +36 -8
- package/docs/task-delivery.zh-CN.md +24 -7
- package/docs/task-discovery.md +28 -0
- package/docs/testing/verification-levels.md +2 -2
- package/i18n/README.zh-CN.md +4 -3
- package/package.json +1 -1
- package/skills/yui-leader/references/execution.md +2 -1
- package/skills/yui-leader/references/integration.md +20 -0
- package/skills/yui-operator/SKILL.md +4 -0
- package/skills/yui-reviewer/SKILL.md +3 -0
- package/skills/yui-runtime/SKILL.md +4 -0
- package/skills/yui-runtime/references/publication.md +20 -4
- package/skills/yui-worker/SKILL.md +3 -0
- package/dist/web/assets/client/app.js +0 -804
- package/dist/web/assets/client/components.js +0 -418
- package/dist/web/assets/client/detail.js +0 -333
- package/dist/web/assets/client/dock.js +0 -225
- package/dist/web/assets/client/evidence.js +0 -172
- package/dist/web/assets/client/forms.js +0 -230
- package/dist/web/assets/client/i18n.js +0 -1161
- package/dist/web/assets/client/markdown.js +0 -114
- package/dist/web/assets/client/records.js +0 -63
- package/dist/web/assets/client/sections.js +0 -313
- package/dist/web/assets/client/theme.js +0 -71
- package/dist/web/assets/shell.js +0 -161
- package/dist/web/assets/styles/components.js +0 -169
- package/dist/web/assets/styles/views.js +0 -292
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { readArtifactCapability } from "../artifacts/artifactCapability.js";
|
|
2
1
|
import { openTaskArtifactRepository } from "../artifacts/taskArtifactRepository.js";
|
|
2
|
+
import { compareTextArtifacts, readArtifactPreview } from "./webMaterials.js";
|
|
3
|
+
import { readTaskSearchSource } from "../context/taskSearch.js";
|
|
3
4
|
import { applyGlobalInputControl } from "../commands/globalRoleCommands.js";
|
|
4
|
-
import { applyTaskInputControl, sendTaskMessageCommand, updateTaskMetadataCommand } from "../commands/taskCommands.js";
|
|
5
|
+
import { applyTaskInputControl, runTaskCommand, sendTaskMessageCommand, updateTaskMetadataCommand } from "../commands/taskCommands.js";
|
|
6
|
+
import { runTaskActivationCommand } from "../commands/taskActivationCommands.js";
|
|
5
7
|
import { runTaskInputCommand } from "../commands/taskInputCommands.js";
|
|
6
|
-
import { inspectTaskContext, readTaskContext, readTaskContextDelta, withContextObservations } from "../context/taskContext.js";
|
|
8
|
+
import { inspectTaskContext, listTaskContext, readTaskContext, readTaskContextDelta, withContextObservations } from "../context/taskContext.js";
|
|
7
9
|
import { BUILTIN_CAPABILITIES } from "../kernel/builtinCapabilities.js";
|
|
8
10
|
import { capabilitySchemaError } from "../kernel/capabilitySchema.js";
|
|
9
11
|
import { recordGlobalInterruptResult, recordGlobalSteerResult } from "../message/globalInterrupt.js";
|
|
10
12
|
import { recordTaskInterruptResult } from "../message/taskInterrupt.js";
|
|
11
13
|
import { AGENT_HOST_CONTROL_PROTOCOL, foldInterruptLiveReceipt, foldSteerLiveReceipt, sendAgentHostCancelControl, sendAgentHostSteerControl } from "../runtime/agentHost.js";
|
|
14
|
+
import { validateOrdinaryTaskArchive } from "../task/ordinaryArchive.js";
|
|
12
15
|
import { webLocalMutation, WebRequestRejected } from "./webMutation.js";
|
|
13
16
|
const DEFAULT_WEB_HOST_CONTROL = {
|
|
14
17
|
steer: sendAgentHostSteerControl,
|
|
@@ -29,7 +32,7 @@ function controlTarget(taskId, input) {
|
|
|
29
32
|
* its token before using this port; input never supplies a caller or Role.
|
|
30
33
|
* Managed capability RPC keeps its own Session authentication unchanged.
|
|
31
34
|
*/
|
|
32
|
-
export function createWebTaskSurface(store, options = {}, observations = [], hostControl = DEFAULT_WEB_HOST_CONTROL) {
|
|
35
|
+
export function createWebTaskSurface(store, options = {}, observations = [], hostControl = DEFAULT_WEB_HOST_CONTROL, lifecycle) {
|
|
33
36
|
const environment = {};
|
|
34
37
|
const commandOptions = { ...options, environment, runtime: undefined };
|
|
35
38
|
// Notifications are after the outer transaction. Their failure must not be
|
|
@@ -39,26 +42,120 @@ export function createWebTaskSurface(store, options = {}, observations = [], hos
|
|
|
39
42
|
? { kind: "role", taskId, roleName: "leader" } : { kind: "task", taskId });
|
|
40
43
|
};
|
|
41
44
|
return {
|
|
45
|
+
workbench: (taskId) => store.transaction(tx => {
|
|
46
|
+
const task = tx.getTask(taskId);
|
|
47
|
+
if (!task)
|
|
48
|
+
throw new WebRequestRejected("Task not found.");
|
|
49
|
+
const brief = tx.getTaskBrief(taskId);
|
|
50
|
+
const clip = (value) => value === undefined ? undefined
|
|
51
|
+
: value.length > 1200 ? value.slice(0, 1200) + "…" : value;
|
|
52
|
+
return {
|
|
53
|
+
core: readTaskContext(tx, taskId, environment),
|
|
54
|
+
task: {
|
|
55
|
+
id: task.id, title: clip(task.title), status: task.status, updatedAt: task.updatedAt,
|
|
56
|
+
executionGate: task.executionGate, priority: task.priority, tags: task.tags?.slice(0, 16).map(value => clip(value)),
|
|
57
|
+
projectBindings: task.projectBindings.slice(0, 32),
|
|
58
|
+
description: clip(task.description), completionSummary: clip(task.completionSummary),
|
|
59
|
+
retirementSummary: clip(task.retirementSummary), archiveSummary: clip(task.archiveSummary),
|
|
60
|
+
archiveReason: clip(task.archiveReason),
|
|
61
|
+
activationRequest: task.activationRequest && {
|
|
62
|
+
disposition: task.activationRequest.disposition,
|
|
63
|
+
outcome: clip(task.activationRequest.outcome),
|
|
64
|
+
operation: { requestId: task.activationRequest.operation.requestId }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
evidence: {
|
|
68
|
+
reviews: tx.listReviewRounds(taskId).sort((a, b) => b.createdAt.localeCompare(a.createdAt)).slice(0, 3)
|
|
69
|
+
.map(round => ({
|
|
70
|
+
id: round.id, status: round.status, runId: round.reviewerRunId,
|
|
71
|
+
excerpt: round.reviewerRunId ? clip(tx.getRun(taskId, round.reviewerRunId)?.result?.output) : undefined
|
|
72
|
+
})),
|
|
73
|
+
integrations: tx.listIntegrationAttempts(taskId).sort((a, b) => b.createdAt.localeCompare(a.createdAt)).slice(0, 3)
|
|
74
|
+
.map(attempt => ({
|
|
75
|
+
id: attempt.id, status: attempt.status, summary: clip(attempt.summary),
|
|
76
|
+
checks: attempt.checks?.slice(0, 8).map(check => ({ name: clip(check.name), outcome: check.outcome }))
|
|
77
|
+
}))
|
|
78
|
+
},
|
|
79
|
+
brief: brief && {
|
|
80
|
+
objective: clip(brief.objective), currentFocus: clip(brief.currentFocus),
|
|
81
|
+
leaderSummary: clip(brief.leaderSummary), technicalApproach: clip(brief.technicalApproach),
|
|
82
|
+
boundaries: brief.boundaries?.slice(0, 8).map(value => clip(value)),
|
|
83
|
+
updatedAt: brief.updatedAt
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}),
|
|
87
|
+
projects: (after) => {
|
|
88
|
+
const projects = store.listProjects().filter(project => project.status === "active")
|
|
89
|
+
.sort((a, b) => a.id.localeCompare(b.id));
|
|
90
|
+
const remaining = projects.filter(project => after === undefined || project.id.localeCompare(after) > 0);
|
|
91
|
+
const page = remaining.slice(0, 40);
|
|
92
|
+
return { projects: page.map(({ id, name }) => ({ id, name: name.slice(0, 200) })),
|
|
93
|
+
total: projects.length, nextCursor: remaining.length > page.length ? page.at(-1).id : null };
|
|
94
|
+
},
|
|
95
|
+
create: (input) => {
|
|
96
|
+
const result = webLocalMutation(store, tx => {
|
|
97
|
+
// A lost response must be reconciled, never create another Task.
|
|
98
|
+
if (tx.listTasks().some(task => tx.listMessages(task.id)
|
|
99
|
+
.some(message => message.submissionKey === input.requestId))) {
|
|
100
|
+
throw new Error("This creation request was already saved; inspect the Task catalog before continuing.");
|
|
101
|
+
}
|
|
102
|
+
const created = runTaskCommand(["create", input.title,
|
|
103
|
+
...input.projectIds.flatMap(id => ["--project", id])], tx, commandOptions);
|
|
104
|
+
if (created.kind !== "output")
|
|
105
|
+
throw new Error("Unexpected Task creation result.");
|
|
106
|
+
const taskId = created.data.task.id;
|
|
107
|
+
updateTaskMetadataCommand(tx, taskId, { description: input.requirements }, commandOptions);
|
|
108
|
+
const submitted = sendTaskMessageCommand(tx, taskId, input.requirements, commandOptions, undefined, input.plan ? "discuss" : "record", input.requestId);
|
|
109
|
+
return { task: submitted.task, submission: submitted.feedback, messageId: submitted.message.id };
|
|
110
|
+
});
|
|
111
|
+
notify(result.task.id, input.plan);
|
|
112
|
+
return result;
|
|
113
|
+
},
|
|
114
|
+
activate: (taskId, requestId) => {
|
|
115
|
+
const result = webLocalMutation(store, tx => runTaskActivationCommand([
|
|
116
|
+
"request", taskId, "--request-id", requestId, "--environment", "empty"
|
|
117
|
+
], tx, commandOptions));
|
|
118
|
+
notify(taskId);
|
|
119
|
+
return result.kind === "output" ? result.data : result;
|
|
120
|
+
},
|
|
121
|
+
archive: async (taskId) => {
|
|
122
|
+
if (!lifecycle)
|
|
123
|
+
throw new WebRequestRejected("Ordinary archive is unavailable.");
|
|
124
|
+
// Preflight rejection precedes any physical effects; later errors remain
|
|
125
|
+
// unknown and must be reconciled from the Task and archive diagnostics.
|
|
126
|
+
webLocalMutation(store, tx => validateOrdinaryTaskArchive(tx, taskId, commandOptions));
|
|
127
|
+
return lifecycle.archive(taskId);
|
|
128
|
+
},
|
|
42
129
|
evidence: (taskId) => store.transaction(reader => {
|
|
43
130
|
if (reader.getTask(taskId) === null)
|
|
44
131
|
throw new WebRequestRejected("Task not found.");
|
|
45
132
|
return { taskId, integrations: reader.listIntegrationAttempts(taskId),
|
|
46
133
|
reviews: reader.listReviewRounds(taskId), workspaces: reader.listManagedWorkspaces(taskId) };
|
|
47
134
|
}),
|
|
48
|
-
artifacts: async (taskId) => {
|
|
135
|
+
artifacts: async (taskId, selectedCommit, offset = 0) => {
|
|
49
136
|
if (store.getTask(taskId) === null)
|
|
50
137
|
throw new WebRequestRejected("Task not found.");
|
|
51
138
|
const repo = openTaskArtifactRepository(store.rootDirectory(), taskId);
|
|
52
|
-
|
|
139
|
+
if (selectedCommit !== undefined && !repo.exists())
|
|
140
|
+
throw new WebRequestRejected("Artifact revision unavailable.");
|
|
141
|
+
const commit = selectedCommit ?? await repo.head();
|
|
53
142
|
const entries = commit === null ? [] : await repo.list(commit);
|
|
54
|
-
|
|
143
|
+
if (!Number.isSafeInteger(offset) || offset < 0 || offset > entries.length)
|
|
144
|
+
throw new WebRequestRejected("Invalid artifact offset.");
|
|
145
|
+
return { taskId, commit, entries: entries.slice(offset, offset + 40), total: entries.length,
|
|
146
|
+
nextOffset: offset + 40 < entries.length ? offset + 40 : null };
|
|
55
147
|
},
|
|
56
|
-
artifact: async (taskId, relativePath, commit) => {
|
|
148
|
+
artifact: async (taskId, relativePath, commit, offset = 0) => {
|
|
57
149
|
if (store.getTask(taskId) === null)
|
|
58
150
|
throw new WebRequestRejected("Task not found.");
|
|
59
151
|
// The browser always names a fixed revision. Never substitute HEAD after
|
|
60
152
|
// a missing object, and never execute/render artifact HTML as an app.
|
|
61
|
-
return
|
|
153
|
+
return readArtifactPreview(store.rootDirectory(), taskId, { taskId, relativePath, commit }, offset);
|
|
154
|
+
},
|
|
155
|
+
artifactDiff: async (taskId, relativePath, commit, beforeCommit, offset = 0) => {
|
|
156
|
+
if (store.getTask(taskId) === null)
|
|
157
|
+
throw new WebRequestRejected("Task not found.");
|
|
158
|
+
return compareTextArtifacts(store.rootDirectory(), taskId, { taskId, relativePath, commit: beforeCommit }, { taskId, relativePath, commit }, offset);
|
|
62
159
|
},
|
|
63
160
|
globalState: (roleName) => {
|
|
64
161
|
const role = store.getGlobalRole(roleName);
|
|
@@ -247,7 +344,15 @@ export function createWebTaskSurface(store, options = {}, observations = [], hos
|
|
|
247
344
|
},
|
|
248
345
|
read: async (taskId) => withContextObservations(readTaskContext(store, taskId, environment), observations),
|
|
249
346
|
delta: (taskId, input) => readTaskContextDelta(store, taskId, input, environment),
|
|
347
|
+
searchSource: (taskId, input) => readTaskSearchSource(store, taskId, input, environment),
|
|
250
348
|
inspect: (taskId, input) => inspectTaskContext(store, taskId, input, environment),
|
|
349
|
+
// The same paged family discovery as `task context list`: summaries and
|
|
350
|
+
// exact references, never bodies; continuations keep their filters.
|
|
351
|
+
list: (taskId, input) => listTaskContext(store, taskId, input.store, {
|
|
352
|
+
...(input.status === undefined ? {} : { status: input.status }),
|
|
353
|
+
...(input.cursor === undefined ? {} : { cursor: input.cursor }),
|
|
354
|
+
...(input.limit === undefined ? {} : { limit: input.limit })
|
|
355
|
+
}, environment),
|
|
251
356
|
update: (taskId, input) => {
|
|
252
357
|
const descriptor = BUILTIN_CAPABILITIES.find((entry) => entry.name === "task.update");
|
|
253
358
|
const error = capabilitySchemaError(descriptor.inputSchema, { taskId, patch: input });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { execFile } from "node:child_process";
|
|
2
2
|
import { promisify } from "node:util";
|
|
3
|
+
import { supportedGit } from "../repository/gitCompatibility.js";
|
|
3
4
|
const executeFile = promisify(execFile);
|
|
4
5
|
export async function captureManagedGitChanges(input) {
|
|
5
6
|
await assertManagedHead(input);
|
|
@@ -61,8 +62,9 @@ async function assertManagedHead(input) {
|
|
|
61
62
|
return headCommit;
|
|
62
63
|
}
|
|
63
64
|
async function git(args) {
|
|
65
|
+
const program = supportedGit();
|
|
64
66
|
try {
|
|
65
|
-
const result = await executeFile(
|
|
67
|
+
const result = await executeFile(program.path, [...args], {
|
|
66
68
|
encoding: "utf8",
|
|
67
69
|
maxBuffer: 16 * 1024 * 1024,
|
|
68
70
|
timeout: 120_000
|
|
@@ -276,6 +276,15 @@ Queue/steer require `--request-id`; steer/interrupt require `--expected-target`.
|
|
|
276
276
|
These commands retain the caller's existing Session authority; do not fabricate
|
|
277
277
|
a Task/Run or borrow the browser's user authority. Configuration remains under
|
|
278
278
|
`config role`, lifecycle under `session`. New controlled Global Sessions use the Host console.
|
|
279
|
+
The current controlled Codex Operator and Task Leader can also open a native
|
|
280
|
+
TUI view from Web Terminal. Its authenticated loopback relay attaches to the
|
|
281
|
+
Host's existing App Server connection and exact Thread. Complete text prompts,
|
|
282
|
+
steer and interrupt reuse Host admission and settlement; native server requests
|
|
283
|
+
retain their original request/Thread/Turn identity. Configuration overrides and
|
|
284
|
+
new/forked Threads are rejected. Web uses the existing terminal writer lease;
|
|
285
|
+
other browser windows remain read-only until the writer detaches. Closing this
|
|
286
|
+
view does not stop the Host or Provider. Conversation and native history remain
|
|
287
|
+
views of the same Provider facts, not a second Task message store.
|
|
279
288
|
A live unmanaged Session is not silently adopted; an explicit Session lifecycle
|
|
280
289
|
action is needed first.
|
|
281
290
|
|
|
@@ -223,6 +223,13 @@ queue/steer 要求 `--request-id`,steer/interrupt 要求 `--expected-target`
|
|
|
223
223
|
配置仍使用 `config role`,生命周期使用 `session`。新的受控 Global Session 使用 Host console。活动的非受管 Session
|
|
224
224
|
不会被静默采用,需要先执行显式的 Session 生命周期操作。
|
|
225
225
|
|
|
226
|
+
当前受控 Codex Operator 与 Task Leader 也可从 Web Terminal 打开原生 TUI 视图。
|
|
227
|
+
经过认证的本地 relay 连接 Host 现有 App Server 连接中的精确 Thread;完整文本、
|
|
228
|
+
steer 和 interrupt 复用 Host 准入与回执,原生问题/审批保留原 request/Thread/Turn
|
|
229
|
+
身份。配置覆盖和新建/派生 Thread 被拒绝。Web 复用已有终端 writer lease,
|
|
230
|
+
其他窗口在 writer 脱离前保持只读。关闭视图不会停止 Host 或 Provider。会话与
|
|
231
|
+
原生历史仍来自同一 Provider 事实,不建立另一份 Task 消息存储。
|
|
232
|
+
|
|
226
233
|
## 精确结果
|
|
227
234
|
|
|
228
235
|
原生终态只结算相匹配的那次执行。已知的原生 Turn ID 必须匹配;串行流可以使用已证明的
|
|
@@ -58,8 +58,16 @@ Session with settled native input is idle rather than a false runtime failure.
|
|
|
58
58
|
|
|
59
59
|
## Web attention and progress
|
|
60
60
|
|
|
61
|
-
Task detail
|
|
62
|
-
and
|
|
61
|
+
Task detail has four tabs. **Overview** shows needs your input, Task progress,
|
|
62
|
+
goal and key Decisions. **Delivery** shows WorkItems, Reviews, Integration and
|
|
63
|
+
remote delivery, files and workspaces; its evidence is read when the tab opens.
|
|
64
|
+
**Runtime** shows Roles with their Session activity, open execution and
|
|
65
|
+
operations, usage and diagnostics. **Records** is a paged timeline of Decisions,
|
|
66
|
+
milestones, executions and questions plus Task facts; finished rows read their
|
|
67
|
+
exact record when opened. Messages live in the Discussion dock, oldest first,
|
|
68
|
+
with earlier ones listed on request.
|
|
69
|
+
|
|
70
|
+
InputRequests retain their original answer controls and
|
|
63
71
|
bounded Context counts; a partial read is not an empty inbox. Technical attention
|
|
64
72
|
names the owner from the existing execution projection. An assigned owner does
|
|
65
73
|
not imply work started, and a diagnostic hint is not new user authorization.
|
|
@@ -81,7 +89,7 @@ Current Decisions show their rationale/source; superseded ones remain in history
|
|
|
81
89
|
Reports and recommendations are not relabelled as user approval. Core Context
|
|
82
90
|
remains readable when its independent observation fails.
|
|
83
91
|
|
|
84
|
-
**
|
|
92
|
+
**Delivery** reads files only on request. A selected commit-pinned
|
|
85
93
|
text survives refresh and newer file listings; switching versions is explicit.
|
|
86
94
|
A missing revision fails visibly, never substitutes HEAD. HTML/scripts stay
|
|
87
95
|
text, never an executing preview. Copying a source sends nothing; discussion
|
|
@@ -100,6 +108,8 @@ All routes use the local Web token and Task boundary.
|
|
|
100
108
|
`GET /api/tasks/<id>/artifacts` lists a fixed repository revision;
|
|
101
109
|
`?path=<relative-path>&commit=<full-commit>` reads its exact text file.
|
|
102
110
|
`GET /api/tasks/<id>/evidence` reads original check/Review/workspace records.
|
|
111
|
+
`GET /api/tasks/<id>/list?store=<family>[&status&cursor&limit]` returns the same
|
|
112
|
+
paged summaries as `task context list`.
|
|
103
113
|
These reads do not start a runtime, fetch a remote, write business state, require
|
|
104
114
|
a migration, or introduce a new persistent protocol.
|
|
105
115
|
|
|
@@ -51,7 +51,12 @@ AgentRun,Role 状态也包含其原生准入/活动;当某个 WorkItem 处
|
|
|
51
51
|
|
|
52
52
|
## Web 用户关注与进展
|
|
53
53
|
|
|
54
|
-
Task
|
|
54
|
+
Task 详情分为四个页签。「概览」展示需要你处理的事项、任务进展、目标和关键决定;
|
|
55
|
+
「交付」展示工作项、评审、集成与远程交付、文件和工作区,打开页签时才读取证据;
|
|
56
|
+
「运行」展示各 Role 及其会话活动、进行中的执行与操作、用量和诊断;
|
|
57
|
+
「记录」是决定、里程碑、执行与问题的分页时间线及任务信息,已结束的条目展开时
|
|
58
|
+
才读取精确记录。消息在讨论侧栏中按时间正序显示,更早的消息按需列出。
|
|
59
|
+
|
|
55
60
|
InputRequest 保留原回答入口和有界 Context 计数;部分读取不等于空待办。
|
|
56
61
|
技术关注从既有执行投影取得负责人;有负责人不代表已开始处理,诊断提示
|
|
57
62
|
也不自动成为新的用户授权。
|
|
@@ -68,7 +73,7 @@ Controller 已负责的有界 Provider 重试显示为等待,不误称停止
|
|
|
68
73
|
ETA 或实质检查点。当前 Decision 展示理由与来源,已替代决定留在历史;
|
|
69
74
|
报告与建议不改称用户批准。独立观察失败时,核心 Context 仍可读取。
|
|
70
75
|
|
|
71
|
-
|
|
76
|
+
「交付」仅按需读文件。固定提交的文本阅读在刷新和读取新列表后仍保留,
|
|
72
77
|
切换版本必须显式选择;固定版本缺失就报错,不回退 HEAD。
|
|
73
78
|
HTML/脚本只作为文本,不执行预览。复制来源不发送内容,讨论仍走原 Message
|
|
74
79
|
表单、显式意图及回执;自动刷新保留未提交输入。
|
|
@@ -83,7 +88,9 @@ skipped/缺失检查不算通过。工作区所有权不证明可清理;既
|
|
|
83
88
|
所有入口沿用本地 Web token 与 Task 边界。
|
|
84
89
|
`GET /api/tasks/<id>/artifacts` 列出固定仓库版本;
|
|
85
90
|
`?path=<relative-path>&commit=<full-commit>` 读取该版本文本;
|
|
86
|
-
`GET /api/tasks/<id>/evidence` 读取原检查/Review
|
|
91
|
+
`GET /api/tasks/<id>/evidence` 读取原检查/Review/工作区记录;
|
|
92
|
+
`GET /api/tasks/<id>/list?store=<family>[&status&cursor&limit]` 返回与
|
|
93
|
+
`task context list` 相同的分页摘要。
|
|
87
94
|
读取不启动运行时、不访问远端、不写业务状态、不引入迁移或新持久协议。
|
|
88
95
|
|
|
89
96
|
## 执行审计
|
package/docs/release-workflow.md
CHANGED
|
@@ -51,6 +51,59 @@ merely to avoid a version decision. Package versions remain distinct from protoc
|
|
|
51
51
|
and persistent-storage contracts: their compatibility checks and required migrations
|
|
52
52
|
are unchanged, and the storage rules below do not authorize a package release.
|
|
53
53
|
|
|
54
|
+
### 2.4.0 compatibility and migration notes
|
|
55
|
+
|
|
56
|
+
This minor ships the unified Web Task/Operator conversations and same-thread
|
|
57
|
+
Codex terminal access, Task workbench, settings, text materials, pinned
|
|
58
|
+
Markdown/image previews, bounded search and exact selection references,
|
|
59
|
+
Task-owned HTTP previews, current-Session model/Slash controls, Skill browsing
|
|
60
|
+
and explicit bindings. Knowledge applicability, complete frozen Skill packages,
|
|
61
|
+
and sourced usage/cost evidence are included. Git 2.29+ compatibility and the
|
|
62
|
+
Task109 model-validation, terminal-reader isolation and unknown-send recovery
|
|
63
|
+
fixes are included; Task110's unmerged work is not part of this release.
|
|
64
|
+
|
|
65
|
+
Storage is now **1.6**. Use the supported centralized, contiguous same-major
|
|
66
|
+
upgrade path for older supported Homes; do not edit stored records manually.
|
|
67
|
+
Historical missing cost remains unknown. Old Skill provenance is not rebuilt
|
|
68
|
+
from today's files: if restoring an old Session reports missing frozen-package
|
|
69
|
+
evidence, follow its new-Session guidance while preserving the old history.
|
|
70
|
+
Current model adoption is connection-local and does not change future defaults;
|
|
71
|
+
exit the Host-owned native TUI before changing its model (closing a viewer only
|
|
72
|
+
detaches it). Unknown sends must be inspected by their original request ID,
|
|
73
|
+
not replayed from a fresh tab. These are explicit behavioral boundaries, not
|
|
74
|
+
a general backward-compatibility promise.
|
|
75
|
+
|
|
76
|
+
The [Task109 report](testing/web-coverage-final.md) records Linux browser and
|
|
77
|
+
real-model evidence with its original platform and sandbox limitations.
|
|
78
|
+
Official CI/package smoke is separate evidence, not macOS browser/live-model
|
|
79
|
+
coverage. Real-model checks remain opt-in. Publishing this package does not
|
|
80
|
+
upgrade the global CLI, migrate a user's Home or restart their Controller.
|
|
81
|
+
|
|
82
|
+
### 2.3.0 compatibility and migration notes
|
|
83
|
+
|
|
84
|
+
This minor release separates Task acceptance and verified remote delivery from
|
|
85
|
+
immutable Integration history and temporary workspace cleanup. Integration
|
|
86
|
+
history remains readable after its workspace is released.
|
|
87
|
+
|
|
88
|
+
Automation that previously treated leftover workspaces as an unconditional
|
|
89
|
+
archive blocker must now inspect business settlement, exact delivery and runtime
|
|
90
|
+
quiescence separately from physical cleanup. Ordinary archive releases safe
|
|
91
|
+
resources child-first and retains dirty, unknown or live resources with their
|
|
92
|
+
ownership and diagnostics. `--force` is separate explicit authority; it neither
|
|
93
|
+
proves delivery or quiescence nor permits discarding retained data.
|
|
94
|
+
|
|
95
|
+
For an ordinary Integration conflict, resolve and stage files in that attempt's
|
|
96
|
+
workspace, then run `yui task integration continue <task>/<integration>`.
|
|
97
|
+
Do not create a replacement attempt or require a manual-resolution decision
|
|
98
|
+
just for a normal Git conflict. Cleanup uses exact ownership and Git
|
|
99
|
+
registrations; missing paths alone do not establish that cleanup is complete.
|
|
100
|
+
|
|
101
|
+
These are behavioral changes under Yui's minor-version convention. There is no
|
|
102
|
+
new persistent schema or storage migration in 2.3.0. Existing Task and
|
|
103
|
+
Integration evidence is preserved. This package release does not itself
|
|
104
|
+
install the global CLI, activate a runtime or restart a Controller. Users
|
|
105
|
+
upgrading from 2.1.0 must also apply the 2.2.0 API guidance below.
|
|
106
|
+
|
|
54
107
|
### 2.2.0 compatibility and migration notes
|
|
55
108
|
|
|
56
109
|
This minor release adds the independent `yui agent` entry, explicit model/tool
|
|
@@ -36,6 +36,46 @@ Agent 选择一个预先声明的计划,设施从持久状态驱动该计划
|
|
|
36
36
|
不能将不兼容冒称为兼容,也不为回避版本选择新增历史兼容机制。包版本与协议、
|
|
37
37
|
持久存储契约仍然独立:兼容性检查和必要迁移要求不变,下文存储规则不授予发版权限。
|
|
38
38
|
|
|
39
|
+
### 2.4.0 兼容性及迁移说明
|
|
40
|
+
|
|
41
|
+
本 minor 发布统一 Web Task/Operator 对话及同 Thread Codex 终端、任务工作台、
|
|
42
|
+
设置、文本材料、固定版本 Markdown/图片预览、有界检索与精确选区引用、
|
|
43
|
+
Task-owned HTTP 预览、当前 Session 模型/Slash 操作,以及 Skill 浏览和显式绑定。
|
|
44
|
+
同时包含 Knowledge 适用范围、完整冻结 Skill 包、具来源的用量/费用证据、
|
|
45
|
+
Git 2.29+ 支持,以及 Task109 的模型校验、终端读者隔离和未知发送恢复修复。
|
|
46
|
+
Task110 尚未合入的工作不属于本版本。
|
|
47
|
+
|
|
48
|
+
存储版本现为 **1.6**。旧的受支持 Home 应走集中、连续的同主版本升级路径,
|
|
49
|
+
不要手工修改存储记录。历史缺失费用仍为未知;旧 Skill 来源不会从今天的文件
|
|
50
|
+
补造。恢复旧 Session 若提示缺少冻结包证据,应保留旧历史并按提示建立新 Session。
|
|
51
|
+
当前模型操作只作用于本次连接,不修改未来默认值;切换模型前须退出 Host 持有的
|
|
52
|
+
原生 TUI,关闭浏览器查看器仅断开查看。未知发送必须查询原 request-id,
|
|
53
|
+
不能通过新标签页重放。这些是明确的行为边界,不是一般向后兼容承诺。
|
|
54
|
+
|
|
55
|
+
[Task109 报告](testing/web-coverage-final.md) 保留 Linux 浏览器和真实模型证据,
|
|
56
|
+
以及原平台/沙箱限制。正式 CI/安装包冒烟是独立证据,不代表 macOS 浏览器或
|
|
57
|
+
真实模型覆盖。真实模型测试保持 opt-in。发布本包不会升级全局 CLI、迁移用户
|
|
58
|
+
Home 或重启其 Controller。
|
|
59
|
+
|
|
60
|
+
### 2.3.0 兼容性及迁移说明
|
|
61
|
+
|
|
62
|
+
本次 minor 将 Task 验收与已核验的远端交付、不可变 Integration 历史、
|
|
63
|
+
临时工作区清理分开。释放工作区后,Integration 历史仍可读取。
|
|
64
|
+
|
|
65
|
+
此前把残留工作区一律视为归档阻塞的自动化,现在应分别检查业务结算、
|
|
66
|
+
精确交付与运行时静默,以及物理清理结果。普通归档按子资源优先释放安全资源,
|
|
67
|
+
保留脏、未知或仍存活的资源及其所有权、诊断。`--force` 需要单独明确授权;
|
|
68
|
+
它不证明交付或静默,也不允许丢弃被保留的数据。
|
|
69
|
+
|
|
70
|
+
普通 Integration 冲突应在原 attempt 的工作区解决并 stage,然后执行
|
|
71
|
+
`yui task integration continue <task>/<integration>`。不要仅因普通 Git 冲突
|
|
72
|
+
另建 attempt 或要求 manual-resolution 决策。清理依赖精确所有权与 Git 登记;
|
|
73
|
+
路径缺失本身不代表清理完成。
|
|
74
|
+
|
|
75
|
+
这些是 Yui minor 编号约定下的行为变化。2.3.0 没有新的持久 schema 或存储迁移,
|
|
76
|
+
保留现有 Task 与 Integration 证据。发布包本身不会安装全局 CLI、激活运行时
|
|
77
|
+
或重启 Controller。从 2.1.0 升级的用户还需遵循下文 2.2.0 API 指引。
|
|
78
|
+
|
|
39
79
|
### 2.2.0 兼容性及迁移说明
|
|
40
80
|
|
|
41
81
|
本 minor 增加独立 `yui agent` 入口、显式模型/工具配置、持久本地会话、上下文压缩、
|
package/docs/storage-baseline.md
CHANGED
|
@@ -2,11 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
# Storage baseline 1.0
|
|
4
4
|
|
|
5
|
-
Current storage is 1.
|
|
5
|
+
Current storage is 1.6. The declared 1.5 → 1.6 transition adds optional
|
|
6
|
+
source-attributed monetary evidence to canonical runtime observations. Existing
|
|
7
|
+
observations remain unchanged: absent amounts and prices stay unknown. The SQL
|
|
8
|
+
layout is unchanged.
|
|
9
|
+
|
|
10
|
+
The declared 1.3 → 1.4 transition gives Project
|
|
11
|
+
Knowledge applicability and exact version history, and updates proposal
|
|
12
|
+
fingerprints to include applicability and replacement intent. It restores
|
|
13
|
+
`scope`/`expiresWhen` only from an exact matching accepted proposal. Migrated
|
|
14
|
+
knowledge starts at version 1 of the observed head; older proposals remain
|
|
15
|
+
available, but missing historical edits are not invented. Frozen Context
|
|
16
|
+
snapshots and their digests are unchanged. The SQL layout is unchanged.
|
|
17
|
+
|
|
18
|
+
The declared 1.2 → 1.3 transition adds optional exact Session fences to
|
|
19
|
+
structured inputs and permits their explicit nondelivery reason without an
|
|
20
|
+
Assignment. Existing Role-addressed inputs remain unchanged.
|
|
21
|
+
|
|
22
|
+
The declared 1.1 → 1.2 transition adds optional
|
|
6
23
|
CapabilityGrant authorization-source evidence and native-human input/archive
|
|
7
24
|
audit records. Existing valid Operator grants remain unchanged; migration does
|
|
8
25
|
not infer or invent past user authority. The SQL layout is unchanged.
|
|
9
26
|
|
|
27
|
+
The 1.4 → 1.5 transition introduces complete Skill package references in
|
|
28
|
+
effective launch snapshots and Session Manifests. Historical records and their
|
|
29
|
+
digests are preserved byte-for-byte; missing package metadata explicitly means
|
|
30
|
+
legacy entrypoint-only/unrecorded evidence. Migration cannot recover resources
|
|
31
|
+
that were never captured. Existing running Hosts keep their original inputs;
|
|
32
|
+
restoring a legacy Session requires explicitly selecting a new Session. No
|
|
33
|
+
ordinary reader backfills historical versions from mutable sources.
|
|
34
|
+
|
|
35
|
+
New launches snapshot raw resources under `runtime/skill-packages/<digest>`.
|
|
36
|
+
The version covers sorted relative paths, SHA-256 byte digests, sizes and
|
|
37
|
+
executable flags. Builtin Skills share a complete sibling tree to preserve
|
|
38
|
+
cross-Role references; configured Skills are bounded to their own directory.
|
|
39
|
+
Symlinks and special files are rejected, as are packages exceeding 2,048 files,
|
|
40
|
+
8 MiB per file, 32 MiB total or 32 directory levels. Scripts are retained,
|
|
41
|
+
never run on import. Sources must be readable and physically rooted.
|
|
42
|
+
Sessions and AgentRuns retain the compact source/version/inventory pointers;
|
|
43
|
+
file bodies stay in the package. Changing a source affects a new Session only.
|
|
44
|
+
Lost or corrupted packages fail closed rather than being rebuilt from current
|
|
45
|
+
sources.
|
|
46
|
+
|
|
10
47
|
Yui 1.0.0 starts from one clean persistent contract. The package version,
|
|
11
48
|
storage schema, record envelopes and Controller protocol are separate
|
|
12
49
|
identities; none is inferred from another.
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
# 存储基线 1.0
|
|
4
4
|
|
|
5
|
+
当前存储为 1.5。已声明的 1.3 → 1.4 迁移为正式项目知识增加适用信息和精确版本历史,
|
|
6
|
+
并将提案指纹扩展到适用范围、失效条件及替代意图。仅从精确匹配的已接受提案恢复
|
|
7
|
+
`scope`/`expiresWhen`;存量知识以已观察到的当前内容建立版本 1,不臆造缺失的修改历史。
|
|
8
|
+
已有提案的身份、审批和来源保留,冻结的 Context 快照及摘要不改写。物理 SQL 结构不变。
|
|
9
|
+
|
|
10
|
+
既有 1.2 → 1.3 迁移为结构化输入增加可选的精确 Session 限定和无 Assignment
|
|
11
|
+
时的明确未投递原因;既有按 Role 寻址的输入保持原样,不推断历史 Session 选择。
|
|
12
|
+
|
|
13
|
+
1.4 → 1.5 在现有 effective launch 和 Session
|
|
14
|
+
Manifest 中新增完整 Skill 包引用,不改 SQL 布局。历史记录与摘要原样保留;
|
|
15
|
+
缺少包元数据明确表示旧版只记录入口正文或没有装载证据,不能拿当前源目录
|
|
16
|
+
补造历史版本。运行中的旧 Host 保留原输入;恢复缺少包快照的旧 Session 时
|
|
17
|
+
会给出需要显式创建新 Session 的诊断,不在普通读取中迁移或回填。
|
|
18
|
+
|
|
19
|
+
新 Session 将资源保存到 `runtime/skill-packages/<digest>`,摘要覆盖排序后的
|
|
20
|
+
相对路径、原始文件字节摘要、大小与可执行标志。内置 Skills 共享完整兄弟目录,
|
|
21
|
+
保留跨 Role 相对引用;自定义 Skill 限于其自身目录。拒绝符号链接、特殊文件,
|
|
22
|
+
以及超过 2,048 个文件、单文件 8 MiB、总计 32 MiB 或 32 层目录的包。
|
|
23
|
+
脚本只保存,不因装载而执行。Session、AgentRun、CLI 和 Web 复用精简来源、
|
|
24
|
+
版本与资源清单引用,不复制大文件正文。源更新只影响新 Session;快照丢失或
|
|
25
|
+
损坏明确报错,不从当前源目录重建。
|
|
26
|
+
|
|
5
27
|
Yui 1.0.0 从唯一、纯净的持久化契约开始。软件包版本、存储结构、记录封装和
|
|
6
28
|
Controller 协议是相互独立的身份,不能从其中一个推断另一个。
|
|
7
29
|
|
package/docs/task-delivery.md
CHANGED
|
@@ -305,17 +305,21 @@ yui task archive <task> (--integrated|--abandon) --force
|
|
|
305
305
|
|
|
306
306
|
### Ordinary archive
|
|
307
307
|
|
|
308
|
-
Active work and inputs must be settled, and
|
|
309
|
-
|
|
308
|
+
Active work and inputs must be settled, and execution proven stopped.
|
|
309
|
+
WorkItem results must be integrated or deliberately abandoned;
|
|
310
310
|
Review, Lane and Integration resources must be settled. With `--integrated`,
|
|
311
311
|
each Project requiring code delivery needs a merged, verified Publication
|
|
312
312
|
covering its accepted head, either exactly or through valid explicit candidate
|
|
313
313
|
adoption. `--abandon` records deliberate non-delivery,
|
|
314
314
|
not verified merge.
|
|
315
315
|
|
|
316
|
-
Missing/stale coverage
|
|
317
|
-
|
|
316
|
+
Missing/stale coverage or unresolved execution prevents ordinary archive.
|
|
317
|
+
Dirty or otherwise unsafe temporary resources are retained after the logical
|
|
318
|
+
archive commit; they do not require force merely to archive. No implicit reset
|
|
318
319
|
or force deletion occurs.
|
|
320
|
+
For `--abandon`, a clean Task-main at its exact recorded Project baseline can
|
|
321
|
+
be released without a Publication. New unverified commits remain protected.
|
|
322
|
+
Pending or running Reviews are unsettled business, not just retained directories.
|
|
319
323
|
|
|
320
324
|
### Explicit force archive
|
|
321
325
|
|
|
@@ -345,11 +349,22 @@ current ownership, not a second cleanup queue.
|
|
|
345
349
|
An archive result with `archived=true` proves archival, not that cleanup fully
|
|
346
350
|
succeeded. Even `cleanupFinished` means the foreground pass finished, not that
|
|
347
351
|
every resource was removed. Repeating archive reports current facts and does
|
|
348
|
-
not replay cleanup. After inspection, use
|
|
349
|
-
|
|
352
|
+
not replay cleanup. After inspection, use `yui task archive-cleanup <task>` to
|
|
353
|
+
retry safe exact-owner cleanup. `allResourcesReleased` reports the current pass
|
|
354
|
+
and remaining ownership separately from historical warnings; no background retry or broader deletion authority
|
|
350
355
|
is implied. Both archive paths preserve Task history and recovery information.
|
|
351
356
|
Archived Tasks cannot reopen.
|
|
352
357
|
|
|
358
|
+
Interrupted runtime cleanup may leave an adjacent `.cleanup-*` directory.
|
|
359
|
+
Retries inspect these claims as well as the original path: only an exact Owner
|
|
360
|
+
marker and no live process references permit deletion. Missing or mismatched
|
|
361
|
+
markers remain retained with their path for explicit diagnosis; absence of the
|
|
362
|
+
original directory alone never proves release. Unresolved claims also prevent
|
|
363
|
+
reactivating the same runtime. Executed-Job physical checks use that same claim
|
|
364
|
+
inventory before ordinary archive commits; acknowledgement does not bypass a
|
|
365
|
+
live or unverified renamed runtime. This uses the existing resource owner and receipt,
|
|
366
|
+
not a second cleanup queue.
|
|
367
|
+
|
|
353
368
|
Resource GC is a separate, opt-in quarantine path. A runtime subtree moves once:
|
|
354
369
|
the parent receipt owns recovery of its contents, and redundant child registry
|
|
355
370
|
entries are removed in the same registry transaction. Independently owned Git
|
|
@@ -411,8 +426,21 @@ Preflight is an observation, not a removal permit. Cleanup reloads the same
|
|
|
411
426
|
checks and Git verifies ownership/dirt again at removal. A Task-main clone's
|
|
412
427
|
dependent registrations are expected before child cleanup and must be absent
|
|
413
428
|
before clone removal. Archive preserves new dirt even in a failed Integration
|
|
414
|
-
workspace;
|
|
415
|
-
|
|
429
|
+
workspace; explicit Integration cleanup also preserves dirt and durable logs.
|
|
430
|
+
An acknowledged unknown Job result remains unknown: cleanup additionally needs
|
|
431
|
+
fresh evidence that its exact runner generation and physical path references
|
|
432
|
+
are absent. Successful, failed, timed-out and cancelled executed Jobs need the
|
|
433
|
+
same physical evidence; a terminal result does not prove surviving children
|
|
434
|
+
stopped. Only Jobs cancelled/rejected before any execution effect bypass it.
|
|
435
|
+
Cleanup first checks Job results and exact runner exit, then stops only settled,
|
|
436
|
+
exactly owned Roles. It repeats full path-reference checks after that stop and
|
|
437
|
+
before deleting any child workspace or committing ordinary archive. An idle
|
|
438
|
+
reusable Role sharing the workspace is not itself a reason to skip its normal
|
|
439
|
+
stop; surviving or unverified references still prevent release.
|
|
440
|
+
Integration resource preflight also checks runtime ownership and cleanup claims
|
|
441
|
+
with the deletion inspector. Unverified physical material is retained without
|
|
442
|
+
turning it into a new ordinary-archive business gate.
|
|
443
|
+
A finished cleanup means the foreground
|
|
416
444
|
attempt ended, not that every resource was released. Current retained references
|
|
417
445
|
and exact physical runtime evidence remain separate from historical diagnostics.
|
|
418
446
|
|
|
@@ -138,7 +138,7 @@ Review 时跳过刷新,该新鲜度字段为 null。重复完成不重新观
|
|
|
138
138
|
干净且已提交的 Task-main 快照。当有一条新的 user/Operator 消息仍在等待 Leader
|
|
139
139
|
投递时,它也会拒绝完成。当前原生轮次必须结束,待处理的通知才能到达;随后 Leader
|
|
140
140
|
读取原始消息并重新评估完成。这派生自既有的 Message 和 mailbox 投递,而不是第二套
|
|
141
|
-
|
|
141
|
+
确认或工作流状态。终态工作区清理在完成时可以只是建议。普通归档要求业务及执行已结算;
|
|
142
142
|
明确授权的 force 归档可以保留下文所述的未解决资源。被选作结果的 Artifact 必须是
|
|
143
143
|
固定的、存在的且 Task 局部的。
|
|
144
144
|
|
|
@@ -235,13 +235,15 @@ yui task archive <task> (--integrated|--abandon) --force
|
|
|
235
235
|
|
|
236
236
|
### 普通归档
|
|
237
237
|
|
|
238
|
-
|
|
238
|
+
活动工作与输入必须已了结,并证明执行已停止。WorkItem 结果必须已集成或
|
|
239
239
|
有意放弃;Review、Lane 和 Integration 资源必须已结算。使用 `--integrated` 时,
|
|
240
240
|
每个需要代码交付的 Project 都要求已合并且已验证的 Publication,通过精确匹配
|
|
241
241
|
或有效显式采用候选覆盖其验收 head。`--abandon` 记录有意不交付,而不是已验证合并。
|
|
242
242
|
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
缺失或陈旧的覆盖、未解决的执行会阻止普通归档。脏 worktree 或其他无法安全移除的
|
|
244
|
+
临时资源在逻辑归档后保留,不会仅因这些残留而要求 force;不会隐式 reset 或强制删除。
|
|
245
|
+
`--abandon` 可释放 HEAD 精确等于已记录 Project 基线的干净 Task-main,无需 Publication;
|
|
246
|
+
未验证的新增提交仍保留。pending/running Review 属于未结清业务,而不只是保留目录。
|
|
245
247
|
|
|
246
248
|
### 明确授权的 force 归档
|
|
247
249
|
|
|
@@ -265,9 +267,17 @@ Force 不验证合并、不验收工作、不证明物理静止、不丢弃脏
|
|
|
265
267
|
|
|
266
268
|
归档结果中的 `archived=true` 证明已归档,不证明清理全部成功。即使 `cleanupFinished`
|
|
267
269
|
也只代表前台清理已走完,不代表资源全部移除。重复归档只报告当前事实,不重放清理。
|
|
268
|
-
|
|
270
|
+
检查后通过 `yui task archive-cleanup <task>` 显式重试精确 owner 的安全清理。
|
|
271
|
+
`allResourcesReleased` 将当前轮次及剩余所有权与历史警告分开报告;不隐含后台重试或更广泛的删除
|
|
269
272
|
权限。两条归档路径都保留 Task 历史与恢复信息。已归档的 Task 不能重开。
|
|
270
273
|
|
|
274
|
+
runtime 清理中断可能留下相邻的 `.cleanup-*` 认领目录。重试同时检查这些目录和原路径,
|
|
275
|
+
只有 Owner marker 精确匹配且没有存活进程引用时才删除。marker 缺失或不匹配时保留目录,
|
|
276
|
+
并给出路径供显式诊断;原目录不存在本身不证明资源已释放。未解决的认领也阻止同一 runtime
|
|
277
|
+
重新激活。此过程复用已有资源 owner 和回执,不引入第二套清理队列。
|
|
278
|
+
实际启动过的 Job 的物理检查在普通归档提交前复用同一认领目录清单;
|
|
279
|
+
确认未知结果不能跳过仍被进程引用或无法核实的重命名 runtime。
|
|
280
|
+
|
|
271
281
|
资源 GC 是独立、显式启用的隔离路径。同一 runtime 子树只移动一次,由父目录
|
|
272
282
|
回执负责恢复完整内容;重复的子目录 registry 记录在同一事务内移除。
|
|
273
283
|
独立 Git worktree 或仍需保留的子资源会阻止移动其父目录,不删除 Task 记录或成果。
|
|
@@ -311,8 +321,15 @@ Task Leader reader 也可读取。这里的 `--force` 仅选择要检查的行
|
|
|
311
321
|
|
|
312
322
|
预检是观察,不是删除凭据。清理会重新读取同一组检查,Git 删除时再验证身份和脏状态。
|
|
313
323
|
Task-main clone 在子工作区清理前存在关联 Git 注册是正常现象,但移除 clone 前它们必须
|
|
314
|
-
|
|
315
|
-
|
|
324
|
+
已释放。归档与独立的显式 Integration 清理均保留脏文件和持久日志。
|
|
325
|
+
确认 unknown Job 不会改写其未知结果;清理还需重新验证精确 runner 进程代次及物理路径引用
|
|
326
|
+
均已消失。成功、失败、超时或取消的已执行 Job 也要求同样的物理证据;终态结果不能证明
|
|
327
|
+
存活子进程已停止。只有执行产生任何效果前已取消或拒绝的 Job 可跳过检查。
|
|
328
|
+
清理先检查 Job 结果与精确 runner 退出,再停止执行已结算且归属精确的 Role;
|
|
329
|
+
停止后、删除任何子工作区或提交普通归档前,重新执行完整路径引用检查。
|
|
330
|
+
共享工作区的可复用空闲 Role 可以进入正常停止流程;残留或无法核实的引用仍阻止释放。
|
|
331
|
+
Integration 资源预检与删除共享 runtime 归属和认领目录检查;无法验证的物理材料保留,
|
|
332
|
+
不会因此新增普通归档的业务准入门槛。清理完成只表示这次前台尝试结束,不表示
|
|
316
333
|
全部资源已释放;当前保留引用、精确物理运行时证据与历史诊断仍是不同事实。
|
|
317
334
|
|
|
318
335
|
清理前用每个命令的 `--help` 查看它确切的权限和选项;阅读一份生命周期文档不授权
|