@xfey/tutti 0.1.93 → 0.1.95

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.
Files changed (85) hide show
  1. package/dist/collaboration-state/clarification-records.d.ts +2 -1
  2. package/dist/collaboration-state/clarification-records.js +18 -0
  3. package/dist/collaboration-state/index.d.ts +3 -1
  4. package/dist/collaboration-state/index.js +2 -1
  5. package/dist/collaboration-state/messages.js +15 -0
  6. package/dist/collaboration-state/run-recording.js +18 -1
  7. package/dist/collaboration-state/run-results.js +6 -0
  8. package/dist/collaboration-state/task-retry.d.ts +16 -0
  9. package/dist/collaboration-state/task-retry.js +134 -0
  10. package/dist/control-plane/command-recovery.js +9 -1
  11. package/dist/control-plane/index.d.ts +3 -2
  12. package/dist/control-plane/index.js +14 -0
  13. package/dist/control-plane/run-retry.d.ts +19 -0
  14. package/dist/control-plane/run-retry.js +103 -0
  15. package/dist/control-plane/run-start.d.ts +2 -1
  16. package/dist/control-plane/run-start.js +18 -1
  17. package/dist/control-plane/task-compile-clarification-context.d.ts +4 -0
  18. package/dist/control-plane/task-compile-clarification-context.js +9 -22
  19. package/dist/control-plane/task-compile-continuation.js +2 -0
  20. package/dist/control-plane/task-compile-start.js +2 -0
  21. package/dist/control-plane/task-source-context-types.d.ts +11 -0
  22. package/dist/control-plane/task-source-context-types.js +2 -0
  23. package/dist/control-plane/task-source-context.d.ts +7 -0
  24. package/dist/control-plane/task-source-context.js +31 -0
  25. package/dist/control-plane/types.d.ts +15 -0
  26. package/dist/control-plane/workflows/openai.d.ts +1 -0
  27. package/dist/control-plane/workflows/openai.js +87 -15
  28. package/dist/control-plane/workflows/types.d.ts +6 -14
  29. package/dist/control-plane/worklist-terminal-feedback.js +3 -0
  30. package/dist/prompt-templates/index.d.ts +1 -1
  31. package/dist/prompt-templates/index.js +4 -3
  32. package/dist/providers/openai/app-server/durable-session-smoke-cli.d.ts +2 -0
  33. package/dist/providers/openai/app-server/durable-session-smoke-cli.js +229 -0
  34. package/dist/providers/openai/app-server/read-only-procedure.d.ts +10 -0
  35. package/dist/providers/openai/app-server/read-only-procedure.js +42 -13
  36. package/dist/providers/openai/app-server/session-store.d.ts +74 -0
  37. package/dist/providers/openai/app-server/session-store.js +305 -0
  38. package/dist/providers/openai/app-server/workspace-write-run.d.ts +17 -4
  39. package/dist/providers/openai/app-server/workspace-write-run.js +92 -28
  40. package/dist/providers/openai/codex-app-server.d.ts +1 -0
  41. package/dist/providers/openai/codex-app-server.js +2 -0
  42. package/dist/run-pipeline/openai.d.ts +1 -0
  43. package/dist/run-pipeline/openai.js +15 -43
  44. package/dist/run-pipeline/task-run-invocation.js +371 -93
  45. package/dist/server-shell/http/routes/project-api/execution-routes.js +32 -2
  46. package/dist/server-shell/http/routes/project-api/invalidations.d.ts +2 -1
  47. package/dist/server-shell/http/routes/project-api/invalidations.js +13 -0
  48. package/dist/server-shell/http/routes/project-api/openapi-execution-routes.d.ts +21 -0
  49. package/dist/server-shell/http/routes/project-api/openapi-execution-routes.js +12 -1
  50. package/dist/server-shell/http/routes/project-api/openapi.d.ts +7 -0
  51. package/node_modules/@tutti/shared/dist/schemas/api/clarifications.d.ts +1 -0
  52. package/node_modules/@tutti/shared/dist/schemas/api/index.d.ts +1 -1
  53. package/node_modules/@tutti/shared/dist/schemas/api/index.js +1 -1
  54. package/node_modules/@tutti/shared/dist/schemas/api/messages.d.ts +5 -0
  55. package/node_modules/@tutti/shared/dist/schemas/api/messages.js +1 -0
  56. package/node_modules/@tutti/shared/dist/schemas/api/runtime-events.d.ts +1 -0
  57. package/node_modules/@tutti/shared/dist/schemas/api/types.d.ts +4 -1
  58. package/node_modules/@tutti/shared/dist/schemas/api/viewer-reference.d.ts +1 -0
  59. package/node_modules/@tutti/shared/dist/schemas/api/work-items.d.ts +4 -0
  60. package/node_modules/@tutti/shared/dist/schemas/api/work-items.js +3 -0
  61. package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.d.ts +33 -0
  62. package/node_modules/@tutti/shared/dist/schemas/api/workspace-commands.js +35 -1
  63. package/package.json +1 -1
  64. package/prompts/README.md +3 -1
  65. package/prompts/artifacts/README.md +1 -1
  66. package/prompts/artifacts/applicability.md +1 -1
  67. package/prompts/procedures/README.md +3 -3
  68. package/prompts/procedures/follow-up-check.md +1 -1
  69. package/prompts/procedures/reference-file-summary.md +1 -1
  70. package/prompts/procedures/task-compile.md +7 -7
  71. package/prompts/prompt-flow-map.md +16 -10
  72. package/prompts/runs/README.md +11 -16
  73. package/prompts/runs/task-execute.md +86 -0
  74. package/prompts/runs/task-finalize.md +11 -0
  75. package/prompts/runs/task-recovery.md +15 -0
  76. package/prompts/runs/task-result-contract.md +64 -0
  77. package/web/assets/{homepage-motion-scene-CLTkixIk.js → homepage-motion-scene-BFo4r4nz.js} +1 -1
  78. package/web/assets/index-CNIl4TF8.js +69 -0
  79. package/web/assets/index-quWLFJgD.css +1 -0
  80. package/web/index.html +2 -2
  81. package/prompts/runs/task-continuation.md +0 -199
  82. package/prompts/runs/task-retry.md +0 -207
  83. package/prompts/runs/task-run.md +0 -186
  84. package/web/assets/index-BTNYElB-.js +0 -69
  85. package/web/assets/index-Deu_eF5K.css +0 -1
@@ -1,4 +1,4 @@
1
- import { CursorPageRequestSchema, ExecutionStatusProjectionSchema, GetRecoverySummariesRequestSchema, GetRecoverySummariesResponseSchema, GetRecoverySummaryResponseSchema, TaskDetailProjectionSchema, TaskProjectionSchema, TaskRunResultsPageSchema, } from "@tutti/shared/schemas/api";
1
+ import { CursorPageRequestSchema, ExecutionStatusProjectionSchema, GetRecoverySummariesRequestSchema, GetRecoverySummariesResponseSchema, GetRecoverySummaryResponseSchema, RetryTaskBodySchema, RetryTaskResponseSchema, TaskDetailProjectionSchema, TaskProjectionSchema, TaskRunResultsPageSchema, } from "@tutti/shared/schemas/api";
2
2
  import { HOST_PROJECT_API_BASE_PATH } from "./constants.js";
