superpowers-manager 0.2.0 → 0.3.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/README.md +112 -47
- package/bin/superpowers-manager.js +9 -283
- package/dist/adapter-result.js +204 -0
- package/dist/adapter.js +649 -0
- package/dist/atomic.js +142 -0
- package/dist/cli-arguments.js +32 -0
- package/dist/cli.js +293 -0
- package/dist/codex-json.js +89 -0
- package/dist/codex-state.js +78 -0
- package/dist/commands/context.js +1 -0
- package/dist/commands/install.js +376 -0
- package/dist/commands/pin.js +79 -0
- package/dist/commands/prepare.js +527 -0
- package/dist/commands/probe.js +392 -0
- package/dist/commands/track-latest.js +44 -0
- package/dist/commands/uninstall.js +308 -0
- package/dist/commands/unpin.js +95 -0
- package/dist/commands/update.js +138 -0
- package/dist/domain/fingerprint.js +4 -0
- package/dist/domain/refs.js +37 -0
- package/dist/effective-selection.js +123 -0
- package/dist/generated-plugin.js +748 -0
- package/dist/git.js +38 -0
- package/dist/hooks.js +290 -0
- package/dist/lifecycle.js +220 -0
- package/dist/manifest-overlay.js +125 -0
- package/dist/provenance.js +111 -0
- package/dist/python-json-format.js +83 -0
- package/dist/python-json.js +29 -0
- package/dist/python-text.js +74 -0
- package/dist/safe-path.js +137 -0
- package/dist/safety-error.js +10 -0
- package/dist/selection-state-cli.js +85 -0
- package/dist/selection-store.js +172 -0
- package/dist/selection.js +200 -0
- package/dist/status.js +24 -0
- package/dist/strict-json.js +248 -0
- package/dist/upstream-cli.js +110 -0
- package/dist/upstream-version.js +40 -0
- package/dist/upstream.js +253 -0
- package/dist/validate-generated-plugin-cli.js +118 -0
- package/dist/validator.js +317 -0
- package/dist/workspace.js +139 -0
- package/package.json +25 -2
- package/scripts/adapters/codex/adapter +0 -603
- package/scripts/adapters/codex/lib.sh +0 -449
- package/scripts/adapters/codex/validate-generated-plugin.py +0 -314
- package/scripts/core/adapter.sh +0 -103
- package/scripts/core/common.sh +0 -59
- package/scripts/core/lifecycle.sh +0 -141
- package/scripts/core/provenance.sh +0 -135
- package/scripts/core/selection-state.py +0 -414
- package/scripts/core/selection.sh +0 -168
- package/scripts/core/status.sh +0 -27
- package/scripts/core/upstream.sh +0 -280
- package/scripts/core/validate-adapter-response.py +0 -284
- package/scripts/install +0 -59
- package/scripts/pin +0 -51
- package/scripts/prepare +0 -117
- package/scripts/probe +0 -82
- package/scripts/track-latest +0 -30
- package/scripts/uninstall +0 -35
- package/scripts/unpin +0 -41
- package/scripts/update +0 -34
package/scripts/unpin
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
set -eu
|
|
3
|
-
|
|
4
|
-
root=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
|
|
5
|
-
. "$root/scripts/core/common.sh"
|
|
6
|
-
. "$root/scripts/core/upstream.sh"
|
|
7
|
-
. "$root/scripts/core/selection.sh"
|
|
8
|
-
|
|
9
|
-
[ "$#" -eq 0 ] || spw_usage_error 'usage: superpowers-manager unpin'
|
|
10
|
-
|
|
11
|
-
state_path=$(spw_selection_state_path)
|
|
12
|
-
fallback=$(SUPERPOWERS_REF= spw_config_ref "$root")
|
|
13
|
-
removed=false
|
|
14
|
-
|
|
15
|
-
if [ -L "$state_path" ]; then
|
|
16
|
-
spw_die "selection state path is not a regular file; remove it manually after inspecting: $state_path"
|
|
17
|
-
elif [ -e "$state_path" ]; then
|
|
18
|
-
if [ ! -f "$state_path" ]; then
|
|
19
|
-
spw_die "selection state path is not a regular file; remove it manually after inspecting: $state_path"
|
|
20
|
-
fi
|
|
21
|
-
if ! rm -f "$state_path"; then
|
|
22
|
-
spw_die "cannot remove selection state: $state_path"
|
|
23
|
-
fi
|
|
24
|
-
removed=true
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
if [ -e "$state_path" ] || [ -L "$state_path" ]; then
|
|
28
|
-
spw_die "selection state remains after removal attempt: $state_path"
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
if [ "$removed" = true ]; then
|
|
32
|
-
printf 'removed saved upstream selection; packaged fallback is %s\n' "$fallback"
|
|
33
|
-
else
|
|
34
|
-
printf 'no saved upstream selection; packaged fallback is %s\n' "$fallback"
|
|
35
|
-
fi
|
|
36
|
-
if [ -n "${SUPERPOWERS_REF:-}" ]; then
|
|
37
|
-
printf '%s\n' 'note: active SUPERPOWERS_REF override remains effective'
|
|
38
|
-
fi
|
|
39
|
-
if [ -n "${SUPERPOWERS_UPSTREAM_URL:-}" ]; then
|
|
40
|
-
printf '%s\n' 'note: active SUPERPOWERS_UPSTREAM_URL override remains effective'
|
|
41
|
-
fi
|
package/scripts/update
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
set -eu
|
|
3
|
-
|
|
4
|
-
root=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
|
|
5
|
-
. "$root/scripts/core/common.sh"
|
|
6
|
-
. "$root/scripts/core/lifecycle.sh"
|
|
7
|
-
|
|
8
|
-
probe_output=$(sh "$root/scripts/probe" --porcelain)
|
|
9
|
-
identity_state=$(spw_probe_field "$probe_output" identity_state)
|
|
10
|
-
[ -n "$identity_state" ] || spw_die "probe did not report adapter identity state"
|
|
11
|
-
spw_require_no_legacy_state "$identity_state"
|
|
12
|
-
status=$(spw_probe_field "$probe_output" status)
|
|
13
|
-
update_control=$(spw_probe_field "$probe_output" update_control)
|
|
14
|
-
[ -n "$update_control" ] || spw_die "probe did not report adapter update-control capability"
|
|
15
|
-
|
|
16
|
-
case "$status" in
|
|
17
|
-
current)
|
|
18
|
-
spw_require_managed_update_control "$update_control"
|
|
19
|
-
printf '%s\n' "$probe_output"
|
|
20
|
-
echo "manager is current"
|
|
21
|
-
;;
|
|
22
|
-
needs\ prepare)
|
|
23
|
-
sh "$root/scripts/prepare"
|
|
24
|
-
sh "$root/scripts/install"
|
|
25
|
-
;;
|
|
26
|
-
needs\ install)
|
|
27
|
-
sh "$root/scripts/install"
|
|
28
|
-
;;
|
|
29
|
-
*)
|
|
30
|
-
echo "$probe_output"
|
|
31
|
-
echo "error: unknown probe status: $status" >&2
|
|
32
|
-
exit 1
|
|
33
|
-
;;
|
|
34
|
-
esac
|