noonsight 0.0.0-stage → 0.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/.claude-plugin/marketplace.json +19 -0
- package/.claude-plugin/plugin.json +14 -0
- package/LICENSE +21 -0
- package/README.md +281 -2
- package/dist/src/adapters/claude-code/classifier.js +138 -0
- package/dist/src/adapters/claude-code/code-edit.js +108 -0
- package/dist/src/adapters/claude-code/compat.js +31 -0
- package/dist/src/adapters/claude-code/definitions.js +347 -0
- package/dist/src/adapters/claude-code/fork.js +132 -0
- package/dist/src/adapters/claude-code/hook.js +652 -0
- package/dist/src/adapters/claude-code/install.js +186 -0
- package/dist/src/adapters/claude-code/launch.js +270 -0
- package/dist/src/adapters/claude-code/launcher.js +252 -0
- package/dist/src/adapters/claude-code/locations.js +115 -0
- package/dist/src/adapters/claude-code/managed.js +75 -0
- package/dist/src/adapters/claude-code/plugin-files.js +88 -0
- package/dist/src/adapters/claude-code/plugins.js +117 -0
- package/dist/src/adapters/claude-code/pointer.js +48 -0
- package/dist/src/adapters/claude-code/predict.js +271 -0
- package/dist/src/adapters/claude-code/routing.js +88 -0
- package/dist/src/adapters/claude-code/settings.js +189 -0
- package/dist/src/adapters/claude-code/subagents.js +666 -0
- package/dist/src/adapters/claude-code/triggers.js +88 -0
- package/dist/src/cli.js +157 -0
- package/dist/src/commands/accept.js +115 -0
- package/dist/src/commands/check.js +529 -0
- package/dist/src/commands/hook.js +73 -0
- package/dist/src/commands/init.js +29 -0
- package/dist/src/commands/install.js +370 -0
- package/dist/src/commands/models.js +213 -0
- package/dist/src/commands/receives.js +84 -0
- package/dist/src/commands/report.js +386 -0
- package/dist/src/commands/resolve.js +32 -0
- package/dist/src/commands/run.js +168 -0
- package/dist/src/commands/trust.js +70 -0
- package/dist/src/commands/usage.js +10 -0
- package/dist/src/commands/watch.js +154 -0
- package/dist/src/config/create.js +51 -0
- package/dist/src/config/json-schema.js +207 -0
- package/dist/src/config/load.js +758 -0
- package/dist/src/config/paths.js +42 -0
- package/dist/src/config/preset-changes.js +190 -0
- package/dist/src/config/project.js +354 -0
- package/dist/src/config/rewrite.js +112 -0
- package/dist/src/core/backtracking.js +330 -0
- package/dist/src/core/classify.js +66 -0
- package/dist/src/core/normalize.js +24 -0
- package/dist/src/core/overlap.js +39 -0
- package/dist/src/core/regex-sample.js +278 -0
- package/dist/src/core/resolve.js +201 -0
- package/dist/src/core/route.js +93 -0
- package/dist/src/core/scope.js +77 -0
- package/dist/src/core/triggers.js +30 -0
- package/dist/src/core/types.js +74 -0
- package/dist/src/state/agents.js +200 -0
- package/dist/src/state/claims.js +80 -0
- package/dist/src/state/files.js +84 -0
- package/dist/src/state/installs.js +29 -0
- package/dist/src/state/log.js +90 -0
- package/dist/src/state/node.js +35 -0
- package/dist/src/state/sessions.js +109 -0
- package/dist/src/state/triggers.js +57 -0
- package/dist/src/version.js +24 -0
- package/dist/src/watch/service.js +172 -0
- package/dist/src/watch/watcher.js +130 -0
- package/dist/src/wording.js +11 -0
- package/hooks/hooks.json +118 -0
- package/package.json +60 -4
- package/presets/claude/SOURCES.md +485 -0
- package/presets/claude/preset.json +432 -0
- package/presets/claude/rules/fable-5-2/code-ownership.md +1 -0
- package/presets/claude/rules/fable-5-2/finish-work.md +1 -0
- package/presets/claude/rules/fable-5-2/low-context-report.md +1 -0
- package/presets/claude/rules/fable-5-2/progress-updates.md +1 -0
- package/presets/claude/rules/haiku-5-5/carry-through.md +1 -0
- package/presets/claude/rules/haiku-5-5/search-recent-facts.md +1 -0
- package/presets/claude/rules/haiku-5-5/verify-changes.md +1 -0
- package/presets/claude/rules/opus-5-5/explore-before-acting.md +1 -0
- package/presets/claude/rules/opus-5-5/progress-updates.md +1 -0
- package/presets/claude/rules/opus-5-5/unattended-run.md +1 -0
- package/presets/claude/rules/sonnet-5-5/carry-through.md +1 -0
- package/presets/claude/rules/sonnet-5-5/check-current-facts.md +1 -0
- package/presets/claude/rules/sonnet-5-5/ideas-first.md +1 -0
- package/presets/claude/rules/sonnet-5-5/no-self-review-rounds.md +1 -0
- package/presets/claude/rules/sonnet-5-5/stay-in-scope.md +1 -0
- package/presets/claude/rules/sonnet-5-5/verify-changes.md +1 -0
- package/presets/claude/versions/1.3.0/preset.json +432 -0
- package/presets/claude/versions/1.3.0/rules/fable-5-2/code-ownership.md +1 -0
- package/presets/claude/versions/1.3.0/rules/fable-5-2/finish-work.md +1 -0
- package/presets/claude/versions/1.3.0/rules/fable-5-2/low-context-report.md +1 -0
- package/presets/claude/versions/1.3.0/rules/fable-5-2/progress-updates.md +1 -0
- package/presets/claude/versions/1.3.0/rules/haiku-5-5/carry-through.md +1 -0
- package/presets/claude/versions/1.3.0/rules/haiku-5-5/search-recent-facts.md +1 -0
- package/presets/claude/versions/1.3.0/rules/haiku-5-5/verify-changes.md +1 -0
- package/presets/claude/versions/1.3.0/rules/opus-5-5/explore-before-acting.md +1 -0
- package/presets/claude/versions/1.3.0/rules/opus-5-5/progress-updates.md +1 -0
- package/presets/claude/versions/1.3.0/rules/opus-5-5/unattended-run.md +1 -0
- package/presets/claude/versions/1.3.0/rules/sonnet-5-5/carry-through.md +1 -0
- package/presets/claude/versions/1.3.0/rules/sonnet-5-5/check-current-facts.md +1 -0
- package/presets/claude/versions/1.3.0/rules/sonnet-5-5/ideas-first.md +1 -0
- package/presets/claude/versions/1.3.0/rules/sonnet-5-5/no-self-review-rounds.md +1 -0
- package/presets/claude/versions/1.3.0/rules/sonnet-5-5/stay-in-scope.md +1 -0
- package/presets/claude/versions/1.3.0/rules/sonnet-5-5/verify-changes.md +1 -0
- package/schema/noonsight-project.schema.json +394 -0
- package/schema/noonsight.schema.json +425 -0
- package/schema/preset.schema.json +194 -0
- package/scripts/noonsight +68 -0
- package/skills/accept/SKILL.md +11 -0
- package/skills/check/SKILL.md +11 -0
- package/skills/models/SKILL.md +11 -0
- package/skills/report/SKILL.md +11 -0
- package/skills/resolve/SKILL.md +12 -0
- package/skills/setup/SKILL.md +15 -0
- package/skills/trust/SKILL.md +12 -0
- package/skills/untrust/SKILL.md +12 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# The launcher of noonsight's Claude Code plugin: it finds a Node.js 20 or newer and runs the copy of
|
|
3
|
+
# noonsight this plugin holds. The hooks run it as `noonsight hook <event>`, and the plugin's skills as
|
|
4
|
+
# `noonsight <command>`. A Claude Code started from a desktop app may have no `node` on its PATH, so the
|
|
5
|
+
# order is: $NOONSIGHT_NODE, the one an earlier hook recorded, PATH, then the folders Node.js is usually in.
|
|
6
|
+
# A hook never holds or fails the session: without Node.js, only the session's start says so.
|
|
7
|
+
|
|
8
|
+
if [ "$1" = hook ] && [ "${NOONSIGHT_DISABLE:-}" = 1 ]; then
|
|
9
|
+
exit 0
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) || exit 0
|
|
13
|
+
cli=$root/dist/src/cli.js
|
|
14
|
+
home=${HOME:-}
|
|
15
|
+
|
|
16
|
+
node=
|
|
17
|
+
# Node.js that ran noonsight before, or that the person named: taken without starting it to ask its version.
|
|
18
|
+
trusted() {
|
|
19
|
+
if [ -z "$node" ] && [ -n "$1" ] && [ -x "$1" ] && [ ! -d "$1" ]; then node=$1; fi
|
|
20
|
+
}
|
|
21
|
+
found() {
|
|
22
|
+
if [ -z "$node" ] && [ -n "$1" ] && [ -x "$1" ] && [ ! -d "$1" ] &&
|
|
23
|
+
"$1" -e 'process.exit(parseInt(process.versions.node, 10) >= 20 ? 0 : 1)' </dev/null >/dev/null 2>&1; then
|
|
24
|
+
node=$1
|
|
25
|
+
fi
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
trusted "${NOONSIGHT_NODE:-}"
|
|
29
|
+
if [ -z "$node" ] && [ -r "$home/.local/share/noonsight/node" ]; then
|
|
30
|
+
IFS= read -r recorded <"$home/.local/share/noonsight/node" || :
|
|
31
|
+
trusted "${recorded:-}"
|
|
32
|
+
fi
|
|
33
|
+
if [ -z "$node" ]; then
|
|
34
|
+
found "$(command -v node 2>/dev/null || :)"
|
|
35
|
+
for dir in /opt/homebrew/bin /usr/local/bin /usr/bin "$home/.local/bin" "$home/.volta/bin" /snap/bin; do
|
|
36
|
+
found "$dir/node"
|
|
37
|
+
done
|
|
38
|
+
for dir in \
|
|
39
|
+
"$home/.nvm/versions/node"/*/bin \
|
|
40
|
+
"$home/.asdf/installs/nodejs"/*/bin \
|
|
41
|
+
"$home/.local/share/mise/installs/node"/*/bin \
|
|
42
|
+
"$home/.local/share/fnm/node-versions"/*/installation/bin \
|
|
43
|
+
"$home/Library/Application Support/fnm/node-versions"/*/installation/bin \
|
|
44
|
+
"$home/.nodenv/versions"/*/bin; do
|
|
45
|
+
found "$dir/node"
|
|
46
|
+
done
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
if [ -z "$node" ]; then
|
|
50
|
+
if [ "$1" != hook ]; then
|
|
51
|
+
echo 'noonsight: no Node.js 20 or newer was found. Install it, or set NOONSIGHT_NODE to its path in "env" of the Claude Code settings.' >&2
|
|
52
|
+
exit 1
|
|
53
|
+
fi
|
|
54
|
+
if [ "${2:-}" = session-start ]; then
|
|
55
|
+
printf '%s\n' '{"systemMessage":"noonsight: the plugin found no Node.js 20 or newer, so it delivered no rules. Install Node.js, or set NOONSIGHT_NODE to its path in \"env\" of the Claude Code settings, then start a new session."}'
|
|
56
|
+
fi
|
|
57
|
+
exit 0
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
if [ "$1" = hook ]; then
|
|
61
|
+
shift
|
|
62
|
+
# The copy can be deleted under a running session; the session then goes on without it.
|
|
63
|
+
[ -f "$cli" ] || exit 0
|
|
64
|
+
exec "$node" "$cli" hook --install plugin "$@"
|
|
65
|
+
fi
|
|
66
|
+
CLAUDE_PLUGIN_ROOT=$root
|
|
67
|
+
export CLAUDE_PLUGIN_ROOT
|
|
68
|
+
exec "$node" "$cli" "$@"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Accept the installed preset version of noonsight: list what it changes, then record it in the configuration."
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools: "Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" accept:*)"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Show the output below to the person as it is, with nothing added.
|
|
8
|
+
|
|
9
|
+
```!
|
|
10
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" accept 2>&1 || true
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Check the noonsight configuration, what installs its hooks, and the last decision."
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools: "Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" check:*)"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Show the output below to the person as it is, with nothing added.
|
|
8
|
+
|
|
9
|
+
```!
|
|
10
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" check 2>&1 || true
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "List the models noonsight declares and their rules, with source and cost."
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools: "Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" models:*)"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Show the output below to the person as it is, with nothing added.
|
|
8
|
+
|
|
9
|
+
```!
|
|
10
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" models 2>&1 || true
|
|
11
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Report from the noonsight decision log how often each rule was delivered, and to which models, scopes and places."
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools: "Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" report:*)"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Show the output below to the person as it is, with nothing added.
|
|
8
|
+
|
|
9
|
+
```!
|
|
10
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" report 2>&1 || true
|
|
11
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Show the rules noonsight gives a model, in a scope and a place."
|
|
3
|
+
argument-hint: "<model> [scope] [place]"
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
allowed-tools: "Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" resolve:*)"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Show the output below to the person as it is, with nothing added.
|
|
9
|
+
|
|
10
|
+
```!
|
|
11
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" resolve $ARGUMENTS 2>&1 || true
|
|
12
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Write the noonsight configuration from the preset when there is none, then check everything."
|
|
3
|
+
disable-model-invocation: true
|
|
4
|
+
allowed-tools: "Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" init:*), Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" check:*)"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Show the output below to the person as it is, with nothing added.
|
|
8
|
+
|
|
9
|
+
```!
|
|
10
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" init 2>&1 || true
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```!
|
|
14
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" check 2>&1 || true
|
|
15
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Apply this project's noonsight configuration to the sessions that run in it."
|
|
3
|
+
argument-hint: "[<dir>]"
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
allowed-tools: "Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" trust:*)"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Show the output below to the person as it is, with nothing added.
|
|
9
|
+
|
|
10
|
+
```!
|
|
11
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" trust $ARGUMENTS 2>&1 || true
|
|
12
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Stop applying this project's noonsight configuration."
|
|
3
|
+
argument-hint: "[<dir>]"
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
allowed-tools: "Bash(/bin/sh \"${CLAUDE_PLUGIN_ROOT}/scripts/noonsight\" untrust:*)"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Show the output below to the person as it is, with nothing added.
|
|
9
|
+
|
|
10
|
+
```!
|
|
11
|
+
/bin/sh "${CLAUDE_PLUGIN_ROOT}/scripts/noonsight" untrust $ARGUMENTS 2>&1 || true
|
|
12
|
+
```
|