3
3
  import { RecoverySummaryIdPathParameter, TaskIdPathParameter, } from "./openapi-path-parameters.js";
4
4
  export const HOST_PROJECT_EXECUTION_OPENAPI_ROUTES = [
@@ -33,6 +33,17 @@ export const HOST_PROJECT_EXECUTION_OPENAPI_ROUTES = [
33
33
  200: { description: "Task run result history page.", schema: TaskRunResultsPageSchema },
34
34
  },
35
35
  },
36
+ {
37
+ method: "post",
38
+ path: `${HOST_PROJECT_API_BASE_PATH}/tasks/{task_id}/retry`,
39
+ summary: "Retry the latest safely recoverable terminal failed task result.",
40
+ tags: ["tasks"],
41
+ parameters: [TaskIdPathParameter],
42
+ requestBody: RetryTaskBodySchema,
43
+ responses: {
44
+ 200: { description: "Task Retry command response.", schema: RetryTaskResponseSchema },
45
+ },
46
+ },
36
47
  {
37
48
  method: "get",
38
49
  path: `${HOST_PROJECT_API_BASE_PATH}/recovery-summaries`,
@@ -653,6 +653,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
653
653
  };
654
654
  };
655
655
  querystring?: never;
656
+ requestBody?: never;
656
657
  } | {
657
658
  method: "get";
658
659
  path: string;
@@ -716,6 +717,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
716
717
  }>>;
717
718
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
718
719
  retryable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
720
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
719
721
  updated_at: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
720
722
  }>;
721
723
  frozen_contract_since_activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -725,6 +727,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
725
727
  };
726
728
  };
727
729
  querystring?: never;
730
+ requestBody?: never;
728
731
  } | {
729
732
  method: "get";
730
733
  path: string;
@@ -741,6 +744,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
741
744
  schema: import("@sinclair/typebox").TSchema;
742
745
  };
743
746
  };
747
+ requestBody?: never;
744
748
  } | {
745
749
  method: "get";
746
750
  path: string;
@@ -757,6 +761,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
757
761
  };
758
762
  };
759
763
  parameters?: never;
764
+ requestBody?: never;
760
765
  } | {
761
766
  method: "get";
762
767
  path: string;
@@ -778,6 +783,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
778
783
  };
779
784
  };
780
785
  querystring?: never;
