@distributionos/cli 0.1.19 → 0.1.20

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": "@distributionos/cli",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "DistributionOS repo setup CLI for agent onboarding and first-party analytics.",
5
5
  "homepage": "https://distributionos.dev",
6
6
  "repository": {
package/src/bootstrap.js CHANGED
@@ -22,11 +22,13 @@ export function buildLocalBootstrapBlock(version = CURRENT_BOOTSTRAP_VERSION, ap
22
22
  `<!-- DISTRIBUTIONOS:START version=${version}${appIdAttribute} -->`,
23
23
  '## DistributionOS Agent Sync',
24
24
  '',
25
- 'This repo is linked to DistributionOS.',
26
- '',
27
- 'Session preflight: when starting a fresh agent chat in this repo, call check_distributionos_connection first, then fetch the current instructions below. If DistributionOS returns setupUpdate or setupUpdateGuidance with a status other than current or not_installed, tell the user the repo has a setup update available, show the review command, and run the apply command only after the user approves.',
25
+ 'This repo is linked to DistributionOS.',
26
+ '',
27
+ 'Session preflight: when starting a fresh agent chat in this repo, call check_distributionos_connection first, then fetch the current instructions below, then call list_agent_alerts. If DistributionOS returns setupUpdate or setupUpdateGuidance with a status other than current or not_installed, tell the user the repo has a setup update available, show the review command, and run the apply command only after the user approves.',
28
28
  '',
29
- 'Hard preflight: before editing files, creating assets, generating images, creating HyperFrames launch/demo videos, or changing copy for SEO, blog, launch, content, visual asset, competitor, social, email, or growth work, fetch the current instructions from DistributionOS:',
29
+ 'Startup alerts: after get_agent_instructions, call list_agent_alerts for this app. If alerts are returned, summarize them to the user before unrelated work. For SEO incidents, call get_seo_incident for full evidence before editing code, report each fix attempt with report_seo_incident_attempt, and verify with verify_seo_incident_fix.',
30
+ '',
31
+ 'Hard preflight: before editing files, creating assets, generating images, creating HyperFrames launch/demo videos, or changing copy for SEO, blog, launch, content, visual asset, competitor, social, email, or growth work, fetch the current instructions from DistributionOS:',
30
32
  '',
31
33
  instructionCall,
32
34
  '',
package/src/constants.js CHANGED
@@ -6,9 +6,9 @@ export const CLI_PACKAGE_NAME = '@distributionos/cli';
6
6
  export const CLI_LOCAL_VERSION = typeof cliPackageJson.version === 'string' ? cliPackageJson.version : '0.0.0-local';
7
7
  export const DEFAULT_API_BASE = 'https://distributionos.dev';
8
8
  export const MCP_SERVER_URL = 'https://distributionos.dev/api/mcp';
9
- export const CURRENT_BOOTSTRAP_VERSION = '2026.07.04.1';
9
+ export const CURRENT_BOOTSTRAP_VERSION = '2026.07.09';
10
10
  export const CURRENT_ANALYTICS_CONTRACT_VERSION = '2026.06.20';
11
- export const CURRENT_SETUP_CONTRACT_VERSION = '2026.07.04.1';
11
+ export const CURRENT_SETUP_CONTRACT_VERSION = '2026.07.09';
12
12
 
13
13
  export const TOKEN_ENV_NAMES = [
14
14
  'DISTRIBUTIONOS_API_KEY',
@@ -24,10 +24,13 @@ export async function buildSetupReport(plan, phase = 'plan', details = {}) {
24
24
  let blockedReason = null;
25
25
 
26
26
  const bootstrapVersion = detectBootstrapVersion(plan);
27
- if (bootstrapVersion && plan.bootstrap.action === 'none') {
28
- detectedCapabilities.add('agent.bootstrap');
29
- detectedCapabilities.add('agent.liveInstructions');
30
- }
27
+ if (bootstrapVersion && plan.bootstrap.action === 'none') {
28
+ detectedCapabilities.add('agent.bootstrap');
29
+ detectedCapabilities.add('agent.liveInstructions');
30
+ if (compareVersion(bootstrapVersion, '2026.07.09') >= 0) {
31
+ detectedCapabilities.add('agent.startupAlerts');
32
+ }
33
+ }
31
34
  managedFiles.push({
32
35
  path: plan.bootstrap.target,
33
36
  type: 'agent.bootstrap',
@@ -144,16 +147,16 @@ export function formatSetupReportSummary(setupReport) {
144
147
  if (!localSetup) {
145
148
  lines.push('- Server report: pending');
146
149
  return lines;
147
- }
148
-
149
- lines.push(`- Server status: ${localSetup.status}`);
150
- if (localSetup.recommendedCliVersion) {
151
- lines.push(`- Recommended CLI: ${localSetup.recommendedCliVersion}`);
152
- }
153
- if (localSetup.latestContractVersion) {
154
- lines.push(`- Current setup contract: ${localSetup.latestContractVersion}`);
155
- }
156
- lines.push(`- Missing capabilities: ${formatList(localSetup.missingCapabilities)}`);
150
+ }
151
+
152
+ lines.push(`- Server status: ${localSetup.status}`);
153
+ if (localSetup.recommendedCliVersion) {
154
+ lines.push(`- Recommended CLI: ${localSetup.recommendedCliVersion}`);
155
+ }
156
+ if (localSetup.latestContractVersion) {
157
+ lines.push(`- Current setup contract: ${localSetup.latestContractVersion}`);
158
+ }
159
+ lines.push(`- Missing capabilities: ${formatList(localSetup.missingCapabilities)}`);
157
160
  if (localSetup.status !== 'current') {
158
161
  lines.push(`- Review command: ${localSetup.updateCommand}`);
159
162
  lines.push(`- Apply command: ${localSetup.applyCommand}`);
@@ -164,13 +167,29 @@ export function formatSetupReportSummary(setupReport) {
164
167
  return lines;
165
168
  }
166
169
 
167
- function detectBootstrapVersion(plan) {
168
- const current = (plan.repo.instructionFiles ?? []).find((file) => file.hasManagedDistributionOsBlock);
169
- return current?.managedDistributionOsVersion ??
170
- (plan.bootstrap.action === 'none' ? CURRENT_BOOTSTRAP_VERSION : null);
171
- }
172
-
173
- async function inspectAnalyticsInstall(plan) {
170
+ function detectBootstrapVersion(plan) {
171
+ const current = (plan.repo.instructionFiles ?? []).find((file) => file.hasManagedDistributionOsBlock);
172
+ return current?.managedDistributionOsVersion ??
173
+ (plan.bootstrap.action === 'none' ? CURRENT_BOOTSTRAP_VERSION : null);
174
+ }
175
+
176
+ function compareVersion(left, right) {
177
+ const a = String(left ?? '').split(/[.-]/).map(toComparableNumber);
178
+ const b = String(right ?? '').split(/[.-]/).map(toComparableNumber);
179
+ const length = Math.max(a.length, b.length);
180
+ for (let index = 0; index < length; index += 1) {
181
+ const diff = (a[index] ?? 0) - (b[index] ?? 0);
182
+ if (diff !== 0) return diff;
183
+ }
184
+ return 0;
185
+ }
186
+
187
+ function toComparableNumber(value) {
188
+ const parsed = Number.parseInt(value, 10);
189
+ return Number.isFinite(parsed) ? parsed : 0;
190
+ }
191
+
192
+ async function inspectAnalyticsInstall(plan) {
174
193
  const target = plan.analytics.layoutTarget;
175
194
  if (!target) {
176
195
  return {