@abelxiaoxing/cadence 2.0.37 → 2.0.40

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 (48) hide show
  1. package/README.de.md +2 -2
  2. package/README.es.md +2 -2
  3. package/README.fr.md +2 -2
  4. package/README.ja.md +2 -2
  5. package/README.ko.md +2 -2
  6. package/README.md +9 -7
  7. package/README.pt-BR.md +2 -2
  8. package/README.ru.md +2 -2
  9. package/README.zh-CN.md +10 -8
  10. package/agents/design-explorer.md +4 -2
  11. package/agents/diagnosis-worker.md +5 -2
  12. package/agents/implementation-worker.md +19 -12
  13. package/docs/conversation-mode.md +73 -16
  14. package/docs/reuse-and-distribution.md +78 -0
  15. package/package.json +7 -2
  16. package/src/activity.ts +147 -0
  17. package/src/agent-browser/session-navigator.ts +33 -6
  18. package/src/agent-browser/source.ts +23 -19
  19. package/src/agent-panel-cadence.ts +147 -628
  20. package/src/agent-panel-model.ts +30 -19
  21. package/src/agent-panel.ts +12 -16
  22. package/src/cadence-instructions.ts +8 -7
  23. package/src/cadence-mode.ts +30 -9
  24. package/src/change-tools.mjs +268 -0
  25. package/src/coordinator-tools.mjs +2 -2
  26. package/src/git-environment.d.mts +2 -0
  27. package/src/git-environment.mjs +24 -0
  28. package/src/index.ts +3 -1
  29. package/src/native-build.ts +1 -1
  30. package/src/native-workflow-history.ts +20 -3
  31. package/src/operator-cli.mjs +22 -12
  32. package/src/research-scan.mjs +111 -31
  33. package/src/research-tools.mjs +75 -16
  34. package/src/sdk-worker.mjs +6 -1
  35. package/src/service/activity-files.ts +190 -0
  36. package/src/service/contracts/workbench.ts +11 -3
  37. package/src/service/contracts/workflow.ts +283 -16
  38. package/src/service/coordination.ts +13 -3
  39. package/src/service-cli.mjs +392 -93
  40. package/src/service-host.mjs +7635 -5682
  41. package/src/worker-capture.mjs +24 -1
  42. package/src/worker-public.mjs +18 -0
  43. package/src/worker-redaction.mjs +11 -0
  44. package/src/worker-toolkit.mjs +55 -2
  45. package/src/workspace.ts +62 -25
  46. package/web/dist/assets/cadence.css +1 -1
  47. package/web/dist/assets/cadence.js +19 -18
  48. package/web/dist/manifest.json +7 -7
@@ -227,12 +227,15 @@ export class ServiceCoordination {
227
227
  readonly files: PrivateFiles;
228
228
  readonly registryDirectory: string;
229
229
  readonly stateHome: string;
230
- /** null addresses only account-wide registry recovery, never an implicit cwd. */
231
- constructor(workspace: string | null, stateHome?: string) {
230
+ /** null addresses only the account registry. An already validated CheckoutStore
231
+ * lets registry observation retain the registered root without running Git. */
232
+ constructor(workspace: string | CheckoutStore | null, stateHome?: string) {
232
233
  this.project =
233
234
  workspace === null
234
235
  ? undefined
235
- : new CheckoutStore(resolveWorkspace(workspace).root, stateHome);
236
+ : workspace instanceof CheckoutStore
237
+ ? workspace
238
+ : new CheckoutStore(resolveWorkspace(workspace).root, stateHome);
236
239
  this.stateHome = this.project
237
240
  ? dirname(dirname(this.project.privateRoot))
238
241
  : canonicalAmbientRoot(stateHome ?? defaultStateHome());
@@ -572,6 +575,13 @@ export class ServiceCoordination {
572
575
  reselectExisting?: (hostConfig: FileSnapshot) => void,
573
576
  ): OwnerLease {
574
577
  void this.store; // An account-only recovery target cannot acquire an owner.
578
+ if (
579
+ rootsOverlap(
580
+ this.store.root,
581
+ join(this.stateHome, "cadence-worktrees-v1"),
582
+ )
583
+ )
584
+ throw new ContractError("forbidden"); // Managed worktrees belong to their original run, never an implicit project owner.
575
585
  const config = decodeOwnerConfig(input);
576
586
  const bound = endpoint(resolvedEndpoint);
577
587
  if (!endpointMatches(config.endpoint, bound))