786
+ requestBody?: never;
781
787
  } | {
782
788
  method: "get";
783
789
  path: string;
@@ -857,6 +863,7 @@ export declare const HOST_PROJECT_OPENAPI_ROUTES: ({
857
863
  };
858
864
  parameters?: never;
859
865
  querystring?: never;
866
+ requestBody?: never;
860
867
  } | {
861
868
  method: "get";
862
869
  path: string;
@@ -589,6 +589,7 @@ export declare const SendClarificationRoundMessageResultSchema: import("@sinclai
589
589
  media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
590
590
  }>>>;
591
591
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
592
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
592
593
  }>>;
593
594
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
594
595
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
@@ -16,5 +16,5 @@ export { GetProjectDocRequestSchema, GetProjectDocResponseSchema, GetProjectDocs
16
16
  export { ArtifactKindSchema, ArtifactManifestSchema, ArtifactPreviewProjectionSchema, ArtifactPreviewStatusSchema, ArtifactServerManifestSchema, ArtifactStaticManifestSchema, ArtifactSummaryProjectionSchema, ArtifactTitleSchema, ArtifactProjectionSchema, GetArtifactsResponseSchema, IssueArtifactPreviewSessionBodySchema, IssueArtifactPreviewSessionDispositionSchema, IssueArtifactPreviewSessionPayloadSchema, IssueArtifactPreviewSessionResponseSchema, IssueArtifactPreviewSessionResultSchema, } from "./artifacts.js";
17
17
  export { DeleteSkillBodySchema, DeleteSkillDispositionSchema, DeleteSkillPayloadSchema, DeleteSkillResponseSchema, GetSkillParamsSchema, GetSkillResponseSchema, GetSkillsResponseSchema, ImportSkillZipBodySchema, ImportSkillZipDispositionSchema, ImportSkillZipPayloadSchema, ImportSkillZipResponseSchema, ImportSkillZipResultSchema, SkillDetailProjectionSchema, SkillNameSchema, SkillProjectionSchema, } from "./skills.js";
18
18
  export { ActivityEventProjectionSchema, ActivityEventSsePayloadSchema, ApprovalChangedEventPayloadSchema, ActivityProjectionSchema, ConnectionReadyEventPayloadSchema, ExecutionActivitySummarySchema, ExecutionStatusChangedEventPayloadSchema, ExecutionStatusKindSchema, ExecutionStatusProjectionSchema, ProcedureLaneSchema, ProviderConfigChangedEventPayloadSchema, QueryInvalidateEventPayloadSchema, ScratchpadUpdatedEventPayloadSchema, TaskDetailUpdatedEventPayloadSchema, TaskUpdatedEventPayloadSchema, WorklistChangedEventPayloadSchema, WorkspaceRecoveredEventPayloadSchema, } from "./runtime-events.js";
19
- export { ContextSyncBodySchema, ContextSyncDispositionSchema, ContextSyncPayloadSchema, ContextSyncResponseSchema, ContextSyncResultSchema, InitializeProjectDocsBodySchema, InitializeProjectDocsDispositionSchema, InitializeProjectDocsPayloadSchema, InitializeProjectDocsResponseSchema, InitializeProjectDocsResultSchema, ProjectDocsProcedureStartResultSchema, RefreshScratchpadDispositionSchema, RefreshScratchpadResultSchema, RunSchedulerNowBodySchema, RunSchedulerNowDispositionSchema, RunSchedulerNowPayloadSchema, RunSchedulerNowResponseSchema, SubmitWorklistBodySchema, SubmitWorklistDispositionSchema, SubmitWorklistPayloadSchema, SubmitWorklistResponseSchema, SubmitWorklistResultSchema, UpdateProjectDescriptionBodySchema, UpdateProjectDescriptionDispositionSchema, UpdateProjectDescriptionPayloadSchema, UpdateProjectDescriptionResponseSchema, UpdateProjectDescriptionResultSchema, UpdateProjectDisplayNameBodySchema, UpdateProjectDisplayNameDispositionSchema, UpdateProjectDisplayNamePayloadSchema, UpdateProjectDisplayNameResponseSchema, UpdateProjectDisplayNameResultSchema, } from "./workspace-commands.js";
19
+ export { ContextSyncBodySchema, ContextSyncDispositionSchema, ContextSyncPayloadSchema, ContextSyncResponseSchema, ContextSyncResultSchema, InitializeProjectDocsBodySchema, InitializeProjectDocsDispositionSchema, InitializeProjectDocsPayloadSchema, InitializeProjectDocsResponseSchema, InitializeProjectDocsResultSchema, ProjectDocsProcedureStartResultSchema, RefreshScratchpadDispositionSchema, RefreshScratchpadResultSchema, RunSchedulerNowBodySchema, RunSchedulerNowDispositionSchema, RunSchedulerNowPayloadSchema, RunSchedulerNowResponseSchema, RetryTaskBodySchema, RetryTaskDispositionSchema, RetryTaskPayloadSchema, RetryTaskResponseSchema, SubmitWorklistBodySchema, SubmitWorklistDispositionSchema, SubmitWorklistPayloadSchema, SubmitWorklistResponseSchema, SubmitWorklistResultSchema, UpdateProjectDescriptionBodySchema, UpdateProjectDescriptionDispositionSchema, UpdateProjectDescriptionPayloadSchema, UpdateProjectDescriptionResponseSchema, UpdateProjectDescriptionResultSchema, UpdateProjectDisplayNameBodySchema, UpdateProjectDisplayNameDispositionSchema, UpdateProjectDisplayNamePayloadSchema, UpdateProjectDisplayNameResponseSchema, UpdateProjectDisplayNameResultSchema, } from "./workspace-commands.js";
20
20
  //# sourceMappingURL=index.d.ts.map
@@ -14,5 +14,5 @@ export { GetProjectDocRequestSchema, GetProjectDocResponseSchema, GetProjectDocs
14
14
  export { ArtifactKindSchema, ArtifactManifestSchema, ArtifactPreviewProjectionSchema, ArtifactPreviewStatusSchema, ArtifactServerManifestSchema, ArtifactStaticManifestSchema, ArtifactSummaryProjectionSchema, ArtifactTitleSchema, ArtifactProjectionSchema, GetArtifactsResponseSchema, IssueArtifactPreviewSessionBodySchema, IssueArtifactPreviewSessionDispositionSchema, IssueArtifactPreviewSessionPayloadSchema, IssueArtifactPreviewSessionResponseSchema, IssueArtifactPreviewSessionResultSchema, } from "./artifacts.js";
15
15
  export { DeleteSkillBodySchema, DeleteSkillDispositionSchema, DeleteSkillPayloadSchema, DeleteSkillResponseSchema, GetSkillParamsSchema, GetSkillResponseSchema, GetSkillsResponseSchema, ImportSkillZipBodySchema, ImportSkillZipDispositionSchema, ImportSkillZipPayloadSchema, ImportSkillZipResponseSchema, ImportSkillZipResultSchema, SkillDetailProjectionSchema, SkillNameSchema, SkillProjectionSchema, } from "./skills.js";
16
16
  export { ActivityEventProjectionSchema, ActivityEventSsePayloadSchema, ApprovalChangedEventPayloadSchema, ActivityProjectionSchema, ConnectionReadyEventPayloadSchema, ExecutionActivitySummarySchema, ExecutionStatusChangedEventPayloadSchema, ExecutionStatusKindSchema, ExecutionStatusProjectionSchema, ProcedureLaneSchema, ProviderConfigChangedEventPayloadSchema, QueryInvalidateEventPayloadSchema, ScratchpadUpdatedEventPayloadSchema, TaskDetailUpdatedEventPayloadSchema, TaskUpdatedEventPayloadSchema, WorklistChangedEventPayloadSchema, WorkspaceRecoveredEventPayloadSchema, } from "./runtime-events.js";
17
- export { ContextSyncBodySchema, ContextSyncDispositionSchema, ContextSyncPayloadSchema, ContextSyncResponseSchema, ContextSyncResultSchema, InitializeProjectDocsBodySchema, InitializeProjectDocsDispositionSchema, InitializeProjectDocsPayloadSchema, InitializeProjectDocsResponseSchema, InitializeProjectDocsResultSchema, ProjectDocsProcedureStartResultSchema, RefreshScratchpadDispositionSchema, RefreshScratchpadResultSchema, RunSchedulerNowBodySchema, RunSchedulerNowDispositionSchema, RunSchedulerNowPayloadSchema, RunSchedulerNowResponseSchema, SubmitWorklistBodySchema, SubmitWorklistDispositionSchema, SubmitWorklistPayloadSchema, SubmitWorklistResponseSchema, SubmitWorklistResultSchema, UpdateProjectDescriptionBodySchema, UpdateProjectDescriptionDispositionSchema, UpdateProjectDescriptionPayloadSchema, UpdateProjectDescriptionResponseSchema, UpdateProjectDescriptionResultSchema, UpdateProjectDisplayNameBodySchema, UpdateProjectDisplayNameDispositionSchema, UpdateProjectDisplayNamePayloadSchema, UpdateProjectDisplayNameResponseSchema, UpdateProjectDisplayNameResultSchema, } from "./workspace-commands.js";
17
+ export { ContextSyncBodySchema, ContextSyncDispositionSchema, ContextSyncPayloadSchema, ContextSyncResponseSchema, ContextSyncResultSchema, InitializeProjectDocsBodySchema, InitializeProjectDocsDispositionSchema, InitializeProjectDocsPayloadSchema, InitializeProjectDocsResponseSchema, InitializeProjectDocsResultSchema, ProjectDocsProcedureStartResultSchema, RefreshScratchpadDispositionSchema, RefreshScratchpadResultSchema, RunSchedulerNowBodySchema, RunSchedulerNowDispositionSchema, RunSchedulerNowPayloadSchema, RunSchedulerNowResponseSchema, RetryTaskBodySchema, RetryTaskDispositionSchema, RetryTaskPayloadSchema, RetryTaskResponseSchema, SubmitWorklistBodySchema, SubmitWorklistDispositionSchema, SubmitWorklistPayloadSchema, SubmitWorklistResponseSchema, SubmitWorklistResultSchema, UpdateProjectDescriptionBodySchema, UpdateProjectDescriptionDispositionSchema, UpdateProjectDescriptionPayloadSchema, UpdateProjectDescriptionResponseSchema, UpdateProjectDescriptionResultSchema, UpdateProjectDisplayNameBodySchema, UpdateProjectDisplayNameDispositionSchema, UpdateProjectDisplayNamePayloadSchema, UpdateProjectDisplayNameResponseSchema, UpdateProjectDisplayNameResultSchema, } from "./workspace-commands.js";
18
18
  //# sourceMappingURL=index.js.map
@@ -109,6 +109,7 @@ export declare const TaskResultRefSchema: import("@sinclair/typebox").TObject<{
109
109
  media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
110
110
  }>>>;
111
111
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
112
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
112
113
  }>;
113
114
  export declare const WorklistCompileRefSchema: import("@sinclair/typebox").TObject<{
114
115
  kind: import("@sinclair/typebox").TLiteral<"worklist_compile">;
@@ -214,6 +215,7 @@ export declare const MessageRefsSchema: import("@sinclair/typebox").TObject<{
214
215
  media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
215
216
  }>>>;
216
217
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
218
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
217
219
  }>>;
218
220
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
219
221
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
@@ -331,6 +333,7 @@ export declare const MessageProjectionSchema: import("@sinclair/typebox").TObjec
331
333
  media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
332
334
  }>>>;
333
335
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
336
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
334
337
  }>>;
335
338
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
336
339
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
@@ -472,6 +475,7 @@ export declare const SendMainChatMessageResultSchema: import("@sinclair/typebox"
472
475
  media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
473
476
  }>>>;
474
477
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
478
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
475
479
  }>>;
476
480
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
477
481
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
@@ -610,6 +614,7 @@ export declare const MessageCreatedEventPayloadSchema: import("@sinclair/typebox
610
614
  media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
611
615
  }>>>;
