@11agents/cli 0.1.24 → 0.1.26
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.
- package/README.md +52 -0
- package/bin/11agents.js +12 -0
- package/mobile-runtime/README.md +19 -0
- package/mobile-runtime/configs/platforms/xiaohongshu_d01.json +73 -0
- package/mobile-runtime/configs/platforms/xiaohongshu_d02.json +70 -0
- package/mobile-runtime/configs/platforms/xiaohongshu_d03.json +73 -0
- package/mobile-runtime/configs/publish_policy.json +40 -0
- package/mobile-runtime/data-templates/README.md +4 -0
- package/mobile-runtime/data-templates/accounts.example.csv +6 -0
- package/mobile-runtime/data-templates/devices.example.csv +2 -0
- package/mobile-runtime/data-templates/publish_records.example.jsonl +2 -0
- package/mobile-runtime/data-templates/tasks.example.jsonl +5 -0
- package/mobile-runtime/data-templates/video_metrics.example.jsonl +1 -0
- package/mobile-runtime/python/pyproject.toml +34 -0
- package/mobile-runtime/python/src/device_control/__init__.py +5 -0
- package/mobile-runtime/python/src/device_control/adapters/__init__.py +31 -0
- package/mobile-runtime/python/src/device_control/adapters/base.py +43 -0
- package/mobile-runtime/python/src/device_control/adapters/facebook.py +30 -0
- package/mobile-runtime/python/src/device_control/adapters/instagram.py +25 -0
- package/mobile-runtime/python/src/device_control/adapters/reddit.py +29 -0
- package/mobile-runtime/python/src/device_control/adapters/tiktok.py +25 -0
- package/mobile-runtime/python/src/device_control/adapters/x.py +29 -0
- package/mobile-runtime/python/src/device_control/adapters/xiaohongshu.py +26 -0
- package/mobile-runtime/python/src/device_control/adb.py +161 -0
- package/mobile-runtime/python/src/device_control/appium_client.py +131 -0
- package/mobile-runtime/python/src/device_control/appium_manager.py +403 -0
- package/mobile-runtime/python/src/device_control/cli.py +1608 -0
- package/mobile-runtime/python/src/device_control/entrypoints.py +60 -0
- package/mobile-runtime/python/src/device_control/locks.py +162 -0
- package/mobile-runtime/python/src/device_control/metrics/__init__.py +33 -0
- package/mobile-runtime/python/src/device_control/metrics/collectors.py +320 -0
- package/mobile-runtime/python/src/device_control/metrics/tiktok_account_adb.py +367 -0
- package/mobile-runtime/python/src/device_control/metrics/tiktok_video_adb.py +714 -0
- package/mobile-runtime/python/src/device_control/models.py +439 -0
- package/mobile-runtime/python/src/device_control/publish_policy.py +173 -0
- package/mobile-runtime/python/src/device_control/publishers/__init__.py +24 -0
- package/mobile-runtime/python/src/device_control/publishers/facebook_adb.py +494 -0
- package/mobile-runtime/python/src/device_control/publishers/instagram_adb.py +663 -0
- package/mobile-runtime/python/src/device_control/publishers/reddit_adb.py +595 -0
- package/mobile-runtime/python/src/device_control/publishers/tiktok_adb.py +477 -0
- package/mobile-runtime/python/src/device_control/publishers/tiktok_appium.py +259 -0
- package/mobile-runtime/python/src/device_control/publishers/ui_helpers.py +372 -0
- package/mobile-runtime/python/src/device_control/publishers/x_adb.py +636 -0
- package/mobile-runtime/python/src/device_control/publishers/xiaohongshu_adb.py +1143 -0
- package/mobile-runtime/python/src/device_control/store.py +137 -0
- package/mobile-runtime/scripts/appium_smoke.py +71 -0
- package/mobile-runtime/skills/android-collect-tiktok-metrics/SKILL.md +60 -0
- package/mobile-runtime/skills/android-collect-tiktok-metrics/agents/openai.yaml +4 -0
- package/mobile-runtime/skills/android-group-control-cli/SKILL.md +76 -0
- package/mobile-runtime/skills/android-group-control-cli/agents/openai.yaml +4 -0
- package/mobile-runtime/skills/android-group-control-cli/references/command-reference.md +122 -0
- package/mobile-runtime/skills/android-publish-facebook/SKILL.md +41 -0
- package/mobile-runtime/skills/android-publish-facebook/agents/openai.yaml +4 -0
- package/mobile-runtime/skills/android-publish-instagram/SKILL.md +45 -0
- package/mobile-runtime/skills/android-publish-instagram/agents/openai.yaml +4 -0
- package/mobile-runtime/skills/android-publish-reddit/SKILL.md +41 -0
- package/mobile-runtime/skills/android-publish-reddit/agents/openai.yaml +4 -0
- package/mobile-runtime/skills/android-publish-tiktok/SKILL.md +43 -0
- package/mobile-runtime/skills/android-publish-tiktok/agents/openai.yaml +4 -0
- package/mobile-runtime/skills/android-publish-x/SKILL.md +40 -0
- package/mobile-runtime/skills/android-publish-x/agents/openai.yaml +4 -0
- package/mobile-runtime/skills/android-publish-xiaohongshu/SKILL.md +50 -0
- package/mobile-runtime/skills/android-publish-xiaohongshu/agents/openai.yaml +4 -0
- package/mobile-runtime/skills/mobile-publish-data-collection/SKILL.md +49 -0
- package/mobile-runtime/skills/mobile-publish-device-health/SKILL.md +47 -0
- package/mobile-runtime/skills/mobile-publish-execution/SKILL.md +57 -0
- package/mobile-runtime/skills/mobile-publish-records/SKILL.md +29 -0
- package/package.json +4 -1
- package/scripts/mobile-postinstall.js +26 -0
- package/src/commands/mobile.js +695 -0
- package/src/commands/runtime.js +21 -5
package/src/commands/runtime.js
CHANGED
|
@@ -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),
|
|
@@ -1060,6 +1061,21 @@ function buildCodexPrompt(task) {
|
|
|
1060
1061
|
'',
|
|
1061
1062
|
'MCP tool guidance:',
|
|
1062
1063
|
'- If the task needs image generation, use the hosted 11agents MCP `image_generate` tool when available.',
|
|
1064
|
+
'- Recommended image_generate defaults: model="nano", nano_model="preview", aspect="1:1", image_size="2K".',
|
|
1065
|
+
'- nano_model alternatives: "preview", "pro", "flash". Use "preview" for reliable default quality, "pro" for harder prompts, and "flash" for faster drafts.',
|
|
1066
|
+
'- aspect alternatives: "1:1", "16:9", "9:16", "4:3", "3:4". Choose the closest ratio to the final placement.',
|
|
1067
|
+
'- image_size alternatives: "1K", "2K". For a specific output size, pass aspect and image_size; pass size only when the MCP tool/provider explicitly supports the requested exact dimensions.',
|
|
1068
|
+
'- Use model="gpt" with model_id only when the task or current project notes confirm that GPT image generation is available for the hosted MCP key.',
|
|
1069
|
+
'',
|
|
1070
|
+
'Final task comment requirements:',
|
|
1071
|
+
'> [!IMPORTANT]',
|
|
1072
|
+
'> Default to a directly reviewable final comment. Do not only say the task is done.',
|
|
1073
|
+
'- Every deliverable must appear in the final comment as a Markdown link to the file in agent_results_dir, for example `[final image](<absolute path>)` or `[report](<absolute path>)`.',
|
|
1074
|
+
'- Put generated images, reports, datasets, and other final artifacts in agent_results_dir before linking them. The platform will upload allowed local links from agent_results_dir and replace them with reviewable asset URLs.',
|
|
1075
|
+
'- Include a `## Deliverables` section first when files or generated media exist. Include a compact `## Review Notes` section after it with what changed and what to inspect.',
|
|
1076
|
+
'- Use Markdown tables for comparisons, parameter lists, changelogs, data analysis, and multi-field entries.',
|
|
1077
|
+
'- Use `##` and `###` headings, blank lines between paragraphs, bold keywords for important labels, and GitHub alert blocks for important notes or warnings.',
|
|
1078
|
+
'- Use ordered lists for step-by-step workflows and unordered lists for parallel facts. Use fenced code blocks with a language tag, and use mermaid for flows or architecture when a diagram is useful.',
|
|
1063
1079
|
'',
|
|
1064
1080
|
'Task context:',
|
|
1065
1081
|
compactJson({
|
|
@@ -1374,7 +1390,7 @@ async function runOneRuntimeTaskSlot(runtime, config, machineKey, registration,
|
|
|
1374
1390
|
let completion = null
|
|
1375
1391
|
let executionContext = null
|
|
1376
1392
|
if (runtimeTask.workspace?.slug) {
|
|
1377
|
-
const token = await projectSyncToken(projectTokenCandidatesForTask(runtimeTask, flags), flags, deps)
|
|
1393
|
+
const token = await projectSyncToken(projectTokenCandidatesForTask(runtimeTask, flags), flags, deps, runtimeTask.workspace?.swarm_token)
|
|
1378
1394
|
const syncConfig = { ...config, token }
|
|
1379
1395
|
try {
|
|
1380
1396
|
await runWithTaskRetry('sync knowledge base', () => (
|
|
@@ -1437,7 +1453,7 @@ async function runOneRuntimeTaskSlot(runtime, config, machineKey, registration,
|
|
|
1437
1453
|
if (executionContext && runtimeTask.workspace?.slug) {
|
|
1438
1454
|
const isDeepOrganize = Boolean(knowledgeDeepOrganizeSpec(runtimeTask))
|
|
1439
1455
|
const syncBack = isDeepOrganize ? deps.mcpKnowledgeSync : deps.syncKnowledge
|
|
1440
|
-
const token = await projectSyncToken(projectTokenCandidatesForTask(runtimeTask, flags), flags, deps)
|
|
1456
|
+
const token = await projectSyncToken(projectTokenCandidatesForTask(runtimeTask, flags), flags, deps, runtimeTask.workspace?.swarm_token)
|
|
1441
1457
|
const syncConfig = { ...config, token }
|
|
1442
1458
|
const pushKnowledge = () => syncBack({
|
|
1443
1459
|
project: runtimeTask.workspace.slug,
|