@11agents/cli 0.1.24 → 0.1.25

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 (71) hide show
  1. package/README.md +52 -0
  2. package/bin/11agents.js +12 -0
  3. package/mobile-runtime/README.md +19 -0
  4. package/mobile-runtime/configs/platforms/xiaohongshu_d01.json +73 -0
  5. package/mobile-runtime/configs/platforms/xiaohongshu_d02.json +70 -0
  6. package/mobile-runtime/configs/platforms/xiaohongshu_d03.json +73 -0
  7. package/mobile-runtime/configs/publish_policy.json +40 -0
  8. package/mobile-runtime/data-templates/README.md +4 -0
  9. package/mobile-runtime/data-templates/accounts.example.csv +6 -0
  10. package/mobile-runtime/data-templates/devices.example.csv +2 -0
  11. package/mobile-runtime/data-templates/publish_records.example.jsonl +2 -0
  12. package/mobile-runtime/data-templates/tasks.example.jsonl +5 -0
  13. package/mobile-runtime/data-templates/video_metrics.example.jsonl +1 -0
  14. package/mobile-runtime/python/pyproject.toml +34 -0
  15. package/mobile-runtime/python/src/device_control/__init__.py +5 -0
  16. package/mobile-runtime/python/src/device_control/adapters/__init__.py +31 -0
  17. package/mobile-runtime/python/src/device_control/adapters/base.py +43 -0
  18. package/mobile-runtime/python/src/device_control/adapters/facebook.py +30 -0
  19. package/mobile-runtime/python/src/device_control/adapters/instagram.py +25 -0
  20. package/mobile-runtime/python/src/device_control/adapters/reddit.py +29 -0
  21. package/mobile-runtime/python/src/device_control/adapters/tiktok.py +25 -0
  22. package/mobile-runtime/python/src/device_control/adapters/x.py +29 -0
  23. package/mobile-runtime/python/src/device_control/adapters/xiaohongshu.py +26 -0
  24. package/mobile-runtime/python/src/device_control/adb.py +161 -0
  25. package/mobile-runtime/python/src/device_control/appium_client.py +131 -0
  26. package/mobile-runtime/python/src/device_control/appium_manager.py +403 -0
  27. package/mobile-runtime/python/src/device_control/cli.py +1608 -0
  28. package/mobile-runtime/python/src/device_control/entrypoints.py +60 -0
  29. package/mobile-runtime/python/src/device_control/locks.py +162 -0
  30. package/mobile-runtime/python/src/device_control/metrics/__init__.py +33 -0
  31. package/mobile-runtime/python/src/device_control/metrics/collectors.py +320 -0
  32. package/mobile-runtime/python/src/device_control/metrics/tiktok_account_adb.py +367 -0
  33. package/mobile-runtime/python/src/device_control/metrics/tiktok_video_adb.py +714 -0
  34. package/mobile-runtime/python/src/device_control/models.py +439 -0
  35. package/mobile-runtime/python/src/device_control/publish_policy.py +173 -0
  36. package/mobile-runtime/python/src/device_control/publishers/__init__.py +24 -0
  37. package/mobile-runtime/python/src/device_control/publishers/facebook_adb.py +494 -0
  38. package/mobile-runtime/python/src/device_control/publishers/instagram_adb.py +663 -0
  39. package/mobile-runtime/python/src/device_control/publishers/reddit_adb.py +595 -0
  40. package/mobile-runtime/python/src/device_control/publishers/tiktok_adb.py +477 -0
  41. package/mobile-runtime/python/src/device_control/publishers/tiktok_appium.py +259 -0
  42. package/mobile-runtime/python/src/device_control/publishers/ui_helpers.py +372 -0
  43. package/mobile-runtime/python/src/device_control/publishers/x_adb.py +636 -0
  44. package/mobile-runtime/python/src/device_control/publishers/xiaohongshu_adb.py +1143 -0
  45. package/mobile-runtime/python/src/device_control/store.py +137 -0
  46. package/mobile-runtime/scripts/appium_smoke.py +71 -0
  47. package/mobile-runtime/skills/android-collect-tiktok-metrics/SKILL.md +60 -0
  48. package/mobile-runtime/skills/android-collect-tiktok-metrics/agents/openai.yaml +4 -0
  49. package/mobile-runtime/skills/android-group-control-cli/SKILL.md +76 -0
  50. package/mobile-runtime/skills/android-group-control-cli/agents/openai.yaml +4 -0
  51. package/mobile-runtime/skills/android-group-control-cli/references/command-reference.md +122 -0
  52. package/mobile-runtime/skills/android-publish-facebook/SKILL.md +41 -0
  53. package/mobile-runtime/skills/android-publish-facebook/agents/openai.yaml +4 -0
  54. package/mobile-runtime/skills/android-publish-instagram/SKILL.md +45 -0
  55. package/mobile-runtime/skills/android-publish-instagram/agents/openai.yaml +4 -0
  56. package/mobile-runtime/skills/android-publish-reddit/SKILL.md +41 -0
  57. package/mobile-runtime/skills/android-publish-reddit/agents/openai.yaml +4 -0
  58. package/mobile-runtime/skills/android-publish-tiktok/SKILL.md +43 -0
  59. package/mobile-runtime/skills/android-publish-tiktok/agents/openai.yaml +4 -0
  60. package/mobile-runtime/skills/android-publish-x/SKILL.md +40 -0
  61. package/mobile-runtime/skills/android-publish-x/agents/openai.yaml +4 -0
  62. package/mobile-runtime/skills/android-publish-xiaohongshu/SKILL.md +50 -0
  63. package/mobile-runtime/skills/android-publish-xiaohongshu/agents/openai.yaml +4 -0
  64. package/mobile-runtime/skills/mobile-publish-data-collection/SKILL.md +49 -0
  65. package/mobile-runtime/skills/mobile-publish-device-health/SKILL.md +47 -0
  66. package/mobile-runtime/skills/mobile-publish-execution/SKILL.md +57 -0
  67. package/mobile-runtime/skills/mobile-publish-records/SKILL.md +29 -0
  68. package/package.json +4 -1
  69. package/scripts/mobile-postinstall.js +26 -0
  70. package/src/commands/mobile.js +695 -0
  71. package/src/commands/runtime.js +6 -5