612
616
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
617
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
613
618
  }>>;
614
619
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
615
620
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
@@ -106,6 +106,7 @@ export const TaskResultRefSchema = Type.Object({
106
106
  final_note: Type.Optional(Type.String()),
107
107
  generated_files: Type.Optional(Type.Array(WorklistFeedbackGeneratedFileSchema)),
108
108
  error_code: Type.Optional(NonEmptyStringSchema),
109
+ retry_action: Type.Optional(Type.Union([Type.Literal("retryable"), Type.Literal("retried")])),
109
110
  }, { additionalProperties: false });
110
111
  export const WorklistCompileRefSchema = Type.Object({
111
112
  kind: Type.Literal("worklist_compile"),
@@ -490,6 +490,7 @@ export declare const TaskDetailUpdatedEventPayloadSchema: import("@sinclair/type
490
490
  }>>;
491
491
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
492
492
  retryable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
493
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
493
494
  updated_at: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
494
495
  }>;
495
496
  frozen_contract_since_activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -14,7 +14,7 @@ import type { GetProjectDocRequestSchema, GetProjectDocResponseSchema, GetProjec
14
14
  import type { ArtifactKindSchema, ArtifactManifestSchema, ArtifactPreviewProjectionSchema, ArtifactPreviewStatusSchema, ArtifactProjectionSchema, ArtifactServerManifestSchema, ArtifactStaticManifestSchema, ArtifactSummaryProjectionSchema, GetArtifactsResponseSchema, IssueArtifactPreviewSessionDispositionSchema, IssueArtifactPreviewSessionPayloadSchema, IssueArtifactPreviewSessionResultSchema } from "./artifacts.js";
15
15
  import type { DeleteSkillDispositionSchema, DeleteSkillPayloadSchema, GetSkillParamsSchema, GetSkillResponseSchema, GetSkillsResponseSchema, ImportSkillZipDispositionSchema, ImportSkillZipPayloadSchema, ImportSkillZipResultSchema, SkillDetailProjectionSchema, SkillNameSchema, SkillProjectionSchema } from "./skills.js";
16
16
  import type { ActivityEventProjectionSchema, ActivityEventSsePayloadSchema, ApprovalChangedEventPayloadSchema, ActivityProjectionSchema, ConnectionReadyEventPayloadSchema, ExecutionActivitySummarySchema, ExecutionRuntimeActionSchema, ExecutionRuntimeSnapshotSchema, ExecutionRuntimeTokenUsageSchema, ExecutionStatusChangedEventPayloadSchema, ExecutionStatusKindSchema, ExecutionStatusProjectionSchema, ProcedureLaneSchema, ProviderConfigChangedEventPayloadSchema, QueryInvalidateEventPayloadSchema, ScratchpadUpdatedEventPayloadSchema, TaskDetailUpdatedEventPayloadSchema, TaskUpdatedEventPayloadSchema, WorklistChangedEventPayloadSchema, WorkspaceRecoveredEventPayloadSchema } from "./runtime-events.js";
17
- import type { ContextSyncDispositionSchema, ContextSyncPayloadSchema, ContextSyncResultSchema, InitializeProjectDocsDispositionSchema, InitializeProjectDocsPayloadSchema, InitializeProjectDocsResultSchema, RefreshScratchpadDispositionSchema, RefreshScratchpadResultSchema, RunSchedulerNowDispositionSchema, RunSchedulerNowPayloadSchema, SubmitWorklistDispositionSchema, SubmitWorklistPayloadSchema, SubmitWorklistResultSchema, UpdateProjectDescriptionDispositionSchema, UpdateProjectDescriptionPayloadSchema, UpdateProjectDescriptionResultSchema, UpdateProjectDisplayNameDispositionSchema, UpdateProjectDisplayNamePayloadSchema, UpdateProjectDisplayNameResultSchema } from "./workspace-commands.js";
17
+ import type { ContextSyncDispositionSchema, ContextSyncPayloadSchema, ContextSyncResultSchema, InitializeProjectDocsDispositionSchema, InitializeProjectDocsPayloadSchema, InitializeProjectDocsResultSchema, RefreshScratchpadDispositionSchema, RefreshScratchpadResultSchema, RunSchedulerNowDispositionSchema, RunSchedulerNowPayloadSchema, RetryTaskDispositionSchema, RetryTaskPayloadSchema, SubmitWorklistDispositionSchema, SubmitWorklistPayloadSchema, SubmitWorklistResultSchema, UpdateProjectDescriptionDispositionSchema, UpdateProjectDescriptionPayloadSchema, UpdateProjectDescriptionResultSchema, UpdateProjectDisplayNameDispositionSchema, UpdateProjectDisplayNamePayloadSchema, UpdateProjectDisplayNameResultSchema } from "./workspace-commands.js";
18
18
  export type CursorPageRequest = Static<typeof CursorPageRequestSchema>;
19
19
  export type CursorPage<TItem> = {
20
20
  items: TItem[];
@@ -225,6 +225,9 @@ export type IssueArtifactPreviewSessionResponse = CommandResponse<IssueArtifactP
225
225
  export type RunSchedulerNowPayload = Static<typeof RunSchedulerNowPayloadSchema>;
226
226
  export type RunSchedulerNowDisposition = Static<typeof RunSchedulerNowDispositionSchema>;
227
227
  export type RunSchedulerNowResponse = CommandResponse<RunSchedulerNowDisposition>;
228
+ export type RetryTaskPayload = Static<typeof RetryTaskPayloadSchema>;
229
+ export type RetryTaskDisposition = Static<typeof RetryTaskDispositionSchema>;
230
+ export type RetryTaskResponse = CommandResponse<RetryTaskDisposition>;
228
231
  export type UpdateProjectDisplayNamePayload = Static<typeof UpdateProjectDisplayNamePayloadSchema>;
229
232
  export type UpdateProjectDisplayNameDisposition = Static<typeof UpdateProjectDisplayNameDispositionSchema>;
230
233
  export type UpdateProjectDisplayNameResult = Static<typeof UpdateProjectDisplayNameResultSchema>;
@@ -487,6 +487,7 @@ export declare const UploadReferenceFileResultSchema: import("@sinclair/typebox"
487
487
  media_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
488
488
  }>>>;
489
489
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
490
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
490
491
  }>>;
491
492
  artifact_preview: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
492
493
  kind: import("@sinclair/typebox").TLiteral<"artifact_preview">;
@@ -171,6 +171,7 @@ export declare const TaskDetailResultProjectionSchema: import("@sinclair/typebox
171
171
  }>>;
172
172
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
173
173
  retryable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
174
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
174
175
  updated_at: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
175
176
  }>;
176
177
  export declare const TaskDetailProjectionSchema: import("@sinclair/typebox").TObject<{
@@ -227,6 +228,7 @@ export declare const TaskDetailProjectionSchema: import("@sinclair/typebox").TOb
227
228
  }>>;
228
229
  error_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
229
230
  retryable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
231
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
230
232
  updated_at: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
231
233
  }>;
232
234
  frozen_contract_since_activity_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -272,6 +274,7 @@ export declare const RunResultProjectionSchema: import("@sinclair/typebox").TUni
272
274
  started_at: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
273
275
  finished_at: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
