@11agents/cli 0.1.27 → 0.1.28
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/package.json +1 -1
- package/src/commands/runtime.js +12 -0
- package/src/credentials.js +1 -1
package/package.json
CHANGED
package/src/commands/runtime.js
CHANGED
|
@@ -103,6 +103,9 @@ async function writeCurrentClaim(deps, task, machineKey) {
|
|
|
103
103
|
task_id: String(task.id || ''),
|
|
104
104
|
runtime_id: String(task.runtime_id || task.runtime?.id || ''),
|
|
105
105
|
machine_key: String(task.runtime?.machine_key || machineKey || ''),
|
|
106
|
+
project_id: String(task.workspace?.id || ''),
|
|
107
|
+
project_slug: String(task.workspace?.slug || task.workspace_slug || ''),
|
|
108
|
+
agent_name: String(task.agent?.name || ''),
|
|
106
109
|
}
|
|
107
110
|
await mkdir(claimsDirPath(deps.homeDir), { recursive: true })
|
|
108
111
|
await writeFile(claimFilePath(deps.homeDir, task.id), JSON.stringify(payload))
|
|
@@ -1079,6 +1082,14 @@ function buildCodexPrompt(task) {
|
|
|
1079
1082
|
'- aspect alternatives: "1:1", "16:9", "9:16", "4:3", "3:4". Choose the closest ratio to the final placement.',
|
|
1080
1083
|
'- 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.',
|
|
1081
1084
|
'- 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.',
|
|
1085
|
+
'- MCP authentication (agent_planning, database_sync, knowledge_sync, image_generate, etc.):',
|
|
1086
|
+
' 1. Find your project_slug from the task context (task.workspace.slug).',
|
|
1087
|
+
' 2. Open ~/.11agents/credentials.yaml and read the value under tokens.<project_slug>.',
|
|
1088
|
+
' 3. Use that value as the Bearer token in the Authorization header for the 11agents hosted MCP endpoint.',
|
|
1089
|
+
' 4. If the key is missing from credentials.yaml, add it:',
|
|
1090
|
+
' tokens:',
|
|
1091
|
+
' <project_slug>: <your-token>',
|
|
1092
|
+
' Get the token from the 11agents platform → open your project → Tokens menu.',
|
|
1082
1093
|
'',
|
|
1083
1094
|
'Final task comment requirements:',
|
|
1084
1095
|
'> [!IMPORTANT]',
|
|
@@ -1397,6 +1408,7 @@ async function runOneRuntimeTaskSlot(runtime, config, machineKey, registration,
|
|
|
1397
1408
|
task_id: runtimeTask.id,
|
|
1398
1409
|
task_title: String(runtimeTask.issue?.title || runtimeTask.title || ''),
|
|
1399
1410
|
project_slug: String(runtimeTask.workspace?.slug || runtimeTask.workspace_slug || ''),
|
|
1411
|
+
agent_name: String(runtimeTask.agent?.name || ''),
|
|
1400
1412
|
runtime_id: runtime.id,
|
|
1401
1413
|
}, null, 2))
|
|
1402
1414
|
await writeCurrentClaim(deps, runtimeTask, machineKey)
|
package/src/credentials.js
CHANGED
|
@@ -47,7 +47,7 @@ export function parseCredentials(content = '') {
|
|
|
47
47
|
|
|
48
48
|
export async function readCredentials({ homeDir = os.homedir() } = {}) {
|
|
49
49
|
try {
|
|
50
|
-
return parseCredentials(await readFile(path.join(homeDir, '.11agents', 'credentials'), 'utf8'))
|
|
50
|
+
return parseCredentials(await readFile(path.join(homeDir, '.11agents', 'credentials.yaml'), 'utf8'))
|
|
51
51
|
} catch (error) {
|
|
52
52
|
if (error?.code === 'ENOENT') return { tokens: {} }
|
|
53
53
|
throw error
|