@dp-pcs/ogp 0.3.3 → 0.4.3
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/README.md +317 -61
- package/dist/cli/completion.d.ts +5 -0
- package/dist/cli/completion.d.ts.map +1 -0
- package/dist/cli/completion.js +148 -0
- package/dist/cli/completion.js.map +1 -0
- package/dist/cli/config.d.ts +3 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +207 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/expose.d.ts.map +1 -1
- package/dist/cli/expose.js +20 -13
- package/dist/cli/expose.js.map +1 -1
- package/dist/cli/federation.d.ts +14 -0
- package/dist/cli/federation.d.ts.map +1 -1
- package/dist/cli/federation.js +347 -23
- package/dist/cli/federation.js.map +1 -1
- package/dist/cli/project.d.ts +4 -3
- package/dist/cli/project.d.ts.map +1 -1
- package/dist/cli/project.js +34 -24
- package/dist/cli/project.js.map +1 -1
- package/dist/cli/setup.d.ts +23 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +560 -32
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli.js +358 -35
- package/dist/cli.js.map +1 -1
- package/dist/daemon/agent-comms.d.ts.map +1 -1
- package/dist/daemon/agent-comms.js +15 -10
- package/dist/daemon/agent-comms.js.map +1 -1
- package/dist/daemon/heartbeat.d.ts +22 -0
- package/dist/daemon/heartbeat.d.ts.map +1 -0
- package/dist/daemon/heartbeat.js +119 -0
- package/dist/daemon/heartbeat.js.map +1 -0
- package/dist/daemon/intent-registry.d.ts.map +1 -1
- package/dist/daemon/intent-registry.js +19 -10
- package/dist/daemon/intent-registry.js.map +1 -1
- package/dist/daemon/keypair.d.ts +1 -0
- package/dist/daemon/keypair.d.ts.map +1 -1
- package/dist/daemon/keypair.js +151 -18
- package/dist/daemon/keypair.js.map +1 -1
- package/dist/daemon/message-handler.d.ts.map +1 -1
- package/dist/daemon/message-handler.js +30 -16
- package/dist/daemon/message-handler.js.map +1 -1
- package/dist/daemon/notify.d.ts +19 -0
- package/dist/daemon/notify.d.ts.map +1 -1
- package/dist/daemon/notify.js +376 -73
- package/dist/daemon/notify.js.map +1 -1
- package/dist/daemon/openclaw-bridge.d.ts +34 -0
- package/dist/daemon/openclaw-bridge.d.ts.map +1 -0
- package/dist/daemon/openclaw-bridge.js +261 -0
- package/dist/daemon/openclaw-bridge.js.map +1 -0
- package/dist/daemon/peers.d.ts +21 -0
- package/dist/daemon/peers.d.ts.map +1 -1
- package/dist/daemon/peers.js +125 -20
- package/dist/daemon/peers.js.map +1 -1
- package/dist/daemon/projects.d.ts +9 -6
- package/dist/daemon/projects.d.ts.map +1 -1
- package/dist/daemon/projects.js +30 -20
- package/dist/daemon/projects.js.map +1 -1
- package/dist/daemon/server.d.ts +17 -0
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +188 -77
- package/dist/daemon/server.js.map +1 -1
- package/dist/shared/config.d.ts +52 -1
- package/dist/shared/config.d.ts.map +1 -1
- package/dist/shared/config.js +18 -11
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/framework-detection.d.ts +31 -0
- package/dist/shared/framework-detection.d.ts.map +1 -0
- package/dist/shared/framework-detection.js +91 -0
- package/dist/shared/framework-detection.js.map +1 -0
- package/dist/shared/help.d.ts +5 -0
- package/dist/shared/help.d.ts.map +1 -0
- package/dist/shared/help.js +281 -0
- package/dist/shared/help.js.map +1 -0
- package/dist/shared/meta-config.d.ts +44 -0
- package/dist/shared/meta-config.d.ts.map +1 -0
- package/dist/shared/meta-config.js +89 -0
- package/dist/shared/meta-config.js.map +1 -0
- package/dist/shared/migration.d.ts +57 -0
- package/dist/shared/migration.d.ts.map +1 -0
- package/dist/shared/migration.js +255 -0
- package/dist/shared/migration.js.map +1 -0
- package/docs/CLI-REFERENCE.md +1361 -0
- package/docs/GETTING-STARTED.md +953 -0
- package/docs/MIGRATION.md +202 -0
- package/docs/MULTI-FRAMEWORK-DEMO.md +352 -0
- package/docs/MULTI-FRAMEWORK-DESIGN.md +378 -0
- package/docs/MULTI-FRAMEWORK-IMPL.md +197 -0
- package/docs/case-studies/CRASH_RESOLUTION_20260407.md +190 -0
- package/docs/case-studies/OpenClaw_Hermes_Status_Report_20260407.md +142 -0
- package/docs/case-studies/OpenClaw_Stability_Fix_Summary.md +209 -0
- package/docs/case-studies/README.md +40 -0
- package/docs/case-studies/crash_observations.md +250 -0
- package/docs/cloudflare-named-tunnel-setup.md +126 -0
- package/docs/federation-flow.md +27 -37
- package/docs/hermes-implementation-checklist.md +4 -0
- package/docs/project-intent-testing.md +97 -0
- package/docs/quickstart.md +12 -4
- package/docs/rendezvous.md +13 -14
- package/docs/scopes.md +13 -13
- package/package.json +12 -6
- package/scripts/completion.bash +123 -0
- package/scripts/completion.zsh +372 -0
- package/scripts/install-skills.js +19 -1
- package/scripts/test-migration-execute.js +74 -0
- package/scripts/test-migration.js +42 -0
- package/scripts/test-project-intents.mjs +614 -0
- package/skills/ogp/SKILL.md +197 -64
- package/skills/ogp-agent-comms/SKILL.md +107 -41
- package/skills/ogp-expose/SKILL.md +183 -25
- package/skills/ogp-project/SKILL.md +110 -88
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { existsSync, mkdirSync, cpSync, readdirSync } from 'node:fs';
|
|
2
|
+
import { existsSync, mkdirSync, cpSync, readdirSync, rmSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
@@ -55,6 +55,13 @@ const availableSkills = readdirSync(skillsSrc, { withFileTypes: true })
|
|
|
55
55
|
.filter(d => d.isDirectory() && existsSync(join(skillsSrc, d.name, 'SKILL.md')))
|
|
56
56
|
.map(d => d.name);
|
|
57
57
|
|
|
58
|
+
function getSkillVersion(skill) {
|
|
59
|
+
const skillFile = join(skillsSrc, skill, 'SKILL.md');
|
|
60
|
+
const content = readFileSync(skillFile, 'utf8');
|
|
61
|
+
const match = content.match(/^version:\s*(.+)$/m);
|
|
62
|
+
return match?.[1]?.trim() ?? 'unknown';
|
|
63
|
+
}
|
|
64
|
+
|
|
58
65
|
if (availableSkills.length === 0) {
|
|
59
66
|
console.log('No skills found in the skills/ directory.');
|
|
60
67
|
process.exit(0);
|
|
@@ -176,6 +183,9 @@ async function main() {
|
|
|
176
183
|
const src = join(skillsSrc, skill);
|
|
177
184
|
const dest = join(platform.skillsDir, skill);
|
|
178
185
|
try {
|
|
186
|
+
// Replace the installed skill directory wholesale so stale files from
|
|
187
|
+
// previous package versions do not survive upgrades.
|
|
188
|
+
rmSync(dest, { recursive: true, force: true });
|
|
179
189
|
cpSync(src, dest, { recursive: true });
|
|
180
190
|
console.log(` ✓ ${skill}`);
|
|
181
191
|
installed++;
|
|
@@ -192,6 +202,14 @@ async function main() {
|
|
|
192
202
|
console.log(`\n✅ Successfully installed ${totalInstalled} skill(s) to ${selectedPlatforms.length} platform(s)`);
|
|
193
203
|
console.log('');
|
|
194
204
|
|
|
205
|
+
const installedVersions = selectedSkills
|
|
206
|
+
.map(skill => `${skill}@${getSkillVersion(skill)}`)
|
|
207
|
+
.join(', ');
|
|
208
|
+
console.log(`Installed skill versions: ${installedVersions}`);
|
|
209
|
+
console.log('Verify installed copies with:');
|
|
210
|
+
console.log(" rg -n '^version:' ~/.openclaw/skills/ogp*/SKILL.md ~/.claude/skills/ogp*/SKILL.md 2>/dev/null");
|
|
211
|
+
console.log('');
|
|
212
|
+
|
|
195
213
|
// Platform-specific restart instructions
|
|
196
214
|
const platformNames = selectedPlatforms.map(p => p.name);
|
|
197
215
|
if (platformNames.includes('OpenClaw')) {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Test script for executing migration
|
|
5
|
+
* Usage: node scripts/test-migration-execute.js [--dry-run]
|
|
6
|
+
*
|
|
7
|
+
* Use --dry-run to see what would happen without actually executing
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { detectExistingInstallations, executeMigration } from '../dist/shared/migration.js';
|
|
11
|
+
import { loadMetaConfig } from '../dist/shared/meta-config.js';
|
|
12
|
+
|
|
13
|
+
const dryRun = process.argv.includes('--dry-run');
|
|
14
|
+
|
|
15
|
+
console.log('=== OGP Migration Execution Test ===\n');
|
|
16
|
+
|
|
17
|
+
if (dryRun) {
|
|
18
|
+
console.log('DRY RUN MODE - No changes will be made\n');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Detect existing installations
|
|
22
|
+
const plan = detectExistingInstallations();
|
|
23
|
+
|
|
24
|
+
if (!plan.needed) {
|
|
25
|
+
console.log('No migration needed.');
|
|
26
|
+
process.exit(0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
console.log('Detected Installations:');
|
|
30
|
+
for (const install of plan.existingInstalls) {
|
|
31
|
+
console.log(` - ${install.path} (${install.framework})`);
|
|
32
|
+
}
|
|
33
|
+
console.log('');
|
|
34
|
+
|
|
35
|
+
console.log('Migration Plan:');
|
|
36
|
+
for (const action of plan.actions) {
|
|
37
|
+
console.log(` ${action.type.toUpperCase()}: ${action.description}`);
|
|
38
|
+
if (action.from && action.to) {
|
|
39
|
+
console.log(` ${action.from} -> ${action.to}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
console.log('');
|
|
43
|
+
|
|
44
|
+
if (dryRun) {
|
|
45
|
+
console.log('Dry run complete. Use without --dry-run to execute migration.');
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Execute migration
|
|
50
|
+
console.log('Executing migration...\n');
|
|
51
|
+
try {
|
|
52
|
+
await executeMigration(plan);
|
|
53
|
+
console.log('\n✓ Migration completed successfully!\n');
|
|
54
|
+
|
|
55
|
+
// Load and display the new meta config
|
|
56
|
+
const metaConfig = loadMetaConfig();
|
|
57
|
+
console.log('Meta Configuration:');
|
|
58
|
+
console.log(` Version: ${metaConfig.version}`);
|
|
59
|
+
console.log(` Default Framework: ${metaConfig.default}`);
|
|
60
|
+
console.log(' Frameworks:');
|
|
61
|
+
for (const framework of metaConfig.frameworks) {
|
|
62
|
+
console.log(` - ${framework.id} (${framework.name})`);
|
|
63
|
+
console.log(` Enabled: ${framework.enabled}`);
|
|
64
|
+
console.log(` Config Dir: ${framework.configDir}`);
|
|
65
|
+
console.log(` Daemon Port: ${framework.daemonPort}`);
|
|
66
|
+
console.log(` Display Name: ${framework.displayName}`);
|
|
67
|
+
console.log('');
|
|
68
|
+
}
|
|
69
|
+
} catch (error) {
|
|
70
|
+
console.error('\n✗ Migration failed:', error.message);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
console.log('=== Test Complete ===');
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Test script for migration detection
|
|
5
|
+
* Usage: node scripts/test-migration.js
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { detectExistingInstallations, checkMigrationStatus } from '../dist/shared/migration.js';
|
|
9
|
+
|
|
10
|
+
console.log('=== OGP Migration Detection Test ===\n');
|
|
11
|
+
|
|
12
|
+
// Check migration status
|
|
13
|
+
const status = checkMigrationStatus();
|
|
14
|
+
console.log('Migration Status:');
|
|
15
|
+
console.log(` Needed: ${status.migrationNeeded}`);
|
|
16
|
+
console.log(` Summary: ${status.summary}\n`);
|
|
17
|
+
|
|
18
|
+
if (status.plan) {
|
|
19
|
+
const plan = status.plan;
|
|
20
|
+
|
|
21
|
+
console.log('Detected Installations:');
|
|
22
|
+
for (const install of plan.existingInstalls) {
|
|
23
|
+
console.log(` - ${install.path}`);
|
|
24
|
+
console.log(` Framework: ${install.framework}`);
|
|
25
|
+
console.log(` Display Name: ${install.config.displayName}`);
|
|
26
|
+
console.log(` Daemon Port: ${install.config.daemonPort}`);
|
|
27
|
+
console.log(` Platform: ${install.config.platform || '(not set)'}`);
|
|
28
|
+
console.log('');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
console.log('Migration Actions:');
|
|
32
|
+
for (const action of plan.actions) {
|
|
33
|
+
console.log(` ${action.type.toUpperCase()}: ${action.description}`);
|
|
34
|
+
if (action.from && action.to) {
|
|
35
|
+
console.log(` ${action.from} -> ${action.to}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
console.log('No migration plan needed.');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
console.log('\n=== Test Complete ===');
|