274
276
  }>>>;
277
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
275
278
  created_at: import("@sinclair/typebox").TString;
276
279
  }>, import("@sinclair/typebox").TObject<{
277
280
  id: import("@sinclair/typebox").TString;
@@ -287,6 +290,7 @@ export declare const RunResultProjectionSchema: import("@sinclair/typebox").TUni
287
290
  summary: import("@sinclair/typebox").TString;
288
291
  error_code: import("@sinclair/typebox").TString;
289
292
  retryable: import("@sinclair/typebox").TBoolean;
293
+ retry_action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"retryable">, import("@sinclair/typebox").TLiteral<"retried">]>>;
290
294
  created_at: import("@sinclair/typebox").TString;
291
295
  }>]>;
292
296
  export declare const TaskRunResultsPageSchema: import("@sinclair/typebox").TSchema;
@@ -149,6 +149,7 @@ export const TaskDetailResultProjectionSchema = Type.Object({
149
149
  }, { additionalProperties: false })),
150
150
  error_code: Type.Optional(NonEmptyStringSchema),
151
151
  retryable: Type.Optional(Type.Boolean()),
152
+ retry_action: Type.Optional(Type.Union([Type.Literal("retryable"), Type.Literal("retried")])),
152
153
  updated_at: Type.Optional(IsoDateTimeStringSchema),
153
154
  }, { additionalProperties: false });
154
155
  export const TaskDetailProjectionSchema = Type.Object({
@@ -191,6 +192,7 @@ export const RunResultProjectionSchema = Type.Union([
191
192
  skip_reason_code: Type.Optional(CheckSkipReasonCodeSchema),
192
193
  skip_reason_summary: Type.Optional(Type.String()),
193
194
  external_side_effects: Type.Optional(Type.Array(ExternalSideEffectSummaryProjectionSchema)),
195
+ retry_action: Type.Optional(Type.Union([Type.Literal("retryable"), Type.Literal("retried")])),
194
196
  created_at: IsoDateTimeStringSchema,
195
197
  }, { additionalProperties: false }),
196
198
  Type.Object({
@@ -202,6 +204,7 @@ export const RunResultProjectionSchema = Type.Union([
202
204
  summary: Type.String(),
203
205
  error_code: NonEmptyStringSchema,
204
206
  retryable: Type.Boolean(),
207
+ retry_action: Type.Optional(Type.Union([Type.Literal("retryable"), Type.Literal("retried")])),
205
208
  created_at: IsoDateTimeStringSchema,
206
209
  }, { additionalProperties: false }),
207
210
  ]);
@@ -145,6 +145,39 @@ export declare const RunSchedulerNowDispositionSchema: import("@sinclair/typebox
145
145
  }>]>;
146
146
  export declare const RunSchedulerNowBodySchema: import("@sinclair/typebox").TSchema;
147
147
  export declare const RunSchedulerNowResponseSchema: import("@sinclair/typebox").TSchema;
148
+ export declare const RetryTaskPayloadSchema: import("@sinclair/typebox").TObject<{
149
+ expected_latest_run_result_id: import("@sinclair/typebox").TString;
150
+ }>;
151
+ export declare const RetryTaskDispositionSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
152
+ kind: import("@sinclair/typebox").TLiteral<"accepted">;
153
+ task_id: import("@sinclair/typebox").TString;
154
+ activity_ref: import("@sinclair/typebox").TString;
155
+ retried_run_result_id: import("@sinclair/typebox").TString;
156
+ }>, import("@sinclair/typebox").TObject<{
157
+ kind: import("@sinclair/typebox").TLiteral<"already_running">;
158
+ activity_ref: import("@sinclair/typebox").TString;
159
+ }>, import("@sinclair/typebox").TObject<{
160
+ kind: import("@sinclair/typebox").TLiteral<"task_not_failed">;
161
+ }>, import("@sinclair/typebox").TObject<{
162
+ kind: import("@sinclair/typebox").TLiteral<"latest_run_result_changed">;
163
+ latest_run_result_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
164
+ }>, import("@sinclair/typebox").TObject<{
165
+ kind: import("@sinclair/typebox").TLiteral<"retry_already_started">;
166
+ activity_ref: import("@sinclair/typebox").TString;
167
+ }>, import("@sinclair/typebox").TObject<{
168
+ kind: import("@sinclair/typebox").TLiteral<"retry_requires_resolution">;
169
+ }>, import("@sinclair/typebox").TObject<{
170
+ kind: import("@sinclair/typebox").TLiteral<"provider_not_configured">;
171
+ }>, import("@sinclair/typebox").TObject<{
172
+ kind: import("@sinclair/typebox").TLiteral<"provider_unavailable">;
173
+ reason: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"provider_auth_invalid">, import("@sinclair/typebox").TLiteral<"provider_quota_or_billing_required">, import("@sinclair/typebox").TLiteral<"provider_rate_limited">, import("@sinclair/typebox").TLiteral<"provider_model_unavailable">, import("@sinclair/typebox").TLiteral<"provider_network_error">, import("@sinclair/typebox").TLiteral<"unknown">]>;
174
+ retryable: import("@sinclair/typebox").TBoolean;
175
+ }>, import("@sinclair/typebox").TObject<{
176
+ kind: import("@sinclair/typebox").TLiteral<"interrupted">;
177
+ retry_with_new_command_id: import("@sinclair/typebox").TLiteral<true>;
178
+ }>]>;
179
+ export declare const RetryTaskBodySchema: import("@sinclair/typebox").TSchema;
180
+ export declare const RetryTaskResponseSchema: import("@sinclair/typebox").TSchema;
148
181
  export declare const UpdateProjectDisplayNamePayloadSchema: import("@sinclair/typebox").TObject<{
149
182
  display_name: import("@sinclair/typebox").TString;
150
183
  }>;
@@ -1,5 +1,5 @@
1
1
  import { Type } from "@sinclair/typebox";
2
- import { ActivityRefSchema, ClarificationRoundRefSchema, ClarificationThreadRefSchema, IsoDateTimeStringSchema, TaskIdSchema, WorkflowInvocationRefSchema, } from "../domain/index.js";
2
+ import { ActivityRefSchema, ClarificationRoundRefSchema, ClarificationThreadRefSchema, IsoDateTimeStringSchema, TaskIdSchema, RunResultIdSchema, WorkflowInvocationRefSchema, } from "../domain/index.js";
3
3
  import { ProviderUnavailableReasonCodeSchema } from "./provider-config.js";
4
4
  import { InterruptedCommandDispositionSchema, NonEmptyStringSchema, commandEnvelopeSchema, commandResponseSchema, commandResponseWithResultSchema, } from "./primitives.js";
5
5
  import { ProjectDocSummaryProjectionSchema, ViewerPathSchema, } from "./viewer-reference.js";
@@ -84,6 +84,40 @@ export const RunSchedulerNowDispositionSchema = Type.Union([
84
84
  ]);
85
85
  export const RunSchedulerNowBodySchema = commandEnvelopeSchema(RunSchedulerNowPayloadSchema);
86
86
  export const RunSchedulerNowResponseSchema = commandResponseSchema(RunSchedulerNowDispositionSchema);
