@playdrop/playdrop-cli 0.18.0 → 0.18.9

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 (63) hide show
  1. package/config/client-meta.json +2 -2
  2. package/dist/apps/upload.js +18 -5
  3. package/dist/commands/devServer.d.ts +2 -1
  4. package/dist/commands/devServer.js +48 -1
  5. package/dist/commands/worker/game-source-git.d.ts +1 -0
  6. package/dist/commands/worker/game-source-git.js +32 -0
  7. package/dist/commands/worker/instrument-evidence.d.ts +1 -0
  8. package/dist/commands/worker/instrument-evidence.js +5 -4
  9. package/dist/commands/worker.d.ts +27 -0
  10. package/dist/commands/worker.js +67 -27
  11. package/node_modules/@playdrop/api-client/dist/acquisition.d.ts +56 -0
  12. package/node_modules/@playdrop/api-client/dist/acquisition.d.ts.map +1 -0
  13. package/node_modules/@playdrop/api-client/dist/acquisition.js +319 -0
  14. package/node_modules/@playdrop/api-client/dist/attribution.d.ts +3 -0
  15. package/node_modules/@playdrop/api-client/dist/attribution.d.ts.map +1 -0
  16. package/node_modules/@playdrop/api-client/dist/attribution.js +30 -0
  17. package/node_modules/@playdrop/api-client/dist/browser-request.d.ts +23 -0
  18. package/node_modules/@playdrop/api-client/dist/browser-request.d.ts.map +1 -0
  19. package/node_modules/@playdrop/api-client/dist/browser-request.js +127 -0
  20. package/node_modules/@playdrop/api-client/dist/chat.d.ts +25 -0
  21. package/node_modules/@playdrop/api-client/dist/chat.d.ts.map +1 -0
  22. package/node_modules/@playdrop/api-client/dist/chat.js +60 -0
  23. package/node_modules/@playdrop/api-client/dist/creator-studio-assets.d.ts +9 -0
  24. package/node_modules/@playdrop/api-client/dist/creator-studio-assets.d.ts.map +1 -0
  25. package/node_modules/@playdrop/api-client/dist/creator-studio-assets.js +68 -0
  26. package/node_modules/@playdrop/api-client/dist/creator-studio-marketing.d.ts +5 -0
  27. package/node_modules/@playdrop/api-client/dist/creator-studio-marketing.d.ts.map +1 -0
  28. package/node_modules/@playdrop/api-client/dist/creator-studio-marketing.js +81 -0
  29. package/node_modules/@playdrop/api-client/dist/creator-studio-shell.d.ts +23 -0
  30. package/node_modules/@playdrop/api-client/dist/creator-studio-shell.d.ts.map +1 -0
  31. package/node_modules/@playdrop/api-client/dist/creator-studio-shell.js +100 -0
  32. package/node_modules/@playdrop/api-client/dist/creator-studio.d.ts +21 -0
  33. package/node_modules/@playdrop/api-client/dist/creator-studio.d.ts.map +1 -0
  34. package/node_modules/@playdrop/api-client/dist/creator-studio.js +191 -0
  35. package/node_modules/@playdrop/api-client/dist/index.d.ts +1 -1
  36. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  37. package/node_modules/@playdrop/api-client/dist/web-push.d.ts +6 -0
  38. package/node_modules/@playdrop/api-client/dist/web-push.d.ts.map +1 -0
  39. package/node_modules/@playdrop/api-client/dist/web-push.js +66 -0
  40. package/node_modules/@playdrop/api-client/package.json +49 -0
  41. package/node_modules/@playdrop/config/client-meta.json +2 -2
  42. package/node_modules/@playdrop/config/dist/test/validateClientEnvironment.test.js +2 -2
  43. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  44. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts +1 -0
  45. package/node_modules/@playdrop/game-source-git/dist/src/git.d.ts.map +1 -1
  46. package/node_modules/@playdrop/game-source-git/dist/src/git.js +12 -2
  47. package/node_modules/@playdrop/game-source-git/dist/src/repository.js +2 -2
  48. package/node_modules/@playdrop/game-source-git/dist/test/core.test.js +16 -0
  49. package/node_modules/@playdrop/game-source-git/dist/tsconfig.tsbuildinfo +1 -1
  50. package/node_modules/@playdrop/types/dist/agent-task-classification.d.ts +47 -113
  51. package/node_modules/@playdrop/types/dist/agent-task-classification.d.ts.map +1 -1
  52. package/node_modules/@playdrop/types/dist/agent-task-classification.js +25 -43
  53. package/node_modules/@playdrop/types/dist/agent-task-terminal.d.ts.map +1 -1
  54. package/node_modules/@playdrop/types/dist/agent-task-terminal.js +1 -1
  55. package/node_modules/@playdrop/types/dist/api.d.ts +2 -2
  56. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  57. package/node_modules/@playdrop/types/dist/api.js +0 -1
  58. package/node_modules/@playdrop/types/dist/instrument-evidence.d.ts.map +1 -1
  59. package/node_modules/@playdrop/types/dist/instrument-evidence.js +14 -1
  60. package/node_modules/@playdrop/types/dist/version.d.ts +10 -0
  61. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  62. package/node_modules/@playdrop/types/dist/version.js +18 -0
  63. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "0.18.0",
2
+ "version": "0.18.9",
3
3
  "build": 1,
4
- "runtimeSdkVersion": "0.18.0",
4
+ "runtimeSdkVersion": "0.18.9",
5
5
  "runtimeSdkBuild": 1,
