@trac3er/oh-my-god 2.0.0-beta.4 → 2.0.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/.claude-plugin/marketplace.json +7 -7
- package/.claude-plugin/plugin.json +3 -4
- package/.claude-plugin/scripts/install.sh +9 -0
- package/.claude-plugin/scripts/uninstall.sh +3 -74
- package/.claude-plugin/scripts/update.sh +3 -78
- package/OMG-setup.sh +354 -1243
- package/README.md +43 -549
- package/agents/omg-testing-engineer.md +1 -1
- package/bun.lock +23 -0
- package/bunfig.toml +3 -0
- package/commands/OMG:ai-commit.md +26 -0
- package/commands/OMG:arch.md +30 -0
- package/commands/OMG:ccg.md +17 -0
- package/commands/OMG:compat.md +49 -0
- package/commands/OMG:cost.md +21 -0
- package/commands/{crazy.md → OMG:crazy.md} +1 -1
- package/commands/OMG:create-agent.md +33 -0
- package/commands/OMG:deps.md +30 -0
- package/commands/{domain-init.md → OMG:domain-init.md} +1 -1
- package/commands/OMG:escalate.md +23 -0
- package/commands/OMG:health-check.md +21 -0
- package/commands/OMG:init.md +26 -0
- package/commands/{project-init.md → OMG:project-init.md} +1 -1
- package/commands/OMG:session-branch.md +18 -0
- package/commands/OMG:session-fork.md +16 -0
- package/commands/OMG:session-merge.md +18 -0
- package/commands/OMG:setup.md +22 -0
- package/commands/OMG:stats.md +24 -0
- package/commands/OMG:teams.md +30 -0
- package/config/lsp_languages.yaml +0 -8
- package/hooks/_budget.ts +1 -0
- package/hooks/_common.ts +63 -0
- package/hooks/circuit-breaker.ts +101 -0
- package/hooks/config-guard.ts +4 -0
- package/hooks/firewall.ts +20 -0
- package/hooks/policy_engine.ts +156 -0
- package/hooks/post-tool-failure.ts +22 -0
- package/hooks/post-write.ts +4 -0
- package/hooks/pre-tool-inject.ts +4 -0
- package/hooks/prompt-enhancer.ts +46 -0
- package/hooks/quality-runner.ts +24 -0
- package/hooks/secret-guard.ts +4 -0
- package/hooks/session-end-capture.ts +19 -0
- package/hooks/session-start.ts +19 -0
- package/hooks/shadow_manager.ts +81 -0
- package/hooks/stop-gate.ts +22 -0
- package/hooks/stop_dispatcher.ts +147 -0
- package/hooks/test-generator-hook.ts +4 -0
- package/hooks/tool-ledger.ts +27 -0
- package/hooks/trust_review.ts +175 -0
- package/hud/omg-hud.mjs +1 -42
- package/lab/pipeline.ts +75 -0
- package/lab/policies.ts +68 -0
- package/package.json +19 -8
- package/plugins/README.md +1 -1
- package/plugins/advanced/commands/{deep-plan.md → OMG:deep-plan.md} +3 -3
- package/plugins/advanced/commands/{learn.md → OMG:learn.md} +1 -1
- package/plugins/advanced/commands/{security-review.md → OMG:security-review.md} +3 -3
- package/plugins/advanced/commands/{ship.md → OMG:ship.md} +1 -1
- package/plugins/advanced/plugin.json +12 -12
- package/plugins/core/plugin.json +15 -15
- package/rules/contextual/write-verify.md +2 -2
- package/rules/core/00-truth.md +1 -1
- package/rules/core/01-surgical.md +1 -1
- package/rules/core/02-circuit-breaker.md +2 -2
- package/rules/core/03-ensemble.md +3 -3
- package/rules/core/04-testing.md +3 -3
- package/runtime/common.ts +111 -0
- package/runtime/compat.ts +174 -0
- package/runtime/dispatcher.ts +25 -0
- package/runtime/ecosystem.ts +186 -0
- package/runtime/provider_bootstrap.ts +99 -0
- package/runtime/provider_smoke.ts +34 -0
- package/runtime/release_readiness.ts +186 -0
- package/runtime/team_router.ts +144 -0
- package/scripts/check-omg-compat-contract-snapshot.ts +20 -0
- package/scripts/check-omg-standalone-clean.ts +12 -0
- package/scripts/check-runtime-clean.ts +94 -0
- package/scripts/omg.ts +352 -0
- package/scripts/settings-merge.ts +93 -0
- package/scripts/verify-standalone.sh +4 -8
- package/settings.json +10 -94
- package/templates/profile.yaml +1 -1
- package/tools/commit_splitter.ts +23 -0
- package/tools/git_inspector.ts +18 -0
- package/tools/session_snapshot.ts +47 -0
- package/trac3er-oh-my-god-2.0.0.tgz +0 -0
- package/tsconfig.json +15 -0
- package/.coveragerc +0 -26
- package/agents/__init__.py +0 -1
- package/agents/model_roles.py +0 -196
- package/commands/ai-commit.md +0 -113
- package/commands/arch.md +0 -313
- package/commands/ccg.md +0 -22
- package/commands/compat.md +0 -57
- package/commands/cost.md +0 -181
- package/commands/create-agent.md +0 -183
- package/commands/deps.md +0 -248
- package/commands/escalate.md +0 -52
- package/commands/health-check.md +0 -45
- package/commands/init.md +0 -134
- package/commands/session-branch.md +0 -85
- package/commands/session-fork.md +0 -53
- package/commands/session-merge.md +0 -134
- package/commands/setup.md +0 -76
- package/commands/stats.md +0 -225
- package/commands/teams.md +0 -39
- package/hooks/__init__.py +0 -0
- package/hooks/_agent_registry.py +0 -411
- package/hooks/_analytics.py +0 -291
- package/hooks/_budget.py +0 -31
- package/hooks/_common.py +0 -476
- package/hooks/_compression_optimizer.py +0 -119
- package/hooks/_cost_ledger.py +0 -176
- package/hooks/_learnings.py +0 -126
- package/hooks/_memory.py +0 -103
- package/hooks/_protected_context.py +0 -150
- package/hooks/_token_counter.py +0 -221
- package/hooks/branch_manager.py +0 -236
- package/hooks/budget_governor.py +0 -232
- package/hooks/circuit-breaker.py +0 -270
- package/hooks/compression_feedback.py +0 -254
- package/hooks/config-guard.py +0 -163
- package/hooks/context_pressure.py +0 -53
- package/hooks/credential_store.py +0 -970
- package/hooks/fetch-rate-limits.py +0 -212
- package/hooks/firewall.py +0 -48
- package/hooks/hashline-formatter-bridge.py +0 -224
- package/hooks/hashline-injector.py +0 -273
- package/hooks/hashline-validator.py +0 -216
- package/hooks/idle-detector.py +0 -95
- package/hooks/intentgate-keyword-detector.py +0 -188
- package/hooks/magic-keyword-router.py +0 -195
- package/hooks/policy_engine.py +0 -505
- package/hooks/post-tool-failure.py +0 -19
- package/hooks/post-write.py +0 -219
- package/hooks/post_write.py +0 -46
- package/hooks/pre-compact.py +0 -398
- package/hooks/pre-tool-inject.py +0 -98
- package/hooks/prompt-enhancer.py +0 -672
- package/hooks/quality-runner.py +0 -191
- package/hooks/query.py +0 -512
- package/hooks/secret-guard.py +0 -61
- package/hooks/secret_audit.py +0 -144
- package/hooks/session-end-capture.py +0 -137
- package/hooks/session-start.py +0 -275
- package/hooks/setup_wizard.py +0 -259
- package/hooks/shadow_manager.py +0 -297
- package/hooks/state_migration.py +0 -225
- package/hooks/stop-gate.py +0 -7
- package/hooks/stop_dispatcher.py +0 -945
- package/hooks/test-validator.py +0 -361
- package/hooks/test_generator_hook.py +0 -123
- package/hooks/todo-state-tracker.py +0 -114
- package/hooks/tool-ledger.py +0 -149
- package/hooks/trust_review.py +0 -524
- package/lab/__init__.py +0 -1
- package/lab/pipeline.py +0 -75
- package/lab/policies.py +0 -52
- package/plugins/dephealth/__init__.py +0 -0
- package/plugins/dephealth/cve_scanner.py +0 -188
- package/plugins/dephealth/license_checker.py +0 -135
- package/plugins/dephealth/manifest_detector.py +0 -423
- package/plugins/dephealth/vuln_analyzer.py +0 -169
- package/plugins/testgen/__init__.py +0 -0
- package/plugins/testgen/codamosa_engine.py +0 -402
- package/plugins/testgen/edge_case_synthesizer.py +0 -184
- package/plugins/testgen/framework_detector.py +0 -271
- package/plugins/testgen/skeleton_generator.py +0 -219
- package/plugins/viz/__init__.py +0 -0
- package/plugins/viz/ast_parser.py +0 -139
- package/plugins/viz/diagram_generator.py +0 -192
- package/plugins/viz/graph_builder.py +0 -444
- package/plugins/viz/native_parsers.py +0 -259
- package/plugins/viz/regex_parser.py +0 -112
- package/pyproject.toml +0 -82
- package/runtime/__init__.py +0 -32
- package/runtime/adapters/__init__.py +0 -13
- package/runtime/adapters/claude.py +0 -60
- package/runtime/adapters/gpt.py +0 -53
- package/runtime/adapters/local.py +0 -53
- package/runtime/business_workflow.py +0 -220
- package/runtime/cli_provider.py +0 -85
- package/runtime/compat.py +0 -1299
- package/runtime/custom_agent_loader.py +0 -366
- package/runtime/dispatcher.py +0 -47
- package/runtime/ecosystem.py +0 -371
- package/runtime/legacy_compat.py +0 -7
- package/runtime/mcp_config_writers.py +0 -115
- package/runtime/mcp_lifecycle.py +0 -153
- package/runtime/mcp_memory_server.py +0 -107
- package/runtime/memory_parsers/__init__.py +0 -0
- package/runtime/memory_parsers/chatgpt_parser.py +0 -257
- package/runtime/memory_parsers/claude_import.py +0 -107
- package/runtime/memory_parsers/export.py +0 -97
- package/runtime/memory_parsers/gemini_import.py +0 -91
- package/runtime/memory_parsers/kimi_import.py +0 -91
- package/runtime/memory_store.py +0 -215
- package/runtime/omc_compat.py +0 -7
- package/runtime/providers/__init__.py +0 -0
- package/runtime/providers/codex_provider.py +0 -111
- package/runtime/providers/gemini_provider.py +0 -127
- package/runtime/providers/kimi_provider.py +0 -150
- package/runtime/providers/opencode_provider.py +0 -143
- package/runtime/subagent_dispatcher.py +0 -362
- package/runtime/team_router.py +0 -1167
- package/runtime/tmux_session_manager.py +0 -169
- package/scripts/bump-version.sh +0 -62
- package/scripts/check-omg-compat-contract-snapshot.py +0 -137
- package/scripts/check-omg-contract-snapshot.py +0 -12
- package/scripts/check-omg-standalone-clean.py +0 -103
- package/scripts/legacy_to_omg_migrate.py +0 -29
- package/scripts/migrate-legacy.py +0 -464
- package/scripts/omc_to_omg_migrate.py +0 -12
- package/scripts/omg.py +0 -503
- package/scripts/settings-merge.py +0 -224
- package/tools/__init__.py +0 -2
- package/tools/browser_consent.py +0 -289
- package/tools/browser_stealth.py +0 -481
- package/tools/browser_tool.py +0 -448
- package/tools/changelog_generator.py +0 -347
- package/tools/commit_splitter.py +0 -746
- package/tools/config_discovery.py +0 -151
- package/tools/config_merger.py +0 -449
- package/tools/dashboard_generator.py +0 -300
- package/tools/git_inspector.py +0 -298
- package/tools/lsp_client.py +0 -275
- package/tools/lsp_discovery.py +0 -231
- package/tools/lsp_operations.py +0 -392
- package/tools/pr_generator.py +0 -404
- package/tools/python_repl.py +0 -656
- package/tools/python_sandbox.py +0 -609
- package/tools/search_providers/__init__.py +0 -77
- package/tools/search_providers/brave.py +0 -115
- package/tools/search_providers/exa.py +0 -116
- package/tools/search_providers/jina.py +0 -104
- package/tools/search_providers/perplexity.py +0 -139
- package/tools/search_providers/synthetic.py +0 -74
- package/tools/session_snapshot.py +0 -736
- package/tools/ssh_manager.py +0 -912
- package/tools/theme_engine.py +0 -294
- package/tools/theme_selector.py +0 -137
- package/tools/web_search.py +0 -622
- /package/commands/{mode.md → OMG:mode.md} +0 -0
- /package/commands/{ralph-start.md → OMG:ralph-start.md} +0 -0
- /package/commands/{ralph-stop.md → OMG:ralph-stop.md} +0 -0
- /package/commands/{theme.md → OMG:theme.md} +0 -0
- /package/plugins/advanced/commands/{code-review.md → OMG:code-review.md} +0 -0
- /package/plugins/advanced/commands/{handoff.md → OMG:handoff.md} +0 -0
- /package/plugins/advanced/commands/{maintainer.md → OMG:maintainer.md} +0 -0
- /package/plugins/advanced/commands/{ralph-start.md → OMG:ralph-start.md} +0 -0
- /package/plugins/advanced/commands/{ralph-stop.md → OMG:ralph-stop.md} +0 -0
- /package/plugins/advanced/commands/{sequential-thinking.md → OMG:sequential-thinking.md} +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "oh-
|
|
2
|
+
"name": "oh-advanced-layer",
|
|
3
3
|
"description": "Marketplace metadata for the OMG Claude plugin",
|
|
4
4
|
"owner": {
|
|
5
5
|
"name": "trac3er00"
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
|
-
"description": "OMG
|
|
9
|
-
"version": "2.0.0
|
|
8
|
+
"description": "OMG Bun runtime for Claude Code",
|
|
9
|
+
"version": "2.0.0",
|
|
10
10
|
"homepage": "https://github.com/trac3er00/OMG",
|
|
11
11
|
"repository": "git@github.com:trac3er00/OMG.git"
|
|
12
12
|
},
|
|
13
13
|
"plugins": [
|
|
14
14
|
{
|
|
15
15
|
"name": "omg",
|
|
16
|
-
"description": "OMG
|
|
17
|
-
"version": "2.0.0
|
|
16
|
+
"description": "OMG Bun runtime orchestration layer for Claude Code",
|
|
17
|
+
"version": "2.0.0",
|
|
18
18
|
"source": "./",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "trac3er00"
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"omg",
|
|
29
29
|
"codex",
|
|
30
30
|
"gemini",
|
|
31
|
-
"
|
|
31
|
+
"bun"
|
|
32
32
|
]
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
|
-
"version": "2.0.0
|
|
35
|
+
"version": "2.0.0"
|
|
36
36
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omg",
|
|
3
|
-
"version": "2.0.0
|
|
4
|
-
"description": "OMG
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "OMG Bun runtime for Claude Code orchestration and multi-agent workflows",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "trac3er00"
|
|
7
7
|
},
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"omg",
|
|
17
17
|
"codex",
|
|
18
18
|
"gemini",
|
|
19
|
-
"
|
|
20
|
-
"escalation"
|
|
19
|
+
"bun"
|
|
21
20
|
],
|
|
22
21
|
"mcpServers": "./.mcp.json"
|
|
23
22
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
PLUGIN_DIR="$(dirname "$SCRIPT_DIR")"
|
|
6
|
+
OMG_ROOT="$(dirname "$PLUGIN_DIR")"
|
|
7
|
+
|
|
8
|
+
echo "Installing OMG Bun plugin..."
|
|
9
|
+
exec bash "$OMG_ROOT/OMG-setup.sh" install --install-as-plugin --non-interactive
|
|
@@ -1,80 +1,9 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# This script is called by Claude Code when user uninstalls the plugin
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
# Colors
|
|
8
|
-
RED='\033[0;31m'
|
|
9
|
-
GREEN='\033[0;32m'
|
|
10
|
-
YELLOW='\033[1;33m'
|
|
11
|
-
BLUE='\033[0;34m'
|
|
12
|
-
NC='\033[0m'
|
|
13
|
-
|
|
14
|
-
info() { echo -e "${BLUE}ℹ${NC} $1"; }
|
|
15
|
-
success() { echo -e "${GREEN}✓${NC} $1"; }
|
|
16
|
-
warning() { echo -e "${YELLOW}⚠${NC} $1"; }
|
|
17
|
-
error() { echo -e "${RED}✗${NC} $1"; }
|
|
18
|
-
|
|
19
|
-
echo ""
|
|
20
|
-
echo -e "${BLUE}╔═══════════════════════════════════════════════════════════════╗${NC}"
|
|
21
|
-
echo -e "${BLUE}║ ║${NC}"
|
|
22
|
-
echo -e "${BLUE}║ OMG Plugin Uninstaller v1.0.0 ║${NC}"
|
|
23
|
-
echo -e "${BLUE}║ ║${NC}"
|
|
24
|
-
echo -e "${BLUE}╚═══════════════════════════════════════════════════════════════╝${NC}"
|
|
25
|
-
echo ""
|
|
2
|
+
set -euo pipefail
|
|
26
3
|
|
|
27
4
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
28
5
|
PLUGIN_DIR="$(dirname "$SCRIPT_DIR")"
|
|
29
6
|
OMG_ROOT="$(dirname "$PLUGIN_DIR")"
|
|
30
7
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
info "Running uninstall via OMG-setup.sh..."
|
|
34
|
-
echo ""
|
|
35
|
-
bash "$OMG_ROOT/OMG-setup.sh" uninstall
|
|
36
|
-
else
|
|
37
|
-
warning "OMG-setup.sh not found, performing manual cleanup..."
|
|
38
|
-
|
|
39
|
-
CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
40
|
-
|
|
41
|
-
# Remove OMG files manually
|
|
42
|
-
rm -f "$CLAUDE_DIR"/commands/OMG:*.md 2>/dev/null || true
|
|
43
|
-
rm -f "$CLAUDE_DIR"/agents/omg-*.md 2>/dev/null || true
|
|
44
|
-
rm -f "$CLAUDE_DIR"/hooks/.omg-version 2>/dev/null || true
|
|
45
|
-
rm -f "$CLAUDE_DIR"/hooks/session-start.py 2>/dev/null || true
|
|
46
|
-
rm -f "$CLAUDE_DIR"/hooks/session-end-capture.py 2>/dev/null || true
|
|
47
|
-
rm -f "$CLAUDE_DIR"/hooks/prompt-enhancer.py 2>/dev/null || true
|
|
48
|
-
rm -f "$CLAUDE_DIR"/hooks/circuit-breaker.py 2>/dev/null || true
|
|
49
|
-
rm -f "$CLAUDE_DIR"/hooks/test-validator.py 2>/dev/null || true
|
|
50
|
-
rm -f "$CLAUDE_DIR"/hooks/firewall.py 2>/dev/null || true
|
|
51
|
-
rm -f "$CLAUDE_DIR"/hooks/secret-guard.py 2>/dev/null || true
|
|
52
|
-
rm -f "$CLAUDE_DIR"/hooks/tool-ledger.py 2>/dev/null || true
|
|
53
|
-
rm -f "$CLAUDE_DIR"/hooks/post-write.py 2>/dev/null || true
|
|
54
|
-
rm -f "$CLAUDE_DIR"/hooks/quality-runner.py 2>/dev/null || true
|
|
55
|
-
rm -f "$CLAUDE_DIR"/hooks/stop-gate.py 2>/dev/null || true
|
|
56
|
-
rm -f "$CLAUDE_DIR"/hooks/stop_dispatcher.py 2>/dev/null || true
|
|
57
|
-
rm -f "$CLAUDE_DIR"/hooks/pre-compact.py 2>/dev/null || true
|
|
58
|
-
rm -f "$CLAUDE_DIR"/hooks/pre-tool-inject.py 2>/dev/null || true
|
|
59
|
-
rm -f "$CLAUDE_DIR"/hooks/post-tool-failure.py 2>/dev/null || true
|
|
60
|
-
rm -f "$CLAUDE_DIR"/hooks/config-guard.py 2>/dev/null || true
|
|
61
|
-
rm -f "$CLAUDE_DIR"/hooks/policy_engine.py 2>/dev/null || true
|
|
62
|
-
rm -f "$CLAUDE_DIR"/hooks/trust_review.py 2>/dev/null || true
|
|
63
|
-
rm -f "$CLAUDE_DIR"/hooks/shadow_manager.py 2>/dev/null || true
|
|
64
|
-
rm -rf "$CLAUDE_DIR"/hooks/__pycache__ 2>/dev/null || true
|
|
65
|
-
rm -f "$CLAUDE_DIR"/hooks/_common.py 2>/dev/null || true
|
|
66
|
-
rm -f "$CLAUDE_DIR"/hooks/_budget.py 2>/dev/null || true
|
|
67
|
-
rm -f "$CLAUDE_DIR"/hooks/_memory.py 2>/dev/null || true
|
|
68
|
-
rm -f "$CLAUDE_DIR"/hooks/_learnings.py 2>/dev/null || true
|
|
69
|
-
rm -f "$CLAUDE_DIR"/hooks/_agent_registry.py 2>/dev/null || true
|
|
70
|
-
rm -f "$CLAUDE_DIR"/hooks/state_migration.py 2>/dev/null || true
|
|
71
|
-
rm -f "$CLAUDE_DIR"/hooks/fetch-rate-limits.py 2>/dev/null || true
|
|
72
|
-
rm -f "$CLAUDE_DIR"/.omg-manifest 2>/dev/null || true
|
|
73
|
-
rm -rf "$CLAUDE_DIR"/omg-runtime 2>/dev/null || true
|
|
74
|
-
rm -rf "$CLAUDE_DIR"/templates/omg 2>/dev/null || true
|
|
75
|
-
rm -f "$CLAUDE_DIR"/rules/0[0-4]-*.md 2>/dev/null || true
|
|
76
|
-
fi
|
|
77
|
-
|
|
78
|
-
echo ""
|
|
79
|
-
success "OMG Plugin uninstalled successfully!"
|
|
80
|
-
echo ""
|
|
8
|
+
echo "Uninstalling OMG Bun plugin..."
|
|
9
|
+
exec bash "$OMG_ROOT/OMG-setup.sh" uninstall --non-interactive
|
|
@@ -1,84 +1,9 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Simplified version for Claude Code plugin system
|
|
2
|
+
set -euo pipefail
|
|
4
3
|
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
echo "Updating OMG plugin..."
|
|
8
|
-
|
|
9
|
-
# Find OMG root - prioritize git repo if we're in one
|
|
10
4
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
5
|
PLUGIN_DIR="$(dirname "$SCRIPT_DIR")"
|
|
12
6
|
OMG_ROOT="$(dirname "$PLUGIN_DIR")"
|
|
13
7
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
echo "Found git repository at: $OMG_ROOT"
|
|
17
|
-
cd "$OMG_ROOT"
|
|
18
|
-
|
|
19
|
-
# Check for local changes
|
|
20
|
-
STASHED=false
|
|
21
|
-
if [ -n "$(git status --porcelain 2>/dev/null)" ]; then
|
|
22
|
-
echo "Stashing local changes..."
|
|
23
|
-
if git stash push -m "Auto-stash before update"; then
|
|
24
|
-
STASHED=true
|
|
25
|
-
fi
|
|
26
|
-
fi
|
|
27
|
-
|
|
28
|
-
# Pull latest
|
|
29
|
-
echo "Pulling latest changes..."
|
|
30
|
-
git pull origin main
|
|
31
|
-
|
|
32
|
-
# Restore stashed changes
|
|
33
|
-
if $STASHED; then
|
|
34
|
-
echo "Restoring stashed changes..."
|
|
35
|
-
git stash pop || echo "Warning: Could not restore stashed changes. Run 'git stash pop' manually."
|
|
36
|
-
fi
|
|
37
|
-
|
|
38
|
-
NEW_VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "")
|
|
39
|
-
if [ -n "$NEW_VERSION" ]; then
|
|
40
|
-
python3 - "$NEW_VERSION" <<'PY'
|
|
41
|
-
import json
|
|
42
|
-
import sys
|
|
43
|
-
from pathlib import Path
|
|
44
|
-
|
|
45
|
-
new_version = sys.argv[1]
|
|
46
|
-
plugin_path = Path('.claude-plugin/plugin.json')
|
|
47
|
-
marketplace_path = Path('.claude-plugin/marketplace.json')
|
|
48
|
-
|
|
49
|
-
plugin = json.loads(plugin_path.read_text(encoding='utf-8'))
|
|
50
|
-
plugin['version'] = new_version
|
|
51
|
-
plugin_path.write_text(json.dumps(plugin, indent=2) + '\n', encoding='utf-8')
|
|
52
|
-
|
|
53
|
-
marketplace = json.loads(marketplace_path.read_text(encoding='utf-8'))
|
|
54
|
-
marketplace['version'] = new_version
|
|
55
|
-
if isinstance(marketplace.get('metadata'), dict):
|
|
56
|
-
marketplace['metadata']['version'] = new_version
|
|
57
|
-
plugins = marketplace.get('plugins')
|
|
58
|
-
if isinstance(plugins, list) and plugins:
|
|
59
|
-
if isinstance(plugins[0], dict):
|
|
60
|
-
plugins[0]['version'] = new_version
|
|
61
|
-
marketplace_path.write_text(json.dumps(marketplace, indent=2) + '\n', encoding='utf-8')
|
|
62
|
-
PY
|
|
63
|
-
echo "Synced manifest versions to $NEW_VERSION"
|
|
64
|
-
else
|
|
65
|
-
echo "Skipped manifest version sync (no git tag found)"
|
|
66
|
-
fi
|
|
67
|
-
|
|
68
|
-
echo "Update complete!"
|
|
69
|
-
echo ""
|
|
70
|
-
echo "Note: Changes are immediately active (symlinked installation)"
|
|
71
|
-
else
|
|
72
|
-
# Running from cache - run OMG-setup.sh
|
|
73
|
-
if [ -f "$OMG_ROOT/OMG-setup.sh" ]; then
|
|
74
|
-
echo "Running OMG-setup.sh update..."
|
|
75
|
-
bash "$OMG_ROOT/OMG-setup.sh" update
|
|
76
|
-
else
|
|
77
|
-
echo "ERROR: Could not find OMG-setup.sh"
|
|
78
|
-
exit 1
|
|
79
|
-
fi
|
|
80
|
-
fi
|
|
81
|
-
|
|
82
|
-
echo ""
|
|
83
|
-
echo "✓ OMG updated successfully"
|
|
84
|
-
echo " Restart Claude Code if you see new commands"
|
|
8
|
+
echo "Updating OMG Bun plugin..."
|
|
9
|
+
exec bash "$OMG_ROOT/OMG-setup.sh" update --install-as-plugin --non-interactive
|