@playdrop/playdrop-cli 0.12.42 → 0.13.1

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 (110) hide show
  1. package/config/client-meta.json +2 -2
  2. package/dist/apps/index.d.ts +2 -0
  3. package/dist/apps/index.js +2 -1
  4. package/dist/apps/loadCheck.d.ts +4 -1
  5. package/dist/apps/loadCheck.js +40 -10
  6. package/dist/apps/staticHtml.d.ts +28 -0
  7. package/dist/apps/staticHtml.js +343 -0
  8. package/dist/apps/validate.js +2 -1
  9. package/dist/commands/captureListing.d.ts +1 -1
  10. package/dist/commands/captureListing.js +4 -3
  11. package/dist/commands/devServer.js +19 -0
  12. package/dist/commands/feedback.d.ts +2 -0
  13. package/dist/commands/feedback.js +44 -2
  14. package/dist/commands/upload.d.ts +24 -0
  15. package/dist/commands/upload.js +122 -4
  16. package/dist/commands/worker/instrument-evidence.js +1 -1
  17. package/dist/commands/worker/runtime.d.ts +15 -0
  18. package/dist/commands/worker/runtime.js +121 -11
  19. package/dist/commands/worker.d.ts +28 -2
  20. package/dist/commands/worker.js +843 -170
  21. package/dist/index.js +7 -0
  22. package/dist/listingPreflight.js +15 -4
  23. package/dist/recorderRelease.d.ts +18 -0
  24. package/dist/recorderRelease.js +90 -0
  25. package/node_modules/@playdrop/api-client/dist/client.d.ts +5 -2
  26. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  27. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +3 -2
  28. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  29. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +13 -2
  30. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +2 -1
  31. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  32. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts +2 -1
  33. package/node_modules/@playdrop/api-client/dist/domains/me.d.ts.map +1 -1
  34. package/node_modules/@playdrop/api-client/dist/domains/me.js +11 -0
  35. package/node_modules/@playdrop/api-client/dist/index.d.ts +6 -3
  36. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  37. package/node_modules/@playdrop/api-client/dist/index.js +14 -2
  38. package/node_modules/@playdrop/config/client-meta.json +2 -2
  39. package/node_modules/@playdrop/config/dist/src/constants.d.ts +1 -0
  40. package/node_modules/@playdrop/config/dist/src/constants.d.ts.map +1 -1
  41. package/node_modules/@playdrop/config/dist/src/constants.js +1 -0
  42. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  43. package/node_modules/@playdrop/types/dist/api.d.ts +195 -4
  44. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  45. package/node_modules/@playdrop/types/dist/api.js +25 -2
  46. package/node_modules/entities/decode-codepoint.d.ts +19 -0
  47. package/node_modules/entities/decode-codepoint.d.ts.map +1 -0
  48. package/node_modules/entities/decode-codepoint.js +77 -0
  49. package/node_modules/entities/decode-codepoint.js.map +1 -0
  50. package/node_modules/entities/decode.d.ts +209 -0
  51. package/node_modules/entities/decode.d.ts.map +1 -0
  52. package/node_modules/entities/decode.js +511 -0
  53. package/node_modules/entities/decode.js.map +1 -0
  54. package/node_modules/entities/encode.d.ts +22 -0
  55. package/node_modules/entities/encode.d.ts.map +1 -0
  56. package/node_modules/entities/encode.js +73 -0
  57. package/node_modules/entities/encode.js.map +1 -0
  58. package/node_modules/entities/escape.d.ts +43 -0
  59. package/node_modules/entities/escape.d.ts.map +1 -0
  60. package/node_modules/entities/escape.js +121 -0
  61. package/node_modules/entities/escape.js.map +1 -0
  62. package/node_modules/entities/generated/decode-data-html.d.ts +2 -0
  63. package/node_modules/entities/generated/decode-data-html.d.ts.map +1 -0
  64. package/node_modules/entities/generated/decode-data-html.js +10 -0
  65. package/node_modules/entities/generated/decode-data-html.js.map +1 -0
  66. package/node_modules/entities/generated/decode-data-xml.d.ts +2 -0
  67. package/node_modules/entities/generated/decode-data-xml.d.ts.map +1 -0
  68. package/node_modules/entities/generated/decode-data-xml.js +10 -0
  69. package/node_modules/entities/generated/decode-data-xml.js.map +1 -0
  70. package/node_modules/entities/generated/encode-html.d.ts +8 -0
  71. package/node_modules/entities/generated/encode-html.d.ts.map +1 -0
  72. package/node_modules/entities/generated/encode-html.js +13 -0
  73. package/node_modules/entities/generated/encode-html.js.map +1 -0
  74. package/node_modules/entities/index.d.ts +96 -0
  75. package/node_modules/entities/index.d.ts.map +1 -0
  76. package/node_modules/entities/index.js +131 -0
  77. package/node_modules/entities/index.js.map +1 -0
  78. package/node_modules/entities/package.json +3 -0
  79. package/node_modules/parse5/common/doctype.d.ts +4 -0
  80. package/node_modules/parse5/common/doctype.js +118 -0
  81. package/node_modules/parse5/common/error-codes.d.ts +67 -0
  82. package/node_modules/parse5/common/error-codes.js +66 -0
  83. package/node_modules/parse5/common/foreign-content.d.ts +9 -0
  84. package/node_modules/parse5/common/foreign-content.js +237 -0
  85. package/node_modules/parse5/common/html.d.ts +289 -0
  86. package/node_modules/parse5/common/html.js +528 -0
  87. package/node_modules/parse5/common/token.d.ts +84 -0
  88. package/node_modules/parse5/common/token.js +24 -0
  89. package/node_modules/parse5/common/unicode.d.ts +42 -0
  90. package/node_modules/parse5/common/unicode.js +70 -0
  91. package/node_modules/parse5/index.d.ts +71 -0
  92. package/node_modules/parse5/index.js +54 -0
  93. package/node_modules/parse5/package.json +1 -0
  94. package/node_modules/parse5/parser/formatting-element-list.d.ts +36 -0
  95. package/node_modules/parse5/parser/formatting-element-list.js +114 -0
  96. package/node_modules/parse5/parser/index.d.ts +221 -0
  97. package/node_modules/parse5/parser/index.js +3240 -0
  98. package/node_modules/parse5/parser/open-element-stack.d.ts +53 -0
  99. package/node_modules/parse5/parser/open-element-stack.js +328 -0
  100. package/node_modules/parse5/serializer/index.d.ts +60 -0
  101. package/node_modules/parse5/serializer/index.js +172 -0
  102. package/node_modules/parse5/tokenizer/index.d.ts +247 -0
  103. package/node_modules/parse5/tokenizer/index.js +2714 -0
  104. package/node_modules/parse5/tokenizer/preprocessor.d.ts +36 -0
  105. package/node_modules/parse5/tokenizer/preprocessor.js +200 -0
  106. package/node_modules/parse5/tree-adapters/default.d.ts +84 -0
  107. package/node_modules/parse5/tree-adapters/default.js +176 -0
  108. package/node_modules/parse5/tree-adapters/interface.d.ts +255 -0
  109. package/node_modules/parse5/tree-adapters/interface.js +2 -0
  110. package/package.json +8 -1
