@11agents/cli 0.1.6 → 0.1.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@11agents/cli",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "11agents local runtime and telemetry CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -438,7 +438,7 @@ function databaseSyncSpec(task) {
438
438
  return { cloudRevision, syncRequired }
439
439
  }
440
440
 
441
- async function syncDatabaseIfNeeded({ task, workdir, config, deps }) {
441
+ async function syncDatabaseIfNeeded({ task, workdir, config, flags, deps }) {
442
442
  const spec = databaseSyncSpec(task)
443
443
  if (!spec) return { synced: false }
444
444
  const statePath = path.join(workdir, 'database', 'sync-state.json')
@@ -447,6 +447,8 @@ async function syncDatabaseIfNeeded({ task, workdir, config, deps }) {
447
447
  if (!spec.syncRequired && localRevision === spec.cloudRevision) return { synced: false, cloud_revision: localRevision }
448
448
 
449
449
  const project = projectSlugForTask(task)
450
+ const token = await projectSyncToken(project, flags, deps)
451
+ const syncConfig = { ...config, token }
450
452
  const result = await deps.requestJson(`/api/projects/${project}/database/sync`, {
451
453
  method: 'POST',
452
454
  body: {
@@ -454,7 +456,7 @@ async function syncDatabaseIfNeeded({ task, workdir, config, deps }) {
454
456
  local_revision: localRevision,
455
457
  cloud_revision: spec.cloudRevision,
456
458
  },
457
- config,
459
+ config: syncConfig,
458
460
  })
459
461
  await mkdir(path.dirname(statePath), { recursive: true })
460
462
  if (result?.snapshot !== undefined) {
@@ -491,7 +493,7 @@ async function prepareRuntimeTask(task, flags, deps, config) {
491
493
  const tmpDir = path.join(workdir, 'tmp', sanitizeTaskId(task.id))
492
494
  await mkdir(tmpDir, { recursive: true })
493
495
 
494
- const database = await syncDatabaseIfNeeded({ task, workdir, config, deps })
496
+ const database = await syncDatabaseIfNeeded({ task, workdir, config, flags, deps })
495
497
  const skills = await materializeSkillsIfChanged({ task, workdir, flags, deps })
496
498
  const env = {
497
499
  ...process.env,