@a5c-ai/babysitter-opencode 5.0.1-staging.76116f66 → 5.0.1-staging.7a765939
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/bin/cli.js +5 -0
- package/bin/install-shared.js +9 -9
- package/bin/install.js +3 -0
- package/bin/uninstall.js +0 -1
- package/hooks/hooks.json +1 -1
- package/package.json +8 -4
- package/plugin.json +1 -1
- package/scripts/team-install.js +4 -1
- package/versions.json +2 -2
package/bin/cli.js
CHANGED
|
@@ -5,6 +5,8 @@ const path = require('path');
|
|
|
5
5
|
const { spawnSync } = require('child_process');
|
|
6
6
|
|
|
7
7
|
const PACKAGE_ROOT = path.resolve(__dirname, '..');
|
|
8
|
+
let shared;
|
|
9
|
+
try { shared = require('./install-shared'); } catch {}
|
|
8
10
|
|
|
9
11
|
function printUsage() {
|
|
10
12
|
console.error([
|
|
@@ -61,6 +63,9 @@ function main() {
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
if (command === 'install') {
|
|
66
|
+
if (shared && typeof shared.harnessCliRoute === 'function' && shared.harnessCliRoute(rest, PACKAGE_ROOT, runNodeScript)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
64
69
|
const parsed = parseInstallArgs(rest);
|
|
65
70
|
if (parsed.scope === 'workspace') {
|
|
66
71
|
const args = [];
|
package/bin/install-shared.js
CHANGED
|
@@ -13,7 +13,7 @@ function getUserHome() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function getHarnessHome() {
|
|
16
|
-
return path.join(os.homedir(),
|
|
16
|
+
return path.join(os.homedir(), ".opencode");
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function getHomePluginRoot(scope) {
|
|
@@ -369,7 +369,7 @@ function mergeHooksConfig(packageRoot, openCodeHome) {
|
|
|
369
369
|
const normalizedScript = relativeScript.replace(/\\/g, '/').replace(/^\.\//, '');
|
|
370
370
|
return {
|
|
371
371
|
...entry,
|
|
372
|
-
script: `npx -y @a5c-ai/hooks-mux-cli invoke --adapter opencode --handler
|
|
372
|
+
script: `npx -y -p @a5c-ai/hooks-mux-cli -c "a5c-hooks-mux invoke --adapter opencode --handler 'node ./plugins/${PLUGIN_NAME}/${normalizedScript}' --json"`,
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
375
|
if (entry.command) {
|
|
@@ -593,20 +593,20 @@ module.exports = {
|
|
|
593
593
|
runCli,
|
|
594
594
|
ensureGlobalProcessLibrary,
|
|
595
595
|
PLUGIN_BUNDLE_ENTRIES,
|
|
596
|
-
|
|
596
|
+
copyRecursive,
|
|
597
|
+
copyPluginBundle,
|
|
597
598
|
DEFAULT_MARKETPLACE,
|
|
599
|
+
normalizeMarketplaceSourcePath,
|
|
600
|
+
normalizeMarketplaceName,
|
|
601
|
+
ensureMarketplaceEntry,
|
|
602
|
+
removeMarketplaceEntry,
|
|
603
|
+
HOOK_SCRIPT_NAMES,
|
|
598
604
|
getOpenCodeHome,
|
|
599
605
|
getHomePluginRoot,
|
|
600
606
|
getHomeMarketplacePath,
|
|
601
|
-
copyRecursive,
|
|
602
|
-
copyPluginBundle,
|
|
603
607
|
writeIndexJs,
|
|
604
608
|
mergeHooksConfig,
|
|
605
609
|
removeManagedHooks,
|
|
606
|
-
normalizeMarketplaceName,
|
|
607
|
-
normalizeMarketplaceSourcePath,
|
|
608
|
-
ensureMarketplaceEntry,
|
|
609
|
-
removeMarketplaceEntry,
|
|
610
610
|
getAccomplishDataDir,
|
|
611
611
|
isAccomplishInstalled,
|
|
612
612
|
getAccomplishOpenCodeHome,
|
package/bin/install.js
CHANGED
|
@@ -15,6 +15,9 @@ function main() {
|
|
|
15
15
|
try {
|
|
16
16
|
shared.copyPluginBundle(PACKAGE_ROOT, pluginRoot);
|
|
17
17
|
shared.ensureMarketplaceEntry(marketplacePath, pluginRoot);
|
|
18
|
+
if (typeof shared.harnessInstall === 'function') {
|
|
19
|
+
shared.harnessInstall(PACKAGE_ROOT, pluginRoot);
|
|
20
|
+
}
|
|
18
21
|
shared.runPostInstall && shared.runPostInstall(pluginRoot);
|
|
19
22
|
console.log(`[${shared.PLUGIN_NAME}] Installation complete!`);
|
|
20
23
|
console.log(`[${shared.PLUGIN_NAME}] Restart your IDE/CLI to pick up the plugin.`);
|
package/bin/uninstall.js
CHANGED
package/hooks/hooks.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-opencode",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.7a765939",
|
|
4
4
|
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"deploy": "npm publish --access public",
|
|
@@ -36,11 +36,15 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@a5c-ai/babysitter-sdk": "5.0.1-staging.
|
|
39
|
+
"@a5c-ai/babysitter-sdk": "5.0.1-staging.7a765939"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
|
-
"url": "https://github.com/a5c-ai/babysitter"
|
|
43
|
+
"url": "git+https://github.com/a5c-ai/babysitter.git",
|
|
44
|
+
"directory": "plugins/babysitter-opencode"
|
|
44
45
|
},
|
|
45
|
-
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-opencode#readme"
|
|
46
|
+
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-opencode#readme",
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/a5c-ai/babysitter/issues"
|
|
49
|
+
}
|
|
46
50
|
}
|
package/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.7a765939",
|
|
4
4
|
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
|
|
5
5
|
"author": "a5c.ai",
|
|
6
6
|
"license": "MIT",
|
package/scripts/team-install.js
CHANGED
|
@@ -11,10 +11,13 @@ for (var i = 0; i < process.argv.length; i++) {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
var src = process.env.PLUGIN_PACKAGE_ROOT || path.resolve(__dirname, '..');
|
|
14
15
|
var dest = shared.getHomePluginRoot('workspace');
|
|
15
16
|
console.log('[babysitter] Team install to ' + dest);
|
|
16
17
|
|
|
17
|
-
var src = process.env.PLUGIN_PACKAGE_ROOT || path.resolve(__dirname, '..');
|
|
18
18
|
shared.copyPluginBundle(src, dest);
|
|
19
|
+
if (typeof shared.harnessTeamInstall === 'function') {
|
|
20
|
+
shared.harnessTeamInstall(src, dest, workspace);
|
|
21
|
+
}
|
|
19
22
|
shared.runPostInstall(dest);
|
|
20
23
|
console.log('[babysitter] Team install complete.');
|
package/versions.json
CHANGED