@@ -4,8 +4,14 @@ import { loadConfig } from '../config';
4
4
  import { runShell } from '../shellProbe';
5
5
  import { type WorkerPlaydropAssetRequirement } from './upload';
6
6
  import { type WorkerInstrumentSurface, type LoggedProcessResult, type LoggedProcessTranscriptChunk } from './worker/runtime';
7
- export { assertWorkerTokenUsageWithinCap, buildClaudeExecArgs, buildClaudePermissionSettings, buildCodexExecArgs, buildPlaywrightMcpCommand, buildWorkerChildEnv, DEFAULT_CODEX_TIMEOUT_MS, DEFAULT_WORKER_TOKEN_CAP, extractAgentTokenUsage, extractCodexRolloutTokenUsage, extractCodexThreadId, extractCodexTokensUsed, readCodexRolloutTokenUsageForThread, readCodexSandboxMode, readEnvBoolean, runLoggedProcess } from './worker/runtime';
7
+ export { assertWorkerTokenUsageWithinCap, buildClaudeExecArgs, buildClaudePermissionSettings, buildCleanRoomChildEnv, buildCodexExecArgs, buildPlaywrightMcpCommand, buildWorkerChildEnv, DEFAULT_CODEX_TIMEOUT_MS, DEFAULT_CREATOR_AGENT_TIMEOUT_MS, DEFAULT_CREATOR_UPLOAD_RECOVERY_TIMEOUT_MS, DEFAULT_WORKER_TOKEN_CAP, extractAgentTokenUsage, extractCodexRolloutTokenUsage, extractClaudeSessionId, extractCodexThreadId, extractCodexTokensUsed, readCodexRolloutTokenUsageForThread, readCodexSandboxMode, readEnvBoolean, runLoggedProcess } from './worker/runtime';
8
8
  export type { AgentTokenUsage, LoggedProcessResult, LoggedProcessTranscriptChunk } from './worker/runtime';