6
6
  "clients": {
7
7
  "all": {
@@ -180,11 +180,24 @@ function pushPreparedArtifact(task, currentTotal, file, maxBytes, code, label) {
180
180
  }
181
181
  async function uploadSignedObject(client, creatorUsername, appName, sessionId, file, descriptor) {
182
182
  for (let attempt = 0; attempt < 2; attempt += 1) {
183
- const response = await fetch(descriptor.url, {
184
- method: descriptor.method,
185
- headers: descriptor.headers,
186
- body: file.file,
187
- });
183
+ let response;
184
+ try {
185
+ response = await fetch(descriptor.url, {
186
+ method: descriptor.method,
187
+ headers: descriptor.headers,
188
+ body: file.file,
189
+ });
190
+ }
191
+ catch (error) {
192
+ const cause = error instanceof Error ? error.cause : null;
193
+ const code = cause && typeof cause === "object" && "code" in cause &&
194
+ typeof cause.code === "string" && /^[A-Z][A-Z0-9_]{0,63}$/.test(cause.code)
195
+ ? cause.code
196
+ : "UNKNOWN";
197
+ const annotated = new Error(`direct_object_upload_network_failed:${file.relativePath}:${code}`);
198
+ Object.defineProperty(annotated, "cause", { value: error, configurable: true, writable: true });
199
+ throw annotated;
200
+ }
188
201
  if (response.ok) {
189
202
  return;
190
203
  }
@@ -44,7 +44,8 @@ export declare function buildLocalDevAppUrl(input: {
44
44
  }): string;
45
45
  export declare function terminateChildProcessTree(child: ChildProcess | null, timeoutMs?: number): Promise<void>;
46
46
  export declare function ensureDevRouterRunning(port?: number): Promise<void>;
47
- export declare function startOwnedDevRouter(port: number): Promise<ChildProcess>;
47
+ export declare function stopLegacyWorkerDevRouters(ports: readonly number[]): Promise<number>;
48
+ export declare function startOwnedDevRouter(port: number, ownerPid?: number): Promise<ChildProcess>;
48
49
  export declare function resolveDevRouterWorkingDirectory(cliEntrypoint: string): string;
49
50
  export declare function updateMountedDevRuntimeAssetManifest(input: {
50
51
  creatorUsername: string;
@@ -8,6 +8,7 @@ exports.parseMountConflictError = parseMountConflictError;
8
8
  exports.buildLocalDevAppUrl = buildLocalDevAppUrl;
9
9
  exports.terminateChildProcessTree = terminateChildProcessTree;
10
10
  exports.ensureDevRouterRunning = ensureDevRouterRunning;
11
+ exports.stopLegacyWorkerDevRouters = stopLegacyWorkerDevRouters;
11
12
  exports.startOwnedDevRouter = startOwnedDevRouter;
12
13
  exports.resolveDevRouterWorkingDirectory = resolveDevRouterWorkingDirectory;
13
14
  exports.updateMountedDevRuntimeAssetManifest = updateMountedDevRuntimeAssetManifest;
@@ -546,9 +547,47 @@ async function ensureDevRouterRunning(port = exports.DEV_ROUTER_PORT) {
546
547
  }
547
548
  await startOwnedDevRouter(port);
548
549
  }
550
+ // Managed Mac workers call this with their reserved slots before advertising
551
+ // readiness. The previous supervisor has drained, so its detached routers can
552
+ // be retired without touching another application's listener.
553
+ async function stopLegacyWorkerDevRouters(ports) {
554
+ const routers = new Set();
555
+ for (const port of ports) {
556
+ const listeners = (0, node_child_process_1.spawnSync)("/usr/sbin/lsof", ["-nP", "-a", `-iTCP:${port}`, "-sTCP:LISTEN", "-Fp"], { encoding: "utf8" });
557
+ if (listeners.status === 1 && !listeners.stdout.trim() && !listeners.stderr.trim())
558
+ continue;
559
+ if (listeners.error || listeners.status !== 0)
560
+ throw new Error(`worker_dev_router_inspection_failed:port_${port}`);
561
+ for (const line of listeners.stdout.trim().split("\n")) {
562
+ if (!line.startsWith("p"))
563
+ continue;
564
+ const pid = Number(line.slice(1));
565
+ const processInfo = (0, node_child_process_1.spawnSync)("/bin/ps", ["-p", String(pid), "-o", "uid=,pgid=,command="], { encoding: "utf8" });
566
+ const match = /^\s*(\d+)\s+(\d+)\s+(.+)$/u.exec(processInfo.stdout.trim());
567
+ if (!Number.isSafeInteger(pid) || pid <= 0 || pid === process.pid || !match ||
568
+ Number(match[1]) !== process.getuid?.() ||
569
+ Number(match[2]) !== pid ||
570
+ !/\sproject\s+_dev-router\s+serve(?:\s|$)/u.test(match[3]))
571
+ throw new Error(`worker_dev_router_port_occupied:port_${port}`);
572
+ routers.add(pid);
573
+ }
574
+ }
575
+ await Promise.all([...routers].map(async (pid) => {
576
+ signalProcess(pid, "SIGTERM", true);
577
+ if (!await waitForProcessGroupExit(pid, 2000)) {
578
+ signalProcess(pid, "SIGKILL", true);
579
+ if (!await waitForProcessGroupExit(pid, 2000))
580
+ throw new Error(`worker_dev_router_stop_failed:pid_${pid}`);
581
+ }
582
+ }));
583
+ return routers.size;
584
+ }
549
585
  // Publication checks retain this handle and stop only their own router.
550
586
  // Ordinary project dev intentionally keeps its shared router running.
551
- async function startOwnedDevRouter(port) {
587
+ async function startOwnedDevRouter(port, ownerPid) {
588
+ if (ownerPid !== undefined && (!Number.isSafeInteger(ownerPid) || ownerPid <= 0)) {
589
+ throw new Error("invalid_dev_router_owner_pid");
590
+ }
552
591
  if (await fetchRouterHealth(port))
553
592
  throw new Error(`publishing_dev_router_port_in_use:${port}`);
554
593
  const cliEntrypoint = getCliEntrypointPath();
@@ -561,6 +600,7 @@ async function startOwnedDevRouter(port) {
561
600
  env: {
562
601
  ...childEnv,
563
602
  PLAYDROP_DEV_ROUTER_PORT: String(port),
603
+ ...(ownerPid === undefined ? {} : { PLAYDROP_DEV_ROUTER_OWNER_PID: String(ownerPid) }),
564
604
  },
565
605
  });
566
606
  child.unref();
@@ -1189,6 +1229,13 @@ async function listenDevRouterServer(server, port = exports.DEV_ROUTER_PORT) {
1189
1229
  async function runDevRouterServer(port = Number(process.env.PLAYDROP_DEV_ROUTER_PORT) || exports.DEV_ROUTER_PORT) {
1190
1230
  const server = createDevRouterServer(port);
1191
1231
  await listenDevRouterServer(server, port);
1232
+ const ownerPid = Number(process.env.PLAYDROP_DEV_ROUTER_OWNER_PID);
1233
+ if (Number.isSafeInteger(ownerPid) && ownerPid > 0) {
1234
+ setInterval(() => {
1235
+ if (!isPidAlive(ownerPid))
1236
+ process.exit(0);
1237
+ }, 1000).unref();
1238
+ }
1192
1239
  await new Promise(() => {
1193
1240
  // Keep the router alive until the process exits.
1194
1241
  });
@@ -66,6 +66,7 @@ export declare function setupGameSourceWorkspace(input: {
66
66
  leaseToken: string;
67
67
  }): Promise<GameSourceWorkspace>;
68
68
  export declare function fingerprintGameSourcePublication(projectDir: string, includeServerOutput?: boolean): Promise<string>;
69
+ export declare function preflightGameSourceWorkspace(projectDir: string): Promise<void>;
69
70
  export declare function checkpointFailedGameSourceWorkspace(input: {
70
71
  workspace: GameSourceWorkspace;
71
72
  taskId: number;
@@ -7,6 +7,7 @@ exports.emitGameSourceWorkerEvent = emitGameSourceWorkerEvent;
7
7
  exports.materializeCurrentLock = materializeCurrentLock;
8
8
  exports.setupGameSourceWorkspace = setupGameSourceWorkspace;
9
9
  exports.fingerprintGameSourcePublication = fingerprintGameSourcePublication;
10
+ exports.preflightGameSourceWorkspace = preflightGameSourceWorkspace;
10
11
  exports.checkpointFailedGameSourceWorkspace = checkpointFailedGameSourceWorkspace;
11
12
  exports.reconcileGameSourceWorkspace = reconcileGameSourceWorkspace;
12
13
  exports.finalizeGameSourceRepository = finalizeGameSourceRepository;
@@ -557,6 +558,37 @@ async function stageGameSourceCommit(input) {
557
558
  }
558
559
  return { lock, materials };
559
560
  }
561
+ // Mirror the files left by staging without changing the index, source files,
562
+ // managed ignore block, or task refs. In particular, tracked build directories
563
+ // skipped by walkFiles survive `git add -u` and would fail the outgoing scan.
564
+ async function preflightGameSourceWorkspace(projectDir) {
565
+ const candidates = new Map();
566
+ const tracked = (await git.run(["ls-files", "--stage", "-z"], projectDir)).toString("utf8");
567
+ for (const entry of tracked.split("\0").filter(Boolean)) {
568
+ const tab = entry.indexOf("\t");
569
+ const filePath = entry.slice(tab + 1);
570
+ if (entry.startsWith("160000 "))
571
+ throw new Error(`game_source_gitlink_rejected:${filePath}`);
572
+ const absolute = node_path_1.default.join(projectDir, filePath);
573
+ if ((0, node_fs_1.existsSync)(absolute))
574
+ candidates.set(filePath, await (0, promises_1.readFile)(absolute));
575
+ }
576
+ for (const absolute of await walkFiles(projectDir)) {
577
+ const relative = normalizeRelativePath(projectDir, absolute);
578
+ const content = await (0, promises_1.readFile)(absolute);
579
+ if ((0, game_source_git_1.classifyGameSourceFile)(relative, content) === "git")
580
+ candidates.set(relative, content);
581
+ else
582
+ candidates.delete(relative);
583
+ }
584
+ const ignorePath = node_path_1.default.join(projectDir, ".gitignore");
585
+ const existingIgnore = (0, node_fs_1.existsSync)(ignorePath) ? await (0, promises_1.readFile)(ignorePath, "utf8") : "";
586
+ candidates.set(".gitignore", Buffer.from((0, game_source_git_1.updateManagedGitignore)(existingIgnore)));
587
+ // Reconciliation regenerates this file from the material inventory.
588
+ candidates.delete(game_source_git_1.GAME_SOURCE_LOCK_PATH);
589
+ for (const [filePath, content] of candidates)
590
+ (0, game_source_git_1.validateGameSourceGitBlob)(filePath, content);
591
+ }
560
592
  async function checkpointFailedGameSourceWorkspace(input) {
561
593
  const branch = (await git.run(["symbolic-ref", "--short", "HEAD"], input.workspace.projectDir))
562
594
  .toString("utf8")
@@ -4,6 +4,7 @@ export declare function createWorkerInstrumentScreenshotCollector(workspaceDir:
4
4
  push: (chunk: string) => number;
5
5
  finish: () => number;
6
6
  };
7
+ export declare function resolveInstrumentEvidenceDir(workspaceDir: string, evidenceDir: string): string;
7
8
  export declare function saveInstrumentEvidenceCapture(input: {
8
9
  workspaceDir: string;
9
10
  evidenceDir: string;
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.INSTRUMENT_EVIDENCE_MANIFEST_FILE = void 0;
7
7
  exports.createWorkerInstrumentScreenshotCollector = createWorkerInstrumentScreenshotCollector;
8
+ exports.resolveInstrumentEvidenceDir = resolveInstrumentEvidenceDir;
8
9
  exports.saveInstrumentEvidenceCapture = saveInstrumentEvidenceCapture;
9
10
  exports.readAndValidateInstrumentEvidenceManifest = readAndValidateInstrumentEvidenceManifest;
10
11
  const types_1 = require("@playdrop/types");
@@ -142,9 +143,9 @@ function normalizeGroupId(value) {
142
143
  }
143
144
  return normalized;
144
145
  }
145
- function resolveEvidenceDir(workspaceDir, evidenceDir) {
146
+ function resolveInstrumentEvidenceDir(workspaceDir, evidenceDir) {
146
147
  const resolvedWorkspace = node_path_1.default.resolve(workspaceDir);
147
- const resolvedEvidenceDir = node_path_1.default.resolve(evidenceDir);
148
+ const resolvedEvidenceDir = node_path_1.default.resolve(resolvedWorkspace, evidenceDir);
148
149
  if (!isPathInside(resolvedWorkspace, resolvedEvidenceDir)) {
149
150
  throw new Error("instrument_evidence_dir_outside_workspace");
150
151
  }
@@ -169,7 +170,7 @@ async function saveInstrumentEvidenceCapture(input) {
169
170
  if (!screenshot) {
170
171
  throw new Error(`instrument_screenshot_not_found:${screenshotId}`);
171
172
  }
172
- const evidenceDir = resolveEvidenceDir(input.workspaceDir, input.evidenceDir);
173
+ const evidenceDir = resolveInstrumentEvidenceDir(input.workspaceDir, input.evidenceDir);
173
174
  (0, node_fs_1.mkdirSync)(evidenceDir, { recursive: true });
174
175
  const existing = readManifestIfPresent(evidenceDir);
175
176
  if (existing && existing.groupId !== groupId) {
@@ -242,7 +243,7 @@ function normalizeCapture(value, name) {
242
243
  };
243
244
  }
244
245
  function readAndValidateInstrumentEvidenceManifest(input) {
245
- const evidenceDir = resolveEvidenceDir(input.workspaceDir, input.evidenceDir);
246
+ const evidenceDir = resolveInstrumentEvidenceDir(input.workspaceDir, input.evidenceDir);
246
247
  const parsed = readManifestIfPresent(evidenceDir);
247
248
  if (!parsed || parsed.version !== 1) {
248
249
  throw new Error("missing_instrument_evidence_manifest");
@@ -418,6 +418,25 @@ export declare function buildGrokIsolationEnv(): Record<string, string>;
418
418
  export declare function resolveHostGrokAuthPath(homeDir?: string): string;
419
419
  export declare function mergeCreatorRecoveryResults(runtime: AgentRuntime, initial: LoggedProcessResult, recovery: LoggedProcessResult): LoggedProcessResult;
420
420
  export declare function mergeMissingAgentOutcomeRecoveryResults(runtime: AgentRuntime, initial: LoggedProcessResult, recovery: LoggedProcessResult): LoggedProcessResult;
421
+ export declare function recordAgentRunTelemetry(input: {
422
+ client: ApiClient;
423
+ task: {
424
+ id: number;
425
+ attempts: number;
426
+ };
427
+ assignment: WorkerTaskAssignment;
428
+ workerKey: string;
429
+ leaseToken: string;
430
+ result: LoggedProcessResult;
431
+ status: AgentTaskStatus;
432
+ resolvedRuntimeModel: string;
433
+ reasoningEffort: string | null;
434
+ availableSkillPaths: readonly string[];
435
+ observedSkillPaths?: readonly string[];
436
+ startedAt: Date;
437
+ completedAt: Date;
438
+ terminalReason?: AgentTaskTerminalReason;
439
+ }): Promise<void>;
421
440
  export declare function buildAgentFailureCode(agent: AgentRuntime, result: LoggedProcessResult, request?: {
422
441
  model: string;
423
442
  reasoningEffort?: string | null;
@@ -515,6 +534,14 @@ export declare function assertLaunchAgentPlistCompatible(input: {
515
534
  wrapperPath: string;
516
535
  canonicalPlistPath: string;
517
536
  }): void;
537
+ export declare function writeManagedWorkerWrapper(input: {
538
+ env: string;
539
+ workerName: string;
540
+ workerKey: string;
541
+ }): Promise<{
542
+ wrapperPath: string;
543
+ policyFile: string;
544
+ }>;
518
545
  export declare function launchManagedWorker(label: string, plistPath: string, options: {
519
546
  registrationChanged: boolean;
520
547
  runCommand?: typeof runShell;
@@ -70,6 +70,7 @@ exports.buildGrokIsolationEnv = buildGrokIsolationEnv;
70
70
  exports.resolveHostGrokAuthPath = resolveHostGrokAuthPath;
71
71
  exports.mergeCreatorRecoveryResults = mergeCreatorRecoveryResults;
72
72
  exports.mergeMissingAgentOutcomeRecoveryResults = mergeMissingAgentOutcomeRecoveryResults;
73
+ exports.recordAgentRunTelemetry = recordAgentRunTelemetry;
73
74
  exports.buildAgentFailureCode = buildAgentFailureCode;
74
75
  exports.classifyAgentAvailabilityFailureReason = classifyAgentAvailabilityFailureReason;
75
76
  exports.describeAgentFailureForEvent = describeAgentFailureForEvent;
@@ -100,6 +101,7 @@ exports.withTaskUploadLock = withTaskUploadLock;
100
101
  exports.readActivePersonalWorkerRuntimeState = readActivePersonalWorkerRuntimeState;
101
102
  exports.parseLaunchAgentProgramArguments = parseLaunchAgentProgramArguments;
102
103
  exports.assertLaunchAgentPlistCompatible = assertLaunchAgentPlistCompatible;
104
+ exports.writeManagedWorkerWrapper = writeManagedWorkerWrapper;
103
105
  exports.launchManagedWorker = launchManagedWorker;
104
106
  exports.showWorkerStatus = showWorkerStatus;
105
107
  exports.setupWorker = setupWorker;
@@ -145,6 +147,7 @@ const taskSelection_1 = require("../taskSelection");
145
147
  const review_1 = require("./review");
146
148
  const upload_1 = require("./upload");
147
149
  const staticHtml_1 = require("../apps/staticHtml");
150
+ const devServer_1 = require("./devServer");
148
151
  const runtime_1 = require("./worker/runtime");
149
152
  const instrument_evidence_1 = require("./worker/instrument-evidence");
150
153
  const provider_telemetry_1 = require("./worker/provider-telemetry");
@@ -190,7 +193,7 @@ const FAIL_REPORT_RETRY_DELAY_MS = 2000;
190
193
  const CLAIM_ACK_RETRY_DELAY_MS = 500;
191
194
  const CLAIM_ACK_MAX_ATTEMPTS = 4;
192
195
  exports.WORKSPACE_ARCHIVE_DOWNLOAD_TIMEOUT_MS = 5 * 60000;
193
- const WORKER_WRAPPER_CONTRACT_VERSION = 5;
196
+ const WORKER_WRAPPER_CONTRACT_VERSION = 6;
194
197
  const WORKER_SUPPORTED_KINDS = [
195
198
  "NEW_GAME",
196
199
  "STATIC_GAME",
@@ -3596,12 +3599,6 @@ function buildAgentRunResult(result) {
3596
3599
  tokensUsed: result.tokensUsed,
3597
3600
  };
3598
3601
  }
3599
- function agentFailureRawError(result) {
3600
- return ([result.stderr, result.stdout, result.outputTail]
3601
- .map((value) => value.trim())
3602
- .filter(Boolean)
3603
- .join("\n") || "agent_failure");
3604
- }
3605
3602
  function buildSupervisorFailureRunResult(message) {
3606
3603
  return {
3607
3604
  exitCode: null,
@@ -3692,7 +3689,11 @@ async function recordAgentRunTelemetry(input) {
3692
3689
  completedAt: input.completedAt.toISOString(),
3693
3690
  ...(input.status === "FAILED"
3694
3691
  ? {
3695
- terminalReason: input.terminalReason ?? (0, types_1.classifyAgentTaskTerminalReason)(agentFailureRawError(input.result), "agent"),
3692
+ terminalReason: input.terminalReason ??
3693
+ (0, types_1.classifyAgentTaskTerminalReason)(buildAgentFailureCode(input.assignment.agent.runtime, input.result, {
3694
+ model: input.assignment.agent.model,
3695
+ reasoningEffort: input.reasoningEffort,
3696
+ }), "agent"),
3696
3697
  }
3697
3698
  : {}),
3698
3699
  });
@@ -5168,6 +5169,29 @@ if [ -n "$MINIMUM_CLI_VERSION" ]; then
5168
5169
  version_meets "$CURRENT_CLI_VERSION" "$MINIMUM_CLI_VERSION" || fail_converge "$?" "worker_update_cli_below_minimum"
5169
5170
  fi
5170
5171
 
5172
+ PLAYDROP_EXECUTABLE="$(command -v playdrop)" || fail_converge "$?" "worker_update_playwright_resolve_failed"
5173
+ node - "$PLAYDROP_EXECUTABLE" <<'NODE' || fail_converge "$?" "worker_update_playwright_install_failed"
5174
+ const fs = require("fs");
5175
+ const path = require("path");
5176
+ const { createRequire } = require("module");
5177
+ const { spawnSync } = require("child_process");
5178
+ const cliRequire = createRequire(fs.realpathSync(process.argv[2]));
5179
+ const playwright = cliRequire("playwright-core");
5180
+ const executablePath = playwright.chromium.executablePath();
5181
+ if (!fs.existsSync(executablePath)) {
5182
+ const packagePath = cliRequire.resolve("playwright-core/package.json");
5183
+ const packageJson = cliRequire(packagePath);
5184
+ const installerPath = path.resolve(path.dirname(packagePath), packageJson.bin["playwright-core"]);
5185
+ const result = spawnSync(process.execPath, [installerPath, "install", "chromium"], {
5186
+ stdio: "inherit",
5187
+ env: { ...process.env, PLAYWRIGHT_SKIP_BROWSER_GC: "1" },
5188
+ });
5189
+ if (result.error) throw result.error;
5190
+ if (result.status !== 0) process.exit(result.status || 1);
5191
+ if (!fs.existsSync(executablePath)) throw new Error("worker_update_chromium_missing_after_install");
5192
+ }
5193
+ NODE
5194
+
5171
5195
  if [ "$TARGET_UPDATE_FAILED" -eq 0 ]; then
5172
5196
  rm -f "$FAILURE_FILE"
5173
5197
  fi
@@ -5626,6 +5650,11 @@ async function startWorker(options = {}) {
5626
5650
  const activeTerminators = new Map();
5627
5651
  const activeDevPorts = new Set();
5628
5652
  const workerDevPortBase = (0, runtime_1.readPositiveEnvInt)("PLAYDROP_WORKER_DEV_PORT_BASE", DEFAULT_WORKER_DEV_PORT_BASE);
5653
+ if (target === "FIRST_PARTY" && node_process_1.default.platform === "darwin" && node_process_1.default.env.PLAYDROP_WORKER_WRAPPER_CONTRACT_VERSION) {
5654
+ const stopped = await (0, devServer_1.stopLegacyWorkerDevRouters)(Array.from({ length: maxParallelTasks }, (_, index) => workerDevPortBase + index));
5655
+ if (stopped)
5656
+ console.log(`Stopped ${stopped} detached dev routers before worker readiness.`);
5657
+ }
5629
5658
  let sessionExpired = false;
5630
5659
  let shuttingDown = false;
5631
5660
  let quiescingForUpdate = false;
@@ -5804,6 +5833,7 @@ async function startWorker(options = {}) {
5804
5833
  let agentResult = null;
5805
5834
  let telemetryReported = false;
5806
5835
  let gameServerDevLease = null;
5836
+ let devRouter = null;
5807
5837
  let gameSourceWorkspace = null;
5808
5838
  let gameSourceCommandServer = null;
5809
5839
  let gameSourcePublication = null;
@@ -6282,6 +6312,9 @@ async function startWorker(options = {}) {
6282
6312
  reasoningEffort = codexModel?.reasoningEffort ?? claudeModel?.effort ?? grokModel?.reasoningEffort ?? null;
6283
6313
  const cleanRoom = task.kind === "STATIC_GAME";
6284
6314
  if (task.kind === "NEW_GAME" || task.kind === "REMIX_GAME" || task.kind === "GAME_UPDATE") {
6315
+ // This port belongs to this task until cleanup. Keeping the router
6316
+ // in the supervisor lifecycle prevents an old CLI surviving upgrades.
6317
+ devRouter = await (0, devServer_1.startOwnedDevRouter)(devPort, node_process_1.default.pid);
6285
6318
  const managedRedisAdminUrl = node_process_1.default.env.PLAYDROP_WORKER_GAME_SERVER_REDIS_ADMIN_URL?.trim() ?? "";
6286
6319
  const managedMongoAdminUrl = node_process_1.default.env.PLAYDROP_WORKER_GAME_SERVER_MONGO_ADMIN_URL?.trim() ?? "";
6287
6320
  const redisAdminUrl = managedRedisAdminUrl || node_process_1.default.env.PLAYDROP_DEV_REDIS_URL?.trim() || "";
@@ -6842,7 +6875,7 @@ async function startWorker(options = {}) {
6842
6875
  if (refreshed && refreshed.task.status !== "RUNNING" && refreshed.task.status !== "QUEUED") {
6843
6876
  retainWorkspace = refreshed.task.status === "FAILED";
6844
6877
  console.error(`Agent task ${task.id} was finalized by the server as ${refreshed.task.status}.`);
6845
- await reportTelemetry(refreshed.task.status);
6878
+ await reportTelemetry(refreshed.task.status, undefined, refreshed.task.terminalReason ?? undefined);
6846
6879
  }
6847
6880
  else {
6848
6881
  console.error(`Agent task ${task.id} was aborted by the server; cleaning up without reporting failure.`);
@@ -6876,7 +6909,7 @@ async function startWorker(options = {}) {
6876
6909
  if (refreshed.task.status !== "RUNNING") {
6877
6910
  retainWorkspace = refreshed.task.status === "FAILED";
6878
6911
  console.error(`Agent task ${task.id} was finalized by the agent as ${refreshed.task.status}.`);
6879
- await reportTelemetry(refreshed.task.status);
6912
+ await reportTelemetry(refreshed.task.status, undefined, refreshed.task.terminalReason ?? undefined);
6880
6913
  }
6881
6914
  else if (hasAgentTaskUploadedArtifact(refreshed.task)) {
6882
6915
  console.error(`Agent task ${task.id} uploaded an artifact but exited before task completion; failing it explicitly.`);
@@ -6899,6 +6932,7 @@ async function startWorker(options = {}) {
6899
6932
  model: assignment.agent.model,
6900
6933
  reasoningEffort,
6901
6934
  });
6935
+ const terminalReason = uploadFailure?.terminalReason ?? (0, types_1.classifyAgentTaskTerminalReason)(failureCode, "agent");
6902
6936
  const availabilityReason = uploadFailure
6903
6937
  ? null
6904
6938
  : classifyAgentAvailabilityFailureReason(failureCode, task.kind === "GAME_REVIEW");
@@ -6913,7 +6947,7 @@ async function startWorker(options = {}) {
6913
6947
  });
6914
6948
  if (availabilityReason) {
6915
6949
  retainWorkspace = false;
6916
- await reportTelemetry("FAILED").catch((error) => {
6950
+ await reportTelemetry("FAILED", undefined, terminalReason).catch((error) => {
6917
6951
  console.error(`Agent task ${task.id} telemetry failed before provider handoff: ${error instanceof Error ? error.message : String(error)}`);
6918
6952
  });
6919
6953
  const unavailable = await client.workerRecordAgentTaskAttemptUnavailable(task.id, {
@@ -6932,12 +6966,10 @@ async function startWorker(options = {}) {
6932
6966
  workerKey,
6933
6967
  leaseToken,
6934
6968
  error: failureCode,
6935
- terminalReason: uploadFailure
6936
- ? uploadFailure.terminalReason
6937
- : (0, types_1.classifyAgentTaskTerminalReason)(failureCode, "agent"),
6969
+ terminalReason,
6938
6970
  result: agentRunResult,
6939
6971
  });
6940
- await reportTelemetry("FAILED");
6972
+ await reportTelemetry("FAILED", undefined, terminalReason);
6941
6973
  }
6942
6974
  }
6943
6975
  }
@@ -6946,7 +6978,7 @@ async function startWorker(options = {}) {
6946
6978
  if (refreshed.task.status !== "RUNNING") {
6947
6979
  retainWorkspace = refreshed.task.status === "FAILED";
6948
6980
  console.error(`Agent task ${task.id} was finalized by the agent as ${refreshed.task.status}.`);
6949
- await reportTelemetry(refreshed.task.status);
6981
+ await reportTelemetry(refreshed.task.status, undefined, refreshed.task.terminalReason ?? undefined);
6950
6982
  }
6951
6983
  else if (taskStillMissingAgentOutcome(refreshed) &&
6952
6984
  hasAgentTaskUploadedArtifact(refreshed.task)) {
@@ -7123,6 +7155,7 @@ async function startWorker(options = {}) {
7123
7155
  }
7124
7156
  else {
7125
7157
  const uploadFailure = readRecordedTaskUploadFailure();
7158
+ const terminalReason = uploadFailure?.terminalReason ?? (0, types_1.classifyAgentTaskTerminalReason)("agent_exited_without_task_done", "agent");
7126
7159
  await client.workerCreateAgentTaskEvent(task.id, {
7127
7160
  workerKey,
7128
7161
  leaseToken,
@@ -7135,10 +7168,10 @@ async function startWorker(options = {}) {
7135
7168
  workerKey,
7136
7169
  leaseToken,
7137
7170
  error: uploadFailure?.terminalReason.code ?? "agent_exited_without_task_done",
7138
- ...(uploadFailure ? { terminalReason: uploadFailure.terminalReason } : {}),
7171
+ terminalReason,
7139
7172
  result: agentRunResult,
7140
7173
  });
7141
- await reportTelemetry("FAILED");
7174
+ await reportTelemetry("FAILED", undefined, terminalReason);
7142
7175
  }
7143
7176
  }
7144
7177
  }
@@ -7211,6 +7244,8 @@ async function startWorker(options = {}) {
7211
7244
  clearInterval(eventDrainTimer);
7212
7245
  }
7213
7246
  activeTerminators.delete(task.id);
7247
+ if (devRouter)
7248
+ await (0, devServer_1.terminateChildProcessTree)(devRouter);
7214
7249
  await gameServerDevLease?.cleanup();
7215
7250
  if (completedGameSourceGeneration && gameSourcePublication && gameSourceWorkspace) {
7216
7251
  const publication = gameSourcePublication;
@@ -7735,6 +7770,8 @@ async function uploadTask(options = {}) {
7735
7770
  token: ctx.token,
7736
7771
  user: ctx.user,
7737
7772
  });
7773
+ if (taskContext.gameSourceGit)
7774
+ await (0, game_source_git_1.preflightGameSourceWorkspace)(projectDir);
7738
7775
  for (const warning of result.warnings) {
7739
7776
  console.error(`Preflight warning: ${warning}`);
7740
7777
  }
@@ -8049,7 +8086,7 @@ function readReviewEvidenceFiles(evidenceDir, workspaceDir = resolveTaskWorkspac
8049
8086
  if (!normalizedDir) {
8050
8087
  throw new Error("invalid_review_evidence_dir");
8051
8088
  }
8052
- const resolvedDir = node_path_1.default.resolve(normalizedDir);
8089
+ const resolvedDir = (0, instrument_evidence_1.resolveInstrumentEvidenceDir)(workspaceDir, normalizedDir);
8053
8090
  if (!(0, node_fs_1.existsSync)(resolvedDir)) {
8054
8091
  throw new Error("invalid_review_evidence_dir");
8055
8092
  }
@@ -8086,12 +8123,12 @@ function resolveReviewFilePath(filePath, code) {
8086
8123
  }
8087
8124
  return resolved;
8088
8125
  }
8089
- function resolveReviewEvidenceDir(evidenceDir) {
8126
+ function resolveReviewEvidenceDir(evidenceDir, workspaceDir) {
8090
8127
  const normalizedDir = typeof evidenceDir === "string" ? evidenceDir.trim() : "";
8091
8128
  if (!normalizedDir) {
8092
8129
  throw new Error("invalid_review_evidence_dir");
8093
8130
  }
8094
- const resolved = node_path_1.default.resolve(normalizedDir);
8131
+ const resolved = (0, instrument_evidence_1.resolveInstrumentEvidenceDir)(workspaceDir, normalizedDir);
8095
8132
  if (!(0, node_fs_1.existsSync)(resolved)) {
8096
8133
  throw new Error("invalid_review_evidence_dir");
8097
8134
  }
@@ -8106,7 +8143,7 @@ async function submitReviewTask(options) {
8106
8143
  const state = (0, review_1.normalizeTerminalReviewState)(options.state);
8107
8144
  const reviewMessageFile = resolveReviewFilePath(options.messageFile, "invalid_review_message_file");
8108
8145
  const creatorFeedbackFile = resolveReviewFilePath(options.creatorFeedbackFile, "invalid_creator_feedback_file");
8109
- const evidenceDir = resolveReviewEvidenceDir(options.evidenceDir);
8146
+ const evidenceDir = resolveReviewEvidenceDir(options.evidenceDir, workspaceDir);
8110
8147
  const reviewMessage = readRequiredTextFile(reviewMessageFile, "invalid_review_message_file");
8111
8148
  const creatorFeedback = readOptionalTextFile(creatorFeedbackFile);
8112
8149
  const platformFeedback = readPlatformFeedbackFile(options.platformFeedbackFile, workspaceDir);
@@ -8169,7 +8206,8 @@ async function submitEvalTask(options) {
8169
8206
  const evidenceFiles = [];
8170
8207
  const groupIds = new Set();
8171
8208
  for (const evidenceDir of evidenceDirs) {
8172
- const manifest = (0, instrument_evidence_1.readAndValidateInstrumentEvidenceManifest)({ workspaceDir, evidenceDir });
8209
+ const resolvedEvidenceDir = (0, instrument_evidence_1.resolveInstrumentEvidenceDir)(workspaceDir, evidenceDir);
8210
+ const manifest = (0, instrument_evidence_1.readAndValidateInstrumentEvidenceManifest)({ workspaceDir, evidenceDir: resolvedEvidenceDir });
8173
8211
  if (groupIds.has(manifest.groupId)) {
8174
8212
  throw new Error(`duplicate_instrument_evidence_group:${manifest.groupId}`);
8175
8213
  }
@@ -8180,7 +8218,7 @@ async function submitEvalTask(options) {
8180
8218
  if (!capture) {
8181
8219
  continue;
8182
8220
  }
8183
- const filePath = node_path_1.default.join(node_path_1.default.resolve(evidenceDir), capture.fileName);
8221
+ const filePath = node_path_1.default.join(resolvedEvidenceDir, capture.fileName);
8184
8222
  evidenceFiles.push({
8185
8223
  groupId: manifest.groupId,
8186
8224
  name: capture.fileName,
@@ -8214,14 +8252,16 @@ async function saveTaskEvidence(options) {
8214
8252
  if (!evidenceDir || !name || !groupId) {
8215
8253
  throw new Error("task_evidence_options_required");
8216
8254
  }
8255
+ const workspaceDir = resolveTaskWorkspaceDir();
8256
+ const resolvedEvidenceDir = (0, instrument_evidence_1.resolveInstrumentEvidenceDir)(workspaceDir, evidenceDir);
8217
8257
  const capture = await (0, instrument_evidence_1.saveInstrumentEvidenceCapture)({
8218
- workspaceDir: resolveTaskWorkspaceDir(),
8219
- evidenceDir,
8258
+ workspaceDir,
8259
+ evidenceDir: resolvedEvidenceDir,
8220
8260
  groupId,
8221
8261
  name,
8222
8262
  ...(screenshotId ? { screenshotId } : {}),
8223
8263
  });
8224
- (0, output_1.printSuccess)(`Saved ${capture.name} evidence from screenshot ${capture.screenshotId} to ${capture.fileName}.`);
8264
+ (0, output_1.printSuccess)(`Saved ${capture.name} evidence from screenshot ${capture.screenshotId} to ${node_path_1.default.join(resolvedEvidenceDir, capture.fileName)}.`);
8225
8265
  }
8226
8266
  const INSTRUMENT_ERROR_REASONS = new Set(["auth_state", "browser_control", "renderer", "screenshot"]);
8227
8267
  async function instrumentErrorTask(options) {
@@ -0,0 +1,56 @@
1
+ import type { AgentTaskCreatorFeedbackStatus, AppAuthMode, AppDetailRequest, AppDetailResponse, AppVersionDetailResponse, AppVersionVisibility, ContentCommentsResponse, ContentLicense, ContentRemixRelationsResponse, CreateCommentReportRequest, CreateContentCommentRequest, CreateContentCommentResponse, CreateContentReportRequest, CreateCreatorReportRequest, CreatorBlockMutationResponse, CreatorFollowMutationResponse, CreatorGameCreatorFeedbackStatusResponse, CreatorGamesListResponse, CreatorGameStatusResponse, DeleteContentCommentResponse, DislikedItemMutationResponse, GetLeaderboardResponse, LeaderboardEntry, LikedItemMutationResponse, ListAchievementsResponse, ListLeaderboardsResponse, ModerationReportResponse, SavedItemKind, SavedItemMutationResponse, SocialFriend, TrackEngagementEventRequest, TrackEngagementEventResponse, UpdateVersionResponse } from "@playdrop/types";
2
+ export declare function fetchAppDetail(creatorUsername: string, appName: string, options?: AppDetailRequest): Promise<AppDetailResponse>;
3
+ export declare function fetchUserByUsername(username: string): Promise<import("@playdrop/types").PublicUser>;
4
+ export declare function fetchAssetBySlug(creatorUsername: string, assetName: string): Promise<import("@playdrop/types").AssetResponse>;
5
+ export declare function fetchAssetRelated(creatorUsername: string, assetName: string): Promise<ContentRemixRelationsResponse>;
6
+ export declare function getPlatformGameFriends(appId: number): Promise<SocialFriend[]>;
7
+ export declare function listAchievements(appId: number, options?: {
8
+ includeHiddenDefinitions?: boolean;
9
+ includeRetired?: boolean;
10
+ }): Promise<ListAchievementsResponse>;
11
+ export declare function listLeaderboards(appId: number, options?: {
12
+ includeRetired?: boolean;
13
+ }): Promise<ListLeaderboardsResponse>;
14
+ export declare function getLeaderboard(appId: number, key: string, options?: {
15
+ top?: number;
16
+ aroundMe?: number;
17
+ includeRetired?: boolean;
18
+ }): Promise<GetLeaderboardResponse>;
19
+ export declare function getFriendLeaderboardEntries(appId: number, key: string): Promise<LeaderboardEntry[]>;
20
+ export declare function getAppVersion(creatorUsername: string, appName: string, version: string): Promise<AppVersionDetailResponse>;
21
+ export declare function updateAppVersion(creatorUsername: string, appName: string, version: string, updates: {
22
+ releaseNotes?: string | null;
23
+ visibility?: AppVersionVisibility;
24
+ authMode?: AppAuthMode;
25
+ license?: ContentLicense;
26
+ setAsCurrent?: boolean;
27
+ }): Promise<UpdateVersionResponse>;
28
+ export declare function getCreatorGameStatus(gameRef: string): Promise<CreatorGameStatusResponse>;
29
+ export declare function listCreatorGames(options?: {
30
+ limit?: number;
31
+ offset?: number;
32
+ signal?: AbortSignal;
33
+ }): Promise<CreatorGamesListResponse>;
34
+ export declare function updateCreatorGameFeedbackStatus(gameRef: string, appVersionId: number, creatorFeedbackStatus: AgentTaskCreatorFeedbackStatus, comment?: string): Promise<CreatorGameCreatorFeedbackStatusResponse>;
35
+ export declare function trackEngagementEvent(payload: TrackEngagementEventRequest): Promise<TrackEngagementEventResponse>;
36
+ export declare function saveItem(kind: SavedItemKind, creatorUsername: string, itemName: string): Promise<SavedItemMutationResponse>;
37
+ export declare function unsaveItem(kind: SavedItemKind, creatorUsername: string, itemName: string): Promise<SavedItemMutationResponse>;
38
+ export declare function likeItem(kind: SavedItemKind, creatorUsername: string, itemName: string): Promise<LikedItemMutationResponse>;
39
+ export declare function unlikeItem(kind: SavedItemKind, creatorUsername: string, itemName: string): Promise<LikedItemMutationResponse>;
40
+ export declare function dislikeItem(kind: SavedItemKind, creatorUsername: string, itemName: string): Promise<DislikedItemMutationResponse>;
41
+ export declare function undislikeItem(kind: SavedItemKind, creatorUsername: string, itemName: string): Promise<DislikedItemMutationResponse>;
42
+ export declare function reportContent(kind: SavedItemKind, creatorUsername: string, itemName: string, report: CreateContentReportRequest): Promise<ModerationReportResponse>;
43
+ export declare function reportCreator(creatorUsername: string, report: CreateCreatorReportRequest): Promise<ModerationReportResponse>;
44
+ export declare function followCreator(creatorUsername: string): Promise<CreatorFollowMutationResponse>;
45
+ export declare function unfollowCreator(creatorUsername: string): Promise<CreatorFollowMutationResponse>;
46
+ export declare function blockCreator(creatorUsername: string): Promise<CreatorBlockMutationResponse>;
47
+ export declare function unblockCreator(creatorUsername: string): Promise<CreatorBlockMutationResponse>;
48
+ export declare function fetchContentComments(kind: SavedItemKind, creatorUsername: string, itemName: string): Promise<ContentCommentsResponse>;
49
+ export declare function createContentComment(kind: SavedItemKind, creatorUsername: string, itemName: string, body: CreateContentCommentRequest): Promise<CreateContentCommentResponse>;
50
+ export declare function likeContentComment(commentId: number): Promise<LikedItemMutationResponse>;
51
+ export declare function unlikeContentComment(commentId: number): Promise<LikedItemMutationResponse>;
52
+ export declare function dislikeContentComment(commentId: number): Promise<DislikedItemMutationResponse>;
53
+ export declare function undislikeContentComment(commentId: number): Promise<DislikedItemMutationResponse>;
54
+ export declare function reportComment(commentId: number, report: CreateCommentReportRequest): Promise<ModerationReportResponse>;
55
+ export declare function deleteContentComment(commentId: number): Promise<DeleteContentCommentResponse>;
56
+ //# sourceMappingURL=acquisition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acquisition.d.ts","sourceRoot":"","sources":["../src/acquisition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,WAAW,EAEX,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,6BAA6B,EAC7B,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,wCAAwC,EACxC,wBAAwB,EACxB,yBAAyB,EACzB,4BAA4B,EAC5B,4BAA4B,EAC5B,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACb,yBAAyB,EACzB,YAAY,EACZ,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EAEtB,MAAM,iBAAiB,CAA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