87
+ export const RetryTaskPayloadSchema = Type.Object({
88
+ expected_latest_run_result_id: RunResultIdSchema,
89
+ }, { additionalProperties: false });
90
+ export const RetryTaskDispositionSchema = Type.Union([
91
+ Type.Object({
92
+ kind: Type.Literal("accepted"),
93
+ task_id: TaskIdSchema,
94
+ activity_ref: ActivityRefSchema,
95
+ retried_run_result_id: RunResultIdSchema,
96
+ }, { additionalProperties: false }),
97
+ Type.Object({
98
+ kind: Type.Literal("already_running"),
99
+ activity_ref: ActivityRefSchema,
100
+ }, { additionalProperties: false }),
101
+ Type.Object({ kind: Type.Literal("task_not_failed") }, { additionalProperties: false }),
102
+ Type.Object({
103
+ kind: Type.Literal("latest_run_result_changed"),
104
+ latest_run_result_id: Type.Optional(RunResultIdSchema),
105
+ }, { additionalProperties: false }),
106
+ Type.Object({
107
+ kind: Type.Literal("retry_already_started"),
108
+ activity_ref: ActivityRefSchema,
109
+ }, { additionalProperties: false }),
110
+ Type.Object({ kind: Type.Literal("retry_requires_resolution") }, { additionalProperties: false }),
111
+ Type.Object({ kind: Type.Literal("provider_not_configured") }, { additionalProperties: false }),
112
+ Type.Object({
113
+ kind: Type.Literal("provider_unavailable"),
114
+ reason: ProviderUnavailableReasonCodeSchema,
115
+ retryable: Type.Boolean(),
116
+ }, { additionalProperties: false }),
117
+ InterruptedCommandDispositionSchema,
118
+ ]);
119
+ export const RetryTaskBodySchema = commandEnvelopeSchema(RetryTaskPayloadSchema);
120
+ export const RetryTaskResponseSchema = commandResponseSchema(RetryTaskDispositionSchema);
87
121
  export const UpdateProjectDisplayNamePayloadSchema = Type.Object({
88
122
  display_name: Type.String({ minLength: 1, maxLength: 80 }),
89
123
  }, { additionalProperties: false });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xfey/tutti",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/prompts/README.md CHANGED