@@ -731,9 +731,10 @@ function projectDirForTask(task, flags = {}, deps) {
731
731
  return buildRuntimeProjectDir(projectSlugForTask(task, flags), { homeDir: deps.homeDir })
732
732
  }
733
733
 
734
- async function projectSyncToken(project, flags = {}, deps = {}) {
734
+ async function projectSyncToken(project, flags = {}, deps = {}, workspaceToken = '') {
735
735
  return resolveProjectToken(project, {
736
736
  homeDir: deps.homeDir,
737
+ token: workspaceToken || '',
737
738
  fallbackToken: flags.token,
738
739
  })
739
740
  }
@@ -944,7 +945,7 @@ async function syncDatabaseIfNeeded({ task, workdir, config, flags, deps }) {
944
945
  if (!spec.syncRequired && localRevision === spec.cloudRevision) return { synced: false, cloud_revision: localRevision }
945
946
 
946
947
  const project = projectSlugForTask(task)
947
- const token = await projectSyncToken(projectTokenCandidatesForTask(task, flags), flags, deps)
948
+ const token = await projectSyncToken(projectTokenCandidatesForTask(task, flags), flags, deps, task.workspace?.swarm_token)
948
949
  const syncConfig = { ...config, token }
949
950
  const result = await deps.requestJson(`/api/projects/${project}/database/sync`, {
950
951
  method: 'POST',
@@ -1003,7 +1004,7 @@ async function prepareRuntimeTask(task, flags, deps, config) {
1003
1004
 
1004
1005
  // Resolve and inject the project token so hosted MCP calls spawned by the
1005
1006
  // runtime agent can authenticate without needing credentials on disk.
1006
- const projectToken = await projectSyncToken(projectTokenCandidatesForTask(task, flags), flags, deps)
1007
+ const projectToken = await projectSyncToken(projectTokenCandidatesForTask(task, flags), flags, deps, task.workspace?.swarm_token)
1007
1008
  const env = {
1008
1009
  ...process.env,
1009
1010
  ...agentEnvironment(task),
@@ -1374,7 +1375,7 @@ async function runOneRuntimeTaskSlot(runtime, config, machineKey, registration,
1374
1375
  let completion = null
1375
1376
  let executionContext = null
1376
1377
  if (runtimeTask.workspace?.slug) {
1377
- const token = await projectSyncToken(projectTokenCandidatesForTask(runtimeTask, flags), flags, deps)
1378
+ const token = await projectSyncToken(projectTokenCandidatesForTask(runtimeTask, flags), flags, deps, runtimeTask.workspace?.swarm_token)
1378
1379
  const syncConfig = { ...config, token }
1379
1380
  try {
1380
1381
  await runWithTaskRetry('sync knowledge base', () => (
@@ -1437,7 +1438,7 @@ async function runOneRuntimeTaskSlot(runtime, config, machineKey, registration,
1437
1438
  if (executionContext && runtimeTask.workspace?.slug) {
1438
1439
  const isDeepOrganize = Boolean(knowledgeDeepOrganizeSpec(runtimeTask))
1439
1440
  const syncBack = isDeepOrganize ? deps.mcpKnowledgeSync : deps.syncKnowledge
1440
- const token = await projectSyncToken(projectTokenCandidatesForTask(runtimeTask, flags), flags, deps)
1441
+ const token = await projectSyncToken(projectTokenCandidatesForTask(runtimeTask, flags), flags, deps, runtimeTask.workspace?.swarm_token)
1441
1442
  const syncConfig = { ...config, token }
1442
1443
  const pushKnowledge = () => syncBack({
1443
1444
  project: runtimeTask.workspace.slug,