9
+ export declare function usesCreatorRecovery(kind: AgentTaskKind): boolean;
10
+ export declare function buildCreatorRecoveryPrompt(input: {
11
+ prompt: string;
12
+ kind: AgentTaskKind;
13
+ }): string;
14
+ export declare function buildGameEvalRetryPrompt(prompt: string): string;
9
15
  export declare const WORKER_SESSION_EXPIRED_MESSAGE = "worker session expired: run \"playdrop auth login\" and start the worker again";
10
16
  export declare const WORKER_CONTEXT_COMMAND_NOT_ALLOWED_MESSAGE = "worker_context_command_not_allowed: inside a PlayDrop worker task only task progress, task claim-slug, task upload/done/fail, assigned app scaffolding, project validation/build/dev/check/capture, read-only help/catalogue/documentation lookup, and PlayDrop AI generation are permitted.";
11
17
  type WorkerStartOptions = {
@@ -76,6 +82,7 @@ type TaskCatalogueReportOptions = {
76
82
  type TaskCompleteOptions = {
77
83
  env?: string;
78
84
  nextSteps?: string;
85
+ platformFeedbackFile?: string;
79
86
  summary?: string;
80
87
  };
81
88
  type TaskClaimSlugOptions = {
@@ -89,6 +96,7 @@ type TaskUploadOptions = {
89
96
  type TaskFailOptions = {
90
97
  env?: string;
91
98
  message?: string;
99
+ platformFeedbackFile?: string;
92
100
  };
93
101
  type TaskEvidenceOptions = {
94
102
  evidenceDir?: string;
@@ -105,6 +113,7 @@ type TaskSubmitReviewOptions = {
105
113
  state?: string;
106
114
  messageFile?: string;
107
115
  creatorFeedbackFile?: string;
116
+ platformFeedbackFile?: string;
108
117
  evidenceDir?: string;
109
118
  nextSteps?: string;
110
119
  };
@@ -166,6 +175,12 @@ export declare function claimBackoffDelayMs(currentMs: number, random?: () => nu
166
175
  export declare function resolveWorkerHomeDir(): string;
167
176
  export declare const WORKER_TASK_WORKSPACE_RETENTION = 20;
168
177
  export declare function pruneWorkerTaskWorkspaces(incomingWorkspaceDir: string, retention?: number): Promise<string[]>;
178
+ export declare function prepareClaimedTaskWorkspace(input: {
179
+ workspaceDir: string;
180
+ attempt: number;
181
+ }): Promise<{
182
+ resumed: boolean;
183
+ }>;
169
184
  export declare function resolveWorkerInstrumentSurface(taskContext: Pick<WorkerTaskContextFile, 'kind' | 'metadata'>): WorkerInstrumentSurface | null;
170
185
  export declare function hasAgentTaskUploadedArtifact(task: Pick<AgentTaskResponse, 'appId' | 'appVersionId'>): boolean;
171
186
  export declare function appendWorkerTranscriptChunks(input: {
@@ -193,11 +208,17 @@ export declare function assertTaskUploadResultMatchesContext(input: {
193
208
  }): void;
194
209
  export declare function stageAssignmentWorkspaceV2(workspaceDir: string, workspace: WorkerTaskAssignmentV2['workspace']): Promise<void>;
195
210
  export declare function assertAssignmentPluginBundleExtractionBounds(buffer: Buffer): void;
211
+ export declare function stageDevPluginWorkingTree(input: {
212
+ workingTree: string;
213
+ workspaceDir: string;
214
+ taskKind?: AgentTaskKind;
215
+ }): Promise<string>;
196
216
  export declare function stageAssignmentPluginBundle(input: {
197
217
  workspaceDir: string;
218
+ extractionDir?: string;
198
219
  pluginBundle: WorkerTaskPluginV2;
199
220
  taskKind?: AgentTaskKind;
200
- }): Promise<string>;
221
+ }): Promise<string | null>;
201
222
  export declare function resolveDevPluginWorkingTree(input: {
202
223
  workingTree?: string;
203
224
  env: string;
@@ -251,6 +272,8 @@ export declare function prepareCodexRunHomes(input: {
251
272
  envName: string;
252
273
  sourceCodexHome?: string;
253
274
  playdropConfig?: ReturnType<typeof loadConfig>;
275
+ stagePlaydropSession?: boolean;
276
+ preserveExisting?: boolean;
254
277
  }): Promise<{
255
278
  homeDir: string;
256
279
  codexHomeDir: string;
@@ -265,6 +288,7 @@ export declare function prepareClaudeRunConfig(input: {
265
288
  }>;
266
289
  export declare function removeAgentRunCredentials(workspaceDir: string): Promise<void>;
267
290
  export declare function removeStaleAgentRunCredentials(workerHomeDir?: string): Promise<void>;
291
+ export declare function mergeCreatorRecoveryResults(runtime: AgentRuntime, initial: LoggedProcessResult, recovery: LoggedProcessResult): LoggedProcessResult;
268
292
  export declare function buildAgentFailureCode(agent: AgentRuntime, result: LoggedProcessResult, request?: {
269
293
  model: string;
270
294
  reasoningEffort?: string | null;
@@ -280,6 +304,7 @@ export declare function parseCodexModelCatalog(output: string): string[];
280
304
  export declare function parseClaudeModelCatalog(output: string): string[];
281
305
  export declare function claudeModelProbeReportsSelection(output: string, expectedDisplayName: string): boolean;
282
306
  export declare function probeWorkerProviderIndependently<T>(probe: () => T, unavailable: T): T;
307
+ export declare function describeWorkerPreflightReason(reason: string): string;
283
308
  export declare function buildWorkerSetupActions(input: {
284
309
  degradedReasons: string[];
285
310
  playwright?: {
@@ -368,6 +393,7 @@ export declare function enforceInstrumentBrowserHygiene(assignment: WorkerTaskAs
368
393
  remainingTaskTabs: number;
369
394
  blankWindows: number;
370
395
  }>;
396
+ export declare function assignmentRequiresRegisteredBundle(assignment: WorkerTaskAssignmentV2): boolean;
371
397
  export declare function startWorker(options?: WorkerStartOptions): Promise<void>;
372
398
  export declare function reportTask(options: TaskReportOptions): Promise<void>;
373
399
  export declare function showTaskContext(): void;