@@ -15,7 +15,7 @@ Prompt / skill 改造后的 live 实验计划与记录见 [prompt-flow-experimen
15
15
 
16
16
  - `procedures/`:`scratchpad_refresh`、`project_brief_refresh`、`task_compile`、`project_context_bootstrap`、`context_sync`、`reference_summary_refresh`、`follow_up_check` 等 Procedure / workflow prompt。
17
17
  - `artifacts/`:候选实现完成后的 transient Artifact applicability 判断;只接收 bounded task / diff / repo evidence,不写回 Task contract 或 repo。
18
- - `runs/`:正式 task `Run`、task-bound continuation 与 pipeline self-correction retry 等 Run pipeline prompt;task contract 可附带 receipt-derived compact `recent_references`,两类 retry 都保留它。provider transient retry 不新增 prompt,而是复用失败 attempt 的同一 prompt family。所有 Run prompt都以持久 project workspace为 cwd contract,不设计 promotion reconcile prompt。
18
+ - `runs/`:正式 task `Run`、task-bound continuation 与 pipeline self-correction retry 等 Run pipeline prompt;task contract 可附带 receipt-derived `source_messages`、已完成 Task Compile `clarification_rounds` 与 compact `recent_references`,两类 retry 都保留它们。provider transient retry 不新增 prompt,而是复用失败 attempt 的同一 prompt family。所有 Run prompt都以持久 project workspace为 cwd contract,不设计 promotion reconcile prompt。
19
19
  - `codex/`:Codex app-server smoke 等 adapter / spike prompt。
20
20
  - `skills/`:Tutti packaged built-in Codex skills;由 server-side app-server skill selection 选择,不在 Web Skills 页面展示,也不保存 user skills。
21
21
  - `chat-assistant.md`:主群聊与 clarification round 内 `@tutti` 只读项目问答 prompt;它不是 Procedure / Run prompt。
@@ -35,3 +35,5 @@ Prompt / skill 改造后的 live 实验计划与记录见 [prompt-flow-experimen
35
35
  - prompt 文件不得保存 provider secret、credential ref、host 绝对路径、project workspace path、join token、cookie 或 provider raw event。
36
36
  - built-in skill 文件不得保存 context API token、host-local URL、provider secret、host 绝对路径或 user skill 内容。
37
37
  - workflow 语义和 prompt 选择归 `control-plane/workflows`;provider adapter 只执行渲染后的 provider request。
38
+ - prompt 应说明本轮实际 direct input、目标和真实能力边界。对 server-side selection 未提供且 direct input 已从结构上排除的能力,不写假设性的“不得读取”指令;安全、workspace、任务契约、证据和输出 schema 等真实边界仍需明确。
39
+ - active app-server prompt 中显式命名的 built-in skill 必须属于对应 server-side selection;该映射由 prompt contract tests 与 `providers/openai/app-server/skills.ts` 共同约束。
@@ -4,4 +4,4 @@ This directory contains model-facing prompts used by the internal Artifact candi
4
4
 
5
5
  - `applicability.md` makes one read-only, non-persistent decision after a candidate diff exists and only when deterministic evidence cannot decide whether a browser-viewable Artifact is applicable.
6
6
 
7
- The prompt receives only the frozen task `title / goal / scope`, bounded changed paths, bounded Git diff facts, and limited repository evidence. It must not receive chat history, Scratchpad, task / activity ids, host paths, run workspace paths, credentials, provider output, or secrets. Applicability output is transient pipeline state; it is not written back to the Task contract or repository.
7
+ The prompt receives the frozen task `title / goal / scope`, bounded changed paths, bounded Git diff facts, and limited repository evidence. Its instructions base the decision on those supplied fields without enumerating inaccessible collaboration sources. Task / activity ids, host paths, run workspace paths, credentials, provider output, and secrets remain excluded by input construction. Applicability output is transient pipeline state; it is not written back to the Task contract or repository.
@@ -18,7 +18,7 @@ Decide whether the completed repository candidate should provide a browser-viewa
18
18
  - Return `not_applicable` only when the evidence clearly describes a library without a browser entry, a CLI, a migration or data script, an API-only service without a Web client, docs-only maintenance, or another task with no reasonable browser presentation surface.
19
19
  - Existing browser application evidence is relevant even if the changed path is a server entry, API handler, build configuration, or other behavior required by that application.
20
20
  - Ambiguity must resolve to `artifact_required`. Do not use a missing field, `unknown`, or a confidence score to avoid the decision.
21
- - Do not propose implementation changes. Do not infer hidden requirements from chat, Scratchpad, task ids, or machine-local context; none of those are inputs.
21
+ - Base the decision only on the supplied task, diff, and repository evidence. Do not propose implementation changes.
22
22
 
23
23
  # Output
24
24
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  - `scratchpad-refresh.md`:根据当前周期完整主群聊消息、Project Brief、精简 Worklist 与可选 active Task Compile Context 重建唯一 Current Scratchpad。
8
8
  - `project-brief-refresh.md`:根据四个 baseline Project Docs 的 bounded 正文和可读状态生成 host-local Project Brief 短摘要。
9
- - `task-compile.md`:使用 Codex app-server read-only adapter,根据直接输入的 Scratchpad / Worklist 与按需读取的项目上下文文件生成追加式 task compile proposal,或请求 workflow-bound clarification;执行面仅为 app-server read-only。
9
+ - `task-compile.md`:使用 Codex app-server read-only adapter,根据直接输入的冻结 source messages、Scratchpad / Worklist 与按需读取的项目上下文文件生成追加式 task compile proposal,或请求 workflow-bound clarification;执行面仅为 app-server read-only。
10
10
  - `project-context-bootstrap.md`:使用 Codex app-server read-only adapter 为缺失 baseline context files 生成完整文件内容计划;实际写入和 commit 由 `workspace-ops` 受控完成。
11
11
  - `context-sync.md`:使用 Codex app-server read-only adapter 生成文档同步更新计划;实际文件写入和 commit 由 `workspace-ops` 受控完成。
12
12
  - `reference-file-summary.md`:使用 Codex app-server read-only adapter 读取单个 reference 文件并生成“包含什么”的抽象 summary;不复现原句、表格行、个人信息、标识符或 secret-like value,正文敏感本身不构成 unavailable,只有无法访问、解码或理解才返回该分支。实际 README summary 索引写入和 commit 由 `workspace-ops` 受控完成。
@@ -14,13 +14,13 @@
14
14
 
15
15
  `project_context_bootstrap` 的 provider path 只让 Codex app-server read-only adapter 生成缺失文档内容;如果该计划不可用,Control Plane 会回退到本地保守模板。
16
16
  `project_context_bootstrap` 的 read-only 输入只包含项目名、非空时的 `missing_docs` 与刷新后的 Scratchpad;prompt 会要求 app-server 只读探索仓库,并可通过 `read-project-docs` / `read-references` skill 按需读取现有文档和参考文件。输出只包含 `documents[].doc_key/content`,固定 path 由 Control Plane 后处理生成。
17
- `task_compile` 的 read-only 输入只包含 durable context 固定的五字段 Scratchpad、当前 Worklist、可选 compact `recent_references` 和可选完整有序 `clarification_rounds`;reference 项只含 path、最终 name 与 available/unavailable summary,不含 blob/message/workflow audit fields。每次 continuation 仍读取同一 pinned Scratchpad source set,不读取并行变化的 Current Scratchpad或 boundary 后的新上传;later round 可以纠正 earlier round,明确撤回时允许空 proposal 正常结束。prompt 暴露 `read-project-docs` / `read-worklist` / `read-references` skills 供 app-server 必要时读取项目上下文文件、既有任务 contract / latest result 或相关 reference 正文;拟议工作实质依赖 reference 时必须在冻结 contract 前读取 source,不以 summary 替代原文。只有现有上下文支持一个 coherent formal contract 时才 proposal;重大歧义或冲突若必须替用户选择意图,则请求最少 clarification,低影响、可逆或已有 convention 覆盖的细节继续写成有界假设。Scratchpad Worklist 紧凑视图仍以直接输入为准,不通过 skill 重读 Scratchpad。provider raw output 使用 `{ result: ... }` 互斥分支;proposal 分支用 `module_ref` 指向新模块或既有模块,task 只输出 `title / goal / scope`,runner adapter 再映射为 Control Plane 内部 proposal:`goal` 同时作为内部 task summary 和 contract goal,`scope` 作为内部 contract scope。
17
+ `task_compile` 的 read-only 输入包含 durable context 固定的完整有序 `source_messages`、五字段 Scratchpad、当前 Worklist、可选 compact `recent_references` 和可选完整有序 `clarification_rounds`。消息与 answers 统一使用 `role / optional author_display_name / text`,不含 message/workflow ids、时间戳或完整 projection;reference 项只含 path、最终 name 与 available/unavailable summary。每次 continuation Host 物化同一 pinned refs 并追加 sealed rounds,因此 boundary 后的新聊天或上传不会进入旧 workflow,无需 `read-main-chat` / `read-scratchpad` skill 或假设性禁止文本。精确正文由 source fields 承接,task `title / goal / scope` 保持简洁正式。prompt 暴露 `read-project-docs` / `read-worklist` / `read-references` skills 供 app-server 必要时读取项目上下文文件、既有任务 contract / latest result 或相关 reference 正文;拟议工作实质依赖 reference 时必须在冻结 contract 前读取 source,不以 summary 替代原文。只有现有上下文支持一个 coherent formal contract 时才 proposal;重大歧义或冲突若必须替用户选择意图,则请求最少 clarification,低影响、可逆或已有 convention 覆盖的细节继续写成有界假设。later round 可以纠正 earlier round,明确撤回时允许空 proposal 正常结束。provider raw output 使用 `{ result: ... }` 互斥分支;proposal 分支用 `module_ref` 指向新模块或既有模块,task 只输出 `title / goal / scope`,runner adapter 再映射为 Control Plane 内部 proposal:`goal` 同时作为内部 task summary 和 contract goal,`scope` 作为内部 contract scope。
18
18
  `context_sync` 没有 provider-facing direct input;workflow ref、activity ref、触发原因、安全元数据、checked paths、skipped paths 和 open questions 都不进入 prompt,只用于运行时追踪、调度或审计。prompt 说明通用文档同步目标、目标项目文档落点和 canonical docs 职责,由 app-server 主动探索 repo,并通过 `read-project-docs` / `read-worklist` / `read-references` skill 按需读取现有文档、正式任务上下文和参考文件。Worklist / task result 只作为阶段性完成背景和稳定结果线索,不写成长文档里的逐任务流水。
19
19
  `context_sync` prompt 只返回 `summary` 与 `updates[].path/content`;空 `updates` 表示无需同步,非空 `updates` 由 Control Plane 调用 `workspace-ops` 做 path policy、mainline clean 检查、文件写入和 Git commit。
20
20
  `project_brief_refresh` 只走 OpenAI SDK structured output,不使用 Codex app-server,不读取 repo 或 skills。它接收四个 baseline Project Docs 的 bounded source 内容与状态,输出 `product_summary / tech_summary / structure_summary / principles_summary`,由 Control Plane 写入 host-local `project_brief` projection;Project Docs 创建、同步、被成功 Run promotion 修改,或 provider setup 后需要 backfill 时可以触发。provider 不可用、source 不可用、brief 已经 fresh 或刷新失败都不影响 Project Docs 写入结果。
21
21
  `reference_summary_refresh` 不接收 provider-facing workflow input。Control Plane 内部保留 workflow / activity trace anchors 与单个 reference file metadata 用于定位、审计和写回;runner 会把目标文件复制到一个临时目录,并以该目录作为 app-server `cwd`,prompt 只说明读取当前目录中的唯一目标文件、禁用写入和网络,并返回 bounded structured summary 输出。
22
22
  Phase 6.5 的 reference upload message 可以作为普通聊天事实进入 `scratchpad_refresh`,但 prompt 明确禁止模型在未读取文件的情况下推断文件正文。
23
- `scratchpad_refresh` `task_compile` 在压缩上下文时应保留任务执行和验收必需的用户提供细节。`scratchpad_refresh` 读取当前周期完整、有序的主群聊 `messages`,并按 `messages > active_task_compile > worklist > project_brief` 理解上下文;只有 `messages` 可以产生新的 `task_changes`。每条超长消息先做保留头尾的中间截断,再合并连续作者;不得静默删除较早消息。需要排除的是 secret、provider 细节、raw log 和 Tutti runtime / internal path。
23
+ `scratchpad_refresh` 在压缩上下文时应保留任务执行和验收必需的用户提供细节。它读取当前周期完整、有序的主群聊 `messages`,并按 `messages > active_task_compile > worklist > project_brief` 理解上下文;只有 `messages` 可以产生新的 `task_changes`。每条超长消息先做保留头尾的中间截断,再合并连续作者;不得静默删除较早消息。`task_compile` 则从 durable refs 直接物化原消息正文和完整 clarification answers,不把大段原文复制进 task contract。需要排除的是 secret、provider 细节、raw log 和 Tutti runtime / internal path。
24
24
  `follow_up_check` 的 provider-facing 输入只包含展平后的 `title / goal / scope`、上一 `Run.needs_human` 的 `summary`、原 `clarification_request_payload` 和压缩后的 `answers[]`;workflow ref、task id/status、activity ref、result kind、Run lineage、message id、作者 identity 和时间戳不进入 prompt。它只判断原 human decision 是否在同一 frozen contract 内解决:已解决为 `resume`,同一决策仍可在 contract 内补充为 `needs_more_input`,采纳回答会改变 goal / scope 为 `requires_retasking`;不得请求 Run 自己负责的实现选择。provider raw output 使用 `{ result: ... }` 互斥分支,runner adapter 再映射为 Control Plane 内部 outcome。控制面负责把三个结果分别物化为 continuation、下一轮 round 或 retasking-required closure。`Run.failed` / `Task.failed` 当前不再通过 follow-up retry 复活。
25
25
 
26
26
  ## 输入变量
@@ -32,7 +32,7 @@ Fields:
32
32
 
33
33
  # Decision Rules
34
34
 
35
- - Use only `workflow_input_json`; do not inspect files, repository state, Worklist, Scratchpad, references, Project Docs, or external context.
35
+ - `workflow_input_json` is the complete context for this decision.
36
36
  - Treat `goal` and `scope` as the frozen task contract, `previous_run.summary` and `previous_run.clarification_request_payload` as the identified human decision, and `answers` as the submitted human reply.
37
37
  - Evaluate only whether the answers resolve that decision within the same frozen task contract.
38
38
  - Return `resume` when the blocker is resolved without changing the contract.
@@ -12,7 +12,7 @@ You summarize one human-uploaded Tutti reference file.
12
12
 
13
13
  - The current working directory is an isolated temporary directory created for this turn.
14
14
  - It contains exactly one copied target reference file.
15
- - No project repository context, chat history, Worklist state, Project Docs, skills, agent context API, network, or web search is available.
15
+ - The copied file is the only evidence for this summary.
16
16
  - The original reference path, file metadata, workflow refs, and activity refs are intentionally not part of the prompt.
17
17
 
18
18
  # Task
@@ -18,18 +18,18 @@ You compile Tutti's Scratchpad into an append-only Worklist proposal for post-ba
18
18
 
19
19
  # Context Sources
20
20
 
21
- - `scratchpad` is the immutable five-field snapshot pinned when this task_compile workflow was submitted. It has already removed message ids, timestamps, activity refs, and refresh state.
21
+ - `source_messages` contains the frozen discussion submitted for this workflow. Messages remain in chronological order and preserve their original boundaries.
22
+ - `scratchpad` is the immutable five-field summary pinned for the same submission. It has already removed message ids, timestamps, activity refs, and refresh state.
22
23
  - `worklist.modules[]` is the current formal Worklist. Module `id` values are the only valid existing module keys. Module names and task titles are historical anchors for resolving short references in the current Scratchpad.
23
24
  - `recent_references`, when present, identifies human-uploaded files from the same pinned Scratchpad cycle and provides a terminal summary status for each source.
24
25
  - `clarification_rounds`, when present, contains every sealed workflow-bound clarification round for this same pinned Scratchpad, ordered from earliest to latest. Each round keeps its request separate from its ordered submitted answer messages.
25
- - Later clarification rounds may add to or correct earlier rounds. Interpret them chronologically without discarding the earlier context.
26
- - Concurrent main-chat discussion and the mutable Current Scratchpad are intentionally absent. Never assume that a short clarification answer applies to a newer chat direction, and never use skills to find concurrent chat to complete this workflow.
27
- - Treat the provided Scratchpad and Worklist as authoritative. Do not use skills to reread them.
26
+ - Use source messages and clarification answers when exact wording, values, lists, or decisions matter. Later explicit clarification takes precedence over earlier material.
27
+ - Use the direct Worklist projection for current topology.
28
28
  - Use `read-worklist` only when an existing task's contract or latest result would clarify the current task's subject, boundary, or delivery relationship. Do not duplicate tasks already covered by the Worklist.
29
29
  - Use `read-project-docs` or `read-references` only when task scope, acceptance, product intent, technical stack, repo structure, agent working rules, or reference contents matter and are not clear from direct input.
30
30
  - When proposed work materially depends on a recent reference, read the relevant source before freezing the task contract; do not rely on its summary alone.
31
31
  - Preserve user-provided non-secret details when they are needed to execute or accept the task. Do not generalize them into vague labels.
32
- - Do not use web search, credentials, provider internals, raw logs, or Tutti runtime/internal paths.
32
+ - Exclude credentials, provider internals, raw logs, and Tutti runtime/internal paths.
33
33
 
34
34
  # Delivery Surface Context
35
35
 
@@ -49,7 +49,7 @@ Return a `proposal` only when the available context supports one coherent formal
49
49
  Return `clarification_request_payload` only when all are true:
50
50
 
51
51
  - Resolving the issue would materially change goal, scope, user-visible behavior, visual or interaction direction, technical shape, data or asset source, acceptance criteria, safety boundary, or external side effect.
52
- - Scratchpad, Worklist, Project Docs, repo facts, and relevant references do not answer it.
52
+ - Source messages, clarification rounds, Scratchpad, Worklist, Project Docs, repo facts, and relevant references do not answer it.
53
53
  - Guessing would likely cause rework, risk, or user surprise.
54
54
  - A concise human answer can unblock task creation.
55
55
 
@@ -80,7 +80,7 @@ Never create tasks for Tutti internal procedures or control-plane steps, includi
80
80
  - `goal`: exact task outcome in one concise sentence. Tutti uses this as the internal task summary and task contract goal.
81
81
  - `scope`: 3-7 short items that together cover implementation surfaces, important constraints / non-goals / assumptions, and observable acceptance signals.
82
82
 
83
- Avoid repeating the same idea across `title`, `goal`, and `scope`. Do not copy long PRD passages, chat excerpts, Scratchpad prose, or Project Docs into task details. Even though task fields should stay concise, `scope` must carry user-provided details the Run will need and cannot reliably infer later.
83
+ Avoid repeating the same idea across `title`, `goal`, and `scope`. Keep the task contract concise. When execution depends on exact supplied material, describe how it should be used without copying the full material into the task.
84
84
 
85
85
  # Output
86
86