aether-colony 1.1.0
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/.aether/CONTEXT.md +160 -0
- package/.aether/QUEEN.md +84 -0
- package/.aether/aether-utils.sh +7749 -0
- package/.aether/docs/QUEEN-SYSTEM.md +211 -0
- package/.aether/docs/README.md +68 -0
- package/.aether/docs/caste-system.md +48 -0
- package/.aether/docs/disciplines/DISCIPLINES.md +93 -0
- package/.aether/docs/disciplines/coding-standards.md +197 -0
- package/.aether/docs/disciplines/debugging.md +207 -0
- package/.aether/docs/disciplines/learning.md +254 -0
- package/.aether/docs/disciplines/tdd.md +257 -0
- package/.aether/docs/disciplines/verification-loop.md +167 -0
- package/.aether/docs/disciplines/verification.md +116 -0
- package/.aether/docs/error-codes.md +268 -0
- package/.aether/docs/known-issues.md +233 -0
- package/.aether/docs/pheromones.md +205 -0
- package/.aether/docs/queen-commands.md +97 -0
- package/.aether/exchange/colony-registry.xml +11 -0
- package/.aether/exchange/pheromone-xml.sh +575 -0
- package/.aether/exchange/pheromones.xml +87 -0
- package/.aether/exchange/queen-wisdom.xml +14 -0
- package/.aether/exchange/registry-xml.sh +273 -0
- package/.aether/exchange/wisdom-xml.sh +319 -0
- package/.aether/midden/approach-changes.md +5 -0
- package/.aether/midden/build-failures.md +5 -0
- package/.aether/midden/test-failures.md +5 -0
- package/.aether/model-profiles.yaml +100 -0
- package/.aether/rules/aether-colony.md +134 -0
- package/.aether/schemas/aether-types.xsd +255 -0
- package/.aether/schemas/colony-registry.xsd +309 -0
- package/.aether/schemas/example-prompt-builder.xml +234 -0
- package/.aether/schemas/pheromone.xsd +163 -0
- package/.aether/schemas/prompt.xsd +416 -0
- package/.aether/schemas/queen-wisdom.xsd +325 -0
- package/.aether/schemas/worker-priming.xsd +276 -0
- package/.aether/templates/QUEEN.md.template +79 -0
- package/.aether/templates/colony-state-reset.jq.template +22 -0
- package/.aether/templates/colony-state.template.json +35 -0
- package/.aether/templates/constraints.template.json +9 -0
- package/.aether/templates/crowned-anthill.template.md +36 -0
- package/.aether/templates/handoff-build-error.template.md +30 -0
- package/.aether/templates/handoff-build-success.template.md +39 -0
- package/.aether/templates/handoff.template.md +40 -0
- package/.aether/templates/learning-observations.template.json +6 -0
- package/.aether/templates/midden.template.json +7 -0
- package/.aether/templates/pheromones.template.json +6 -0
- package/.aether/templates/session.template.json +9 -0
- package/.aether/utils/atomic-write.sh +219 -0
- package/.aether/utils/chamber-compare.sh +193 -0
- package/.aether/utils/chamber-utils.sh +297 -0
- package/.aether/utils/colorize-log.sh +132 -0
- package/.aether/utils/error-handler.sh +212 -0
- package/.aether/utils/file-lock.sh +158 -0
- package/.aether/utils/queen-to-md.xsl +395 -0
- package/.aether/utils/semantic-cli.sh +413 -0
- package/.aether/utils/spawn-tree.sh +428 -0
- package/.aether/utils/spawn-with-model.sh +56 -0
- package/.aether/utils/state-loader.sh +215 -0
- package/.aether/utils/swarm-display.sh +268 -0
- package/.aether/utils/watch-spawn-tree.sh +253 -0
- package/.aether/utils/xml-compose.sh +253 -0
- package/.aether/utils/xml-convert.sh +273 -0
- package/.aether/utils/xml-core.sh +186 -0
- package/.aether/utils/xml-query.sh +201 -0
- package/.aether/utils/xml-utils.sh +110 -0
- package/.aether/workers.md +765 -0
- package/.claude/agents/ant/aether-ambassador.md +264 -0
- package/.claude/agents/ant/aether-archaeologist.md +322 -0
- package/.claude/agents/ant/aether-auditor.md +266 -0
- package/.claude/agents/ant/aether-builder.md +187 -0
- package/.claude/agents/ant/aether-chaos.md +268 -0
- package/.claude/agents/ant/aether-chronicler.md +304 -0
- package/.claude/agents/ant/aether-gatekeeper.md +325 -0
- package/.claude/agents/ant/aether-includer.md +373 -0
- package/.claude/agents/ant/aether-keeper.md +271 -0
- package/.claude/agents/ant/aether-measurer.md +317 -0
- package/.claude/agents/ant/aether-probe.md +210 -0
- package/.claude/agents/ant/aether-queen.md +325 -0
- package/.claude/agents/ant/aether-route-setter.md +173 -0
- package/.claude/agents/ant/aether-sage.md +353 -0
- package/.claude/agents/ant/aether-scout.md +142 -0
- package/.claude/agents/ant/aether-surveyor-disciplines.md +416 -0
- package/.claude/agents/ant/aether-surveyor-nest.md +354 -0
- package/.claude/agents/ant/aether-surveyor-pathogens.md +288 -0
- package/.claude/agents/ant/aether-surveyor-provisions.md +359 -0
- package/.claude/agents/ant/aether-tracker.md +265 -0
- package/.claude/agents/ant/aether-watcher.md +244 -0
- package/.claude/agents/ant/aether-weaver.md +247 -0
- package/.claude/commands/ant/archaeology.md +341 -0
- package/.claude/commands/ant/build.md +1160 -0
- package/.claude/commands/ant/chaos.md +349 -0
- package/.claude/commands/ant/colonize.md +270 -0
- package/.claude/commands/ant/continue.md +1070 -0
- package/.claude/commands/ant/council.md +309 -0
- package/.claude/commands/ant/dream.md +265 -0
- package/.claude/commands/ant/entomb.md +487 -0
- package/.claude/commands/ant/feedback.md +78 -0
- package/.claude/commands/ant/flag.md +139 -0
- package/.claude/commands/ant/flags.md +155 -0
- package/.claude/commands/ant/focus.md +58 -0
- package/.claude/commands/ant/help.md +122 -0
- package/.claude/commands/ant/history.md +137 -0
- package/.claude/commands/ant/init.md +409 -0
- package/.claude/commands/ant/interpret.md +267 -0
- package/.claude/commands/ant/lay-eggs.md +201 -0
- package/.claude/commands/ant/maturity.md +102 -0
- package/.claude/commands/ant/memory-details.md +77 -0
- package/.claude/commands/ant/migrate-state.md +165 -0
- package/.claude/commands/ant/oracle.md +387 -0
- package/.claude/commands/ant/organize.md +227 -0
- package/.claude/commands/ant/pause-colony.md +247 -0
- package/.claude/commands/ant/phase.md +126 -0
- package/.claude/commands/ant/plan.md +544 -0
- package/.claude/commands/ant/redirect.md +58 -0
- package/.claude/commands/ant/resume-colony.md +182 -0
- package/.claude/commands/ant/resume.md +363 -0
- package/.claude/commands/ant/seal.md +306 -0
- package/.claude/commands/ant/status.md +272 -0
- package/.claude/commands/ant/swarm.md +361 -0
- package/.claude/commands/ant/tunnels.md +425 -0
- package/.claude/commands/ant/update.md +209 -0
- package/.claude/commands/ant/verify-castes.md +95 -0
- package/.claude/commands/ant/watch.md +238 -0
- package/.opencode/agents/aether-ambassador.md +140 -0
- package/.opencode/agents/aether-archaeologist.md +108 -0
- package/.opencode/agents/aether-auditor.md +144 -0
- package/.opencode/agents/aether-builder.md +184 -0
- package/.opencode/agents/aether-chaos.md +115 -0
- package/.opencode/agents/aether-chronicler.md +122 -0
- package/.opencode/agents/aether-gatekeeper.md +116 -0
- package/.opencode/agents/aether-includer.md +117 -0
- package/.opencode/agents/aether-keeper.md +177 -0
- package/.opencode/agents/aether-measurer.md +128 -0
- package/.opencode/agents/aether-probe.md +133 -0
- package/.opencode/agents/aether-queen.md +286 -0
- package/.opencode/agents/aether-route-setter.md +130 -0
- package/.opencode/agents/aether-sage.md +106 -0
- package/.opencode/agents/aether-scout.md +101 -0
- package/.opencode/agents/aether-surveyor-disciplines.md +386 -0
- package/.opencode/agents/aether-surveyor-nest.md +324 -0
- package/.opencode/agents/aether-surveyor-pathogens.md +259 -0
- package/.opencode/agents/aether-surveyor-provisions.md +329 -0
- package/.opencode/agents/aether-tracker.md +137 -0
- package/.opencode/agents/aether-watcher.md +174 -0
- package/.opencode/agents/aether-weaver.md +130 -0
- package/.opencode/commands/ant/archaeology.md +338 -0
- package/.opencode/commands/ant/build.md +1200 -0
- package/.opencode/commands/ant/chaos.md +346 -0
- package/.opencode/commands/ant/colonize.md +202 -0
- package/.opencode/commands/ant/continue.md +938 -0
- package/.opencode/commands/ant/council.md +305 -0
- package/.opencode/commands/ant/dream.md +262 -0
- package/.opencode/commands/ant/entomb.md +367 -0
- package/.opencode/commands/ant/feedback.md +80 -0
- package/.opencode/commands/ant/flag.md +137 -0
- package/.opencode/commands/ant/flags.md +153 -0
- package/.opencode/commands/ant/focus.md +56 -0
- package/.opencode/commands/ant/help.md +124 -0
- package/.opencode/commands/ant/history.md +127 -0
- package/.opencode/commands/ant/init.md +337 -0
- package/.opencode/commands/ant/interpret.md +256 -0
- package/.opencode/commands/ant/lay-eggs.md +141 -0
- package/.opencode/commands/ant/maturity.md +92 -0
- package/.opencode/commands/ant/memory-details.md +77 -0
- package/.opencode/commands/ant/migrate-state.md +153 -0
- package/.opencode/commands/ant/oracle.md +338 -0
- package/.opencode/commands/ant/organize.md +224 -0
- package/.opencode/commands/ant/pause-colony.md +220 -0
- package/.opencode/commands/ant/phase.md +123 -0
- package/.opencode/commands/ant/plan.md +531 -0
- package/.opencode/commands/ant/redirect.md +67 -0
- package/.opencode/commands/ant/resume-colony.md +178 -0
- package/.opencode/commands/ant/resume.md +363 -0
- package/.opencode/commands/ant/seal.md +247 -0
- package/.opencode/commands/ant/status.md +272 -0
- package/.opencode/commands/ant/swarm.md +357 -0
- package/.opencode/commands/ant/tunnels.md +406 -0
- package/.opencode/commands/ant/update.md +191 -0
- package/.opencode/commands/ant/verify-castes.md +85 -0
- package/.opencode/commands/ant/watch.md +220 -0
- package/.opencode/opencode.json +3 -0
- package/CHANGELOG.md +325 -0
- package/DISCLAIMER.md +74 -0
- package/LICENSE +21 -0
- package/README.md +258 -0
- package/bin/cli.js +2436 -0
- package/bin/generate-commands.sh +291 -0
- package/bin/lib/caste-colors.js +57 -0
- package/bin/lib/colors.js +76 -0
- package/bin/lib/errors.js +255 -0
- package/bin/lib/event-types.js +190 -0
- package/bin/lib/file-lock.js +695 -0
- package/bin/lib/init.js +454 -0
- package/bin/lib/logger.js +242 -0
- package/bin/lib/model-profiles.js +445 -0
- package/bin/lib/model-verify.js +288 -0
- package/bin/lib/nestmate-loader.js +130 -0
- package/bin/lib/proxy-health.js +253 -0
- package/bin/lib/spawn-logger.js +266 -0
- package/bin/lib/state-guard.js +602 -0
- package/bin/lib/state-sync.js +516 -0
- package/bin/lib/telemetry.js +441 -0
- package/bin/lib/update-transaction.js +1454 -0
- package/bin/npx-install.js +178 -0
- package/bin/sync-to-runtime.sh +6 -0
- package/bin/validate-package.sh +88 -0
- package/package.json +70 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* npx-install.js — Professional installer for Aether Colony
|
|
5
|
+
*
|
|
6
|
+
* Usage: npx aether-colony install
|
|
7
|
+
*
|
|
8
|
+
* Creates the global hub at ~/.aether/ with all system files,
|
|
9
|
+
* slash commands, and agent definitions.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
const os = require('os');
|
|
15
|
+
|
|
16
|
+
const BANNER = `
|
|
17
|
+
█████╗ ███████╗████████╗██╗ ██╗███████╗██████╗
|
|
18
|
+
██╔══██╗██╔════╝╚══██╔══╝██║ ██║██╔════╝██╔══██╗
|
|
19
|
+
███████║█████╗ ██║ ███████║█████╗ ██████╔╝
|
|
20
|
+
██╔══██║██╔══╝ ██║ ██╔══██║██╔══╝ ██╔══██╗
|
|
21
|
+
██║ ██║███████╗ ██║ ██║ ██║███████╗██║ ██║
|
|
22
|
+
╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
const AETHER_VERSION = require('../package.json').version;
|
|
26
|
+
const HOME_DIR = os.homedir();
|
|
27
|
+
const HUB_DIR = path.join(HOME_DIR, '.aether');
|
|
28
|
+
const CLAUDE_COMMANDS_DIR = path.join(HOME_DIR, '.claude', 'commands', 'ant');
|
|
29
|
+
const CLAUDE_AGENTS_DIR = path.join(HOME_DIR, '.claude', 'agents', 'ant');
|
|
30
|
+
|
|
31
|
+
// Get the package root (where this script is located)
|
|
32
|
+
const PACKAGE_ROOT = path.resolve(__dirname, '..');
|
|
33
|
+
const AETHER_SRC = path.join(PACKAGE_ROOT, '.aether');
|
|
34
|
+
const CLAUDE_COMMANDS_SRC = path.join(PACKAGE_ROOT, '.claude', 'commands', 'ant');
|
|
35
|
+
const OPENCODE_AGENTS_SRC = path.join(PACKAGE_ROOT, '.opencode', 'agents');
|
|
36
|
+
const OPENCODE_COMMANDS_SRC = path.join(PACKAGE_ROOT, '.opencode', 'commands', 'ant');
|
|
37
|
+
|
|
38
|
+
function log(message, type = 'info') {
|
|
39
|
+
const icons = {
|
|
40
|
+
info: 'ℹ',
|
|
41
|
+
success: '✓',
|
|
42
|
+
warning: '⚠',
|
|
43
|
+
error: '✗',
|
|
44
|
+
ant: '🐜'
|
|
45
|
+
};
|
|
46
|
+
console.log(`${icons[type] || '•'} ${message}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function ensureDir(dir) {
|
|
50
|
+
if (!fs.existsSync(dir)) {
|
|
51
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function copyDir(src, dest, options = {}) {
|
|
58
|
+
const { exclude = [] } = options;
|
|
59
|
+
ensureDir(dest);
|
|
60
|
+
|
|
61
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
62
|
+
let copied = 0;
|
|
63
|
+
|
|
64
|
+
for (const entry of entries) {
|
|
65
|
+
const srcPath = path.join(src, entry.name);
|
|
66
|
+
const destPath = path.join(dest, entry.name);
|
|
67
|
+
|
|
68
|
+
// Skip excluded directories
|
|
69
|
+
if (exclude.includes(entry.name)) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (entry.isDirectory()) {
|
|
74
|
+
copied += copyDir(srcPath, destPath, options);
|
|
75
|
+
} else {
|
|
76
|
+
fs.copyFileSync(srcPath, destPath);
|
|
77
|
+
copied++;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return copied;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function copyFile(src, dest) {
|
|
85
|
+
const destDir = path.dirname(dest);
|
|
86
|
+
ensureDir(destDir);
|
|
87
|
+
fs.copyFileSync(src, dest);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function install() {
|
|
91
|
+
console.log(BANNER);
|
|
92
|
+
console.log('\n');
|
|
93
|
+
|
|
94
|
+
let filesCopied = 0;
|
|
95
|
+
|
|
96
|
+
// Step 1: Create hub directory structure
|
|
97
|
+
log('Creating hub directory structure...', 'ant');
|
|
98
|
+
const hubDirs = [
|
|
99
|
+
path.join(HUB_DIR, 'system'),
|
|
100
|
+
path.join(HUB_DIR, 'system', 'docs'),
|
|
101
|
+
path.join(HUB_DIR, 'system', 'utils'),
|
|
102
|
+
path.join(HUB_DIR, 'system', 'templates'),
|
|
103
|
+
path.join(HUB_DIR, 'system', 'schemas'),
|
|
104
|
+
path.join(HUB_DIR, 'system', 'exchange'),
|
|
105
|
+
path.join(HUB_DIR, 'system', 'rules'),
|
|
106
|
+
path.join(HUB_DIR, 'data'),
|
|
107
|
+
path.join(HUB_DIR, 'chambers')
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
for (const dir of hubDirs) {
|
|
111
|
+
if (ensureDir(dir)) {
|
|
112
|
+
log(` Created ${path.relative(HOME_DIR, dir)}`, 'info');
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Step 2: Copy system files from .aether/
|
|
117
|
+
log('Copying system files to hub...', 'ant');
|
|
118
|
+
if (fs.existsSync(AETHER_SRC)) {
|
|
119
|
+
// Private directories to exclude
|
|
120
|
+
const excludeDirs = ['data', 'dreams', 'oracle', 'checkpoints', 'locks', 'temp', 'archive', 'chambers'];
|
|
121
|
+
filesCopied += copyDir(AETHER_SRC, path.join(HUB_DIR, 'system'), { exclude: excludeDirs });
|
|
122
|
+
log(` Copied ${filesCopied} files from .aether/`, 'success');
|
|
123
|
+
} else {
|
|
124
|
+
log(' Warning: .aether/ source not found', 'warning');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Step 3: Copy Claude Code commands
|
|
128
|
+
log('Installing Claude Code commands...', 'ant');
|
|
129
|
+
if (fs.existsSync(CLAUDE_COMMANDS_SRC)) {
|
|
130
|
+
const cmdCount = copyDir(CLAUDE_COMMANDS_SRC, CLAUDE_COMMANDS_DIR);
|
|
131
|
+
log(` Installed ${cmdCount} slash commands to ~/.claude/commands/ant/`, 'success');
|
|
132
|
+
filesCopied += cmdCount;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Step 4: Copy Claude Code agents (from OpenCode agents)
|
|
136
|
+
log('Installing Claude Code agents...', 'ant');
|
|
137
|
+
if (fs.existsSync(OPENCODE_AGENTS_SRC)) {
|
|
138
|
+
const agentCount = copyDir(OPENCODE_AGENTS_SRC, CLAUDE_AGENTS_DIR);
|
|
139
|
+
log(` Installed ${agentCount} agents to ~/.claude/agents/ant/`, 'success');
|
|
140
|
+
filesCopied += agentCount;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Step 5: Write version file
|
|
144
|
+
const versionData = {
|
|
145
|
+
version: AETHER_VERSION,
|
|
146
|
+
installed_at: new Date().toISOString(),
|
|
147
|
+
package_root: PACKAGE_ROOT
|
|
148
|
+
};
|
|
149
|
+
fs.writeFileSync(
|
|
150
|
+
path.join(HUB_DIR, 'version.json'),
|
|
151
|
+
JSON.stringify(versionData, null, 2)
|
|
152
|
+
);
|
|
153
|
+
log(' Version info written', 'success');
|
|
154
|
+
|
|
155
|
+
// Step 6: Create global QUEEN.md if missing
|
|
156
|
+
const globalQueen = path.join(HUB_DIR, 'QUEEN.md');
|
|
157
|
+
if (!fs.existsSync(globalQueen)) {
|
|
158
|
+
const queenTemplate = path.join(HUB_DIR, 'system', 'templates', 'QUEEN.md.template');
|
|
159
|
+
if (fs.existsSync(queenTemplate)) {
|
|
160
|
+
let content = fs.readFileSync(queenTemplate, 'utf8');
|
|
161
|
+
content = content.replace(/{TIMESTAMP}/g, new Date().toISOString());
|
|
162
|
+
fs.writeFileSync(globalQueen, content);
|
|
163
|
+
log(' Created global QUEEN.md', 'success');
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Summary
|
|
168
|
+
console.log('\n ─────────────────────────────────────────────\n');
|
|
169
|
+
log(`Installation complete! ${filesCopied} files installed.`, 'success');
|
|
170
|
+
console.log('\n Next steps:\n');
|
|
171
|
+
console.log(' 1. Run /ant:init "your goal" in any project');
|
|
172
|
+
console.log(' 2. Use /ant:build to execute phases');
|
|
173
|
+
console.log(' 3. Run /ant:help for command reference\n');
|
|
174
|
+
console.log(' ─────────────────────────────────────────────\n');
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Run installer
|
|
178
|
+
install();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# sync-to-runtime.sh — DEPRECATED (v4.0)
|
|
3
|
+
# runtime/ staging was eliminated in v4.0. .aether/ is packaged directly.
|
|
4
|
+
# This script exists only for CI backward compatibility.
|
|
5
|
+
echo "runtime/ sync skipped — deprecated in v4.0 (direct .aether/ packaging)"
|
|
6
|
+
exit 0
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# validate-package.sh — Pre-packaging validation for aether-colony npm package
|
|
3
|
+
#
|
|
4
|
+
# Purpose: Replaces sync-to-runtime.sh (removed in v4.0). Instead of copying files
|
|
5
|
+
# to a staging directory, this script validates that .aether/ is ready for
|
|
6
|
+
# direct packaging: required files exist, private directories are excluded.
|
|
7
|
+
#
|
|
8
|
+
# Usage: bash bin/validate-package.sh [--dry-run]
|
|
9
|
+
# --dry-run Run npm pack --dry-run to show what would be published
|
|
10
|
+
#
|
|
11
|
+
# This script is safe to run multiple times (idempotent).
|
|
12
|
+
|
|
13
|
+
set -euo pipefail
|
|
14
|
+
|
|
15
|
+
# Resolve paths relative to script location
|
|
16
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
17
|
+
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
18
|
+
AETHER_DIR="$(cd "$SCRIPT_DIR/../.aether" && pwd)"
|
|
19
|
+
|
|
20
|
+
# --dry-run mode: delegate to npm pack and exit
|
|
21
|
+
if [ "${1:-}" = "--dry-run" ]; then
|
|
22
|
+
cd "$REPO_ROOT"
|
|
23
|
+
npm pack --dry-run 2>&1
|
|
24
|
+
exit 0
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# Required files that must exist in .aether/ before packaging
|
|
28
|
+
REQUIRED_FILES=(
|
|
29
|
+
"aether-utils.sh"
|
|
30
|
+
"workers.md"
|
|
31
|
+
"CONTEXT.md"
|
|
32
|
+
"model-profiles.yaml"
|
|
33
|
+
"docs/README.md"
|
|
34
|
+
"utils/atomic-write.sh"
|
|
35
|
+
"utils/error-handler.sh"
|
|
36
|
+
"utils/file-lock.sh"
|
|
37
|
+
"templates/QUEEN.md.template"
|
|
38
|
+
"templates/colony-state.template.json"
|
|
39
|
+
"templates/constraints.template.json"
|
|
40
|
+
"templates/colony-state-reset.jq.template"
|
|
41
|
+
"templates/crowned-anthill.template.md"
|
|
42
|
+
"templates/handoff.template.md"
|
|
43
|
+
"templates/handoff-build-error.template.md"
|
|
44
|
+
"templates/handoff-build-success.template.md"
|
|
45
|
+
"templates/session.template.json"
|
|
46
|
+
"templates/pheromones.template.json"
|
|
47
|
+
"templates/midden.template.json"
|
|
48
|
+
"templates/learning-observations.template.json"
|
|
49
|
+
"rules/aether-colony.md"
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
# Verify required files exist
|
|
53
|
+
for file in "${REQUIRED_FILES[@]}"; do
|
|
54
|
+
if [ ! -f "$AETHER_DIR/$file" ]; then
|
|
55
|
+
echo "ERROR: Required file missing from .aether/: $file" >&2
|
|
56
|
+
echo " Run this from the Aether repo root after editing .aether/ files." >&2
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
done
|
|
60
|
+
|
|
61
|
+
# Private directories that must never be published
|
|
62
|
+
PRIVATE_DIRS=(
|
|
63
|
+
"data"
|
|
64
|
+
"dreams"
|
|
65
|
+
"oracle"
|
|
66
|
+
"checkpoints"
|
|
67
|
+
"locks"
|
|
68
|
+
"temp"
|
|
69
|
+
"archive"
|
|
70
|
+
"chambers"
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
# .aether/.npmignore is the effective ignore file for the .aether/ subdirectory.
|
|
74
|
+
# npm-packlist reads subdirectory .npmignore files when walking included directories.
|
|
75
|
+
AETHER_NPMIGNORE="$AETHER_DIR/.npmignore"
|
|
76
|
+
|
|
77
|
+
# Verify each private directory is excluded in .aether/.npmignore (hard block)
|
|
78
|
+
for dir in "${PRIVATE_DIRS[@]}"; do
|
|
79
|
+
if [ -d "$AETHER_DIR/$dir" ]; then
|
|
80
|
+
if ! grep -qF "$dir/" "$AETHER_NPMIGNORE" 2>/dev/null; then
|
|
81
|
+
echo "ERROR: Private directory .aether/$dir/ exists but is NOT excluded in .aether/.npmignore" >&2
|
|
82
|
+
echo " Add '$dir/' to .aether/.npmignore to prevent publishing private data." >&2
|
|
83
|
+
exit 1
|
|
84
|
+
fi
|
|
85
|
+
fi
|
|
86
|
+
done
|
|
87
|
+
|
|
88
|
+
echo "Package validation passed."
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "aether-colony",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Multi-agent system using ant colony intelligence for Claude Code and OpenCode — workers self-organize via pheromone signals",
|
|
5
|
+
"bin": {
|
|
6
|
+
"aether": "bin/cli.js",
|
|
7
|
+
"aether-colony": "bin/npx-install.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
".claude/commands/ant/",
|
|
12
|
+
".claude/agents/ant/",
|
|
13
|
+
".opencode/commands/ant/",
|
|
14
|
+
".opencode/agents/",
|
|
15
|
+
".opencode/opencode.json",
|
|
16
|
+
".aether/",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE",
|
|
19
|
+
"DISCLAIMER.md",
|
|
20
|
+
"CHANGELOG.md"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"preinstall": "bash bin/validate-package.sh 2>/dev/null || true",
|
|
24
|
+
"postinstall": "node bin/cli.js install --quiet",
|
|
25
|
+
"prepublishOnly": "bash bin/validate-package.sh",
|
|
26
|
+
"test": "npm run test:unit",
|
|
27
|
+
"test:all": "npm run test:unit && npm run test:bash",
|
|
28
|
+
"test:unit": "ava",
|
|
29
|
+
"test:bash": "bash tests/bash/test-aether-utils.sh",
|
|
30
|
+
"lint:shell": "shellcheck --severity=error .aether/aether-utils.sh bin/generate-commands.sh .aether/utils/file-lock.sh .aether/utils/atomic-write.sh .aether/utils/colorize-log.sh .aether/utils/watch-spawn-tree.sh",
|
|
31
|
+
"lint:json": "node -e \"const fs=require('fs'); const files=['.aether/data/constraints.json','.aether/data/COLONY_STATE.json']; files.filter(f=>fs.existsSync(f)).forEach(f=>{JSON.parse(fs.readFileSync(f,'utf8'))}); console.log('JSON valid')\"",
|
|
32
|
+
"lint:sync": "bash bin/generate-commands.sh check",
|
|
33
|
+
"lint": "npm run lint:shell && npm run lint:json && npm run lint:sync"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"ava": "^6.0.0",
|
|
37
|
+
"proxyquire": "^2.1.3",
|
|
38
|
+
"sinon": "^19.0.5"
|
|
39
|
+
},
|
|
40
|
+
"ava": {
|
|
41
|
+
"files": [
|
|
42
|
+
"tests/unit/**/*.test.js"
|
|
43
|
+
],
|
|
44
|
+
"timeout": "30s"
|
|
45
|
+
},
|
|
46
|
+
"keywords": [
|
|
47
|
+
"claude-code",
|
|
48
|
+
"opencode",
|
|
49
|
+
"multi-agent",
|
|
50
|
+
"ant-colony",
|
|
51
|
+
"ai-orchestration",
|
|
52
|
+
"pheromone",
|
|
53
|
+
"autonomous-agents",
|
|
54
|
+
"multi-provider"
|
|
55
|
+
],
|
|
56
|
+
"author": "Callum Cowie",
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/calcosmic/Aether.git"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=16.0.0"
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"commander": "^12.1.0",
|
|
67
|
+
"js-yaml": "^4.1.0",
|
|
68
|
+
"picocolors": "^1.1.1"
|
|
69
|
+
}
|
|
70
|
+
}
|