factory-ai 1.6.0 → 1.6.1

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes follow semantic versioning and the Keep a Changelog structur
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.6.1] - 2026-07-13
8
+
9
+ ### Added
10
+
11
+ - `factory update check|now|status|enable|disable` for local version checks, immediate verified Azure/local updates, and explicit six-hour timer control.
12
+
7
13
  ## [1.6.0] - 2026-07-13
8
14
 
9
15
  ### Added
package/README.md CHANGED
@@ -74,6 +74,10 @@ factory ui
74
74
  | `factory workspace show NAME` | Inspect one workspace |
75
75
  | `factory workspace remove NAME` | Remove a catalog entry without deleting repository files |
76
76
  | `factory submit WORKSPACE "OBJECTIVE"` | Send one CEO objective using a workspace name; owner/repo remains supported |
77
+ | `factory update check` | Compare the installed CLI with the latest stable npm release |
78
+ | `factory update now` | Run verified Azure updater immediately and update the local CLI |
79
+ | `factory update status` | Show automatic-update timer and deployed runtime version |
80
+ | `factory update enable\|disable` | Control the six-hour verified automatic-update timer |
77
81
  | `factory issue OWNER/REPO NUMBER` | Turn a GitHub issue into a tracked objective |
78
82
  | `factory telegram configure` | Configure allowlisted Telegram remote intake |
79
83
  | `factory dashboard` | Objectives, agents, models, queue, DLQ, and Azure cost |
package/bin/factory CHANGED
@@ -30,6 +30,7 @@ usage() {
30
30
  ' telegram status | configure | start | stop' \
31
31
  ' workspace list | import PATH|OWNER/REPO [--name NAME] | show NAME | remove NAME' \
32
32
  ' submit <workspace|owner/repo> <objective>' \
33
+ ' update check | now | status | enable | disable' \
33
34
  ' issue <owner/repo> <number>' \
34
35
  ' ui' \
35
36
  ' init <local-project-path>' \
@@ -46,7 +47,7 @@ apply_runtime_model() {
46
47
  script="set -euo pipefail; exec 9>/run/lock/factory-ai-config.lock; flock -x 9; first=/etc/agent-factory.env; second=/etc/agent-factory-control.env; backup_first=\$(mktemp); backup_second=\$(mktemp); cp --preserve=mode,ownership \"\$first\" \"\$backup_first\"; cp --preserve=mode,ownership \"\$second\" \"\$backup_second\"; rollback() { install -m 0600 -o root -g root \"\$backup_first\" \"\$first\"; install -m 0600 -o root -g root \"\$backup_second\" \"\$second\"; systemctl restart agent-factory-control agent-factory-worker agent-factory-release || true; rm -f \"\$backup_first\" \"\$backup_second\"; }; trap rollback ERR TERM INT; for file in \"\$first\" \"\$second\"; do tmp=\$(mktemp); grep -v '^${variable}=' \"\$file\" > \"\$tmp\" || true; if [[ '$mode' == set ]]; then printf '${variable}=%s\\n' '$value' >> \"\$tmp\"; fi; install -m 0600 -o root -g root \"\$tmp\" \"\$file\"; rm -f \"\$tmp\"; done; systemctl restart agent-factory-control agent-factory-worker agent-factory-release; systemctl is-active --quiet agent-factory-control agent-factory-worker agent-factory-release; trap - ERR TERM INT; rm -f \"\$backup_first\" \"\$backup_second\""
47
48
  printf -v script 'bash -c %q' "$script"
48
49
  settings=$(jq -n --arg command "$script" '{commandToExecute:$command}')
49
- az vm extension set --resource-group "$RESOURCE_GROUP" --vm-name "$VM" --name FactoryAIConfigure \
50
+ az vm extension set --resource-group "$RESOURCE_GROUP" --vm-name "$VM" --name CustomScript \
50
51
  --publisher Microsoft.Azure.Extensions --version 2.1 --force-update --protected-settings "$settings" --output none
51
52
  }
52
53
 
@@ -76,7 +77,43 @@ configure_model_transaction() {
76
77
  trap - EXIT INT TERM
77
78
  }
78
79
 
80
+ vm_extension_command() {
81
+ local script=$1 settings
82
+ printf -v script 'bash -c %q' "$script"
83
+ settings=$(jq -n --arg command "$script" '{commandToExecute:$command}')
84
+ az vm extension set --resource-group "$RESOURCE_GROUP" --vm-name "$VM" --name CustomScript \
85
+ --publisher Microsoft.Azure.Extensions --version 2.1 --force-update --protected-settings "$settings" --output none
86
+ az vm extension show --resource-group "$RESOURCE_GROUP" --vm-name "$VM" --name CustomScript --instance-view --query 'instanceView.statuses[0].message' --output tsv
87
+ }
88
+
79
89
  case "$command" in
90
+ update)
91
+ action=${1:-check}
92
+ case "$action" in
93
+ check)
94
+ current=$(node -p "require('$FACTORY_ROOT/package.json').version")
95
+ latest=$(npm view factory-ai version)
96
+ printf 'Local %s · latest %s\n' "$current" "$latest"
97
+ ;;
98
+ now)
99
+ vm_extension_command 'bash /opt/agent-factory/app/bootstrap/auto-update.sh'
100
+ latest=$(npm view factory-ai version)
101
+ current=$(node -p "require('$FACTORY_ROOT/package.json').version")
102
+ if [[ $current != "$latest" ]]; then npm install --global "factory-ai@$latest"; fi
103
+ printf 'Factory AI is current at %s locally and Azure update verification completed.\n' "$latest"
104
+ ;;
105
+ status)
106
+ vm_extension_command 'set -e; printf "timer enabled: "; systemctl is-enabled factory-ai-update.timer; printf "timer active: "; systemctl is-active factory-ai-update.timer; jq -c . /opt/agent-factory/state/runtime-version.json'
107
+ ;;
108
+ enable)
109
+ vm_extension_command 'systemctl enable --now factory-ai-update.timer; systemctl is-active factory-ai-update.timer'
110
+ ;;
111
+ disable)
112
+ vm_extension_command 'systemctl disable --now factory-ai-update.timer; systemctl is-active factory-ai-update.timer >/dev/null && exit 1 || true; printf "automatic updates disabled\n"'
113
+ ;;
114
+ *) printf 'Usage: factory update check | now | status | enable | disable\n' >&2; exit 2 ;;
115
+ esac
116
+ ;;
80
117
  acp)
81
118
  request=${1:?ACP request JSON file required}
82
119
  SERVICE_BUS_NAMESPACE="$NAMESPACE" CONTROL_QUEUE=control-events FACTORY_ACP_ENABLED=true exec node "$FACTORY_ROOT/src/acp-cli.js" "$request"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "factory-ai",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Deploy a private autonomous coding-agent factory on Azure: isolated builders, testers, security reviewers, durable orchestration, multi-model routing, memory, cost controls, and gated GitHub pull requests.",
5
5
  "private": false,
6
6
  "license": "MIT",