@orchbee/cli-darwin-x64 0.0.0-stage → 0.1.0-beta.14

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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +4 -2
  3. package/package.json +22 -5
  4. package/release/agent-observation-adapters/.agents/plugins/marketplace.json +12 -0
  5. package/release/agent-observation-adapters/.claude-plugin/marketplace.json +13 -0
  6. package/release/agent-observation-adapters/README.md +363 -0
  7. package/release/agent-observation-adapters/bundle/.claude-plugin/plugin.json +8 -0
  8. package/release/agent-observation-adapters/bundle/.codex-plugin/plugin.json +7 -0
  9. package/release/agent-observation-adapters/bundle/.grok-plugin/plugin.json +7 -0
  10. package/release/agent-observation-adapters/bundle/.plugin/plugin.json +7 -0
  11. package/release/agent-observation-adapters/bundle/cline/orchbee-agent-observation.js +187 -0
  12. package/release/agent-observation-adapters/bundle/gemini/gemini-extension.json +5 -0
  13. package/release/agent-observation-adapters/bundle/gemini/hooks/hooks.json +118 -0
  14. package/release/agent-observation-adapters/bundle/hermes/plugin.py +40 -0
  15. package/release/agent-observation-adapters/bundle/hooks/codex.json +142 -0
  16. package/release/agent-observation-adapters/bundle/hooks/copilot.json +114 -0
  17. package/release/agent-observation-adapters/bundle/hooks/grok.json +170 -0
  18. package/release/agent-observation-adapters/bundle/hooks/hooks.json +244 -0
  19. package/release/agent-observation-adapters/bundle/kilo/orchbee-agent-observation.mjs +3 -0
  20. package/release/agent-observation-adapters/bundle/omp/orchbee-agent-observation.cjs +4 -0
  21. package/release/agent-observation-adapters/bundle/omp/orchbee-agent-observation.mjs +117 -0
  22. package/release/agent-observation-adapters/bundle/opencode/orchbee-agent-observation.mjs +13 -0
  23. package/release/agent-observation-adapters/bundle/package.json +25 -0
  24. package/release/agent-observation-adapters/bundle/pi/orchbee-agent-observation.cjs +4 -0
  25. package/release/agent-observation-adapters/bundle/pi/orchbee-agent-observation.mjs +112 -0
  26. package/release/agent-observation-adapters/bundle/qwen-code/qwen-extension.json +232 -0
  27. package/release/agent-observation-adapters/bundle/scripts/forward-hook.mjs +33 -0
  28. package/release/agent-observation-adapters/bundle/scripts/hook-sanitizers.mjs +571 -0
  29. package/release/agent-observation-adapters/bundle/scripts/observation-transport.mjs +549 -0
  30. package/release/agent-observation-adapters/bundle/scripts/opencode-family-observation.mjs +350 -0
  31. package/release/agent-observation-adapters/capsule.json +4 -0
  32. package/release/cohort.json +1 -0
  33. package/release/orchbee +4 -0
  34. package/release/orchbee-desktop-launcher +0 -0
  35. package/release/orchbee-server +0 -0
  36. package/release/orchbee-terminal-host +0 -0
  37. package/release/orchbee-worker +0 -0
  38. package/release/release.json +1 -0
  39. package/release/release.json.sig +1 -0
  40. package/release/shell-integration/bash/orchbee.bash +153 -0
  41. package/release/shell-integration/zsh/.zshenv +27 -0
  42. package/release/shell-integration/zsh/orchbee.zsh +131 -0
@@ -0,0 +1,131 @@
1
+ # Orchbee's prompt and command marks for an interactive zsh, loaded by the managed .zshenv before
2
+ # the person's other startup files. They are written with the managed PowerShell's private
3
+ # grammar, so the Terminal Host reads every managed shell alike:
4
+ # at the prompt, once the line editor has drawn it: OSC 133 P, OSC 133 B, APC ready;
5
+ # when a line is accepted: OSC 133 C, then APC start;<token> once ORCHBEE_RUN_TOKEN holds it;
6
+ # at the next prompt: OSC 133 D;<status>, APC finish;<token>;<status>, and the token unset.
7
+ # A line Orchbee submits starts with ": orchbee-run:<32 hex digits>; ". The line editor strips that
8
+ # prefix, the command runs with that token, and neither form stays in the history. The Agent start
9
+ # the launch carried runs once, before the first prompt, after every startup file and every
10
+ # earlier prompt hook. The hooks install at the first prompt, so the person's own hooks and theme
11
+ # are in place first.
12
+
13
+ __orchbee_load() {
14
+ builtin emulate -L zsh -o no_aliases
15
+ (( ! ${+__orchbee_seed} )) || return 0
16
+ builtin typeset -g __orchbee_seed __orchbee_run= __orchbee_submitted=
17
+ builtin typeset -gi __orchbee_count=0
18
+ # Run tokens are this seed, read once, and a counter, so every token is unique and nonzero.
19
+ local seed=${(L)$(command od -An -N12 -tx1 /dev/urandom 2>/dev/null)//[^0-9a-fA-F]/}
20
+ if (( ${#seed} != 24 )); then
21
+ builtin printf -v seed '%04x%04x%04x%04x%04x%04x' $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM
22
+ fi
23
+ __orchbee_seed=$seed
24
+ builtin typeset -ga precmd_functions
25
+ precmd_functions+=(__orchbee_first_prompt)
26
+ }
27
+
28
+ __orchbee_mint() {
29
+ (( ++__orchbee_count ))
30
+ builtin printf -v REPLY '%s%08x' $__orchbee_seed $__orchbee_count
31
+ }
32
+
33
+ # Runs once, in the first prompt's hooks. It installs the marks, then runs the Agent start, if any,
34
+ # in the person's own options, as a line they had typed would run. Ctrl+C ends only the Agent, as
35
+ # it would end a typed line: the start still finishes and the prompt's other hooks still run.
36
+ __orchbee_first_prompt() {
37
+ __orchbee_install
38
+ [[ -n ${__orchbee_start-} ]] || return 0
39
+ __orchbee_begin_start
40
+ {
41
+ builtin eval "$__orchbee_line"
42
+ } always {
43
+ __orchbee_end_start $?
44
+ TRY_BLOCK_INTERRUPT=0
45
+ }
46
+ }
47
+
48
+ __orchbee_install() {
49
+ builtin emulate -L zsh -o no_aliases
50
+ precmd_functions=(__orchbee_precmd ${precmd_functions:#__orchbee_first_prompt})
51
+ builtin typeset -ga preexec_functions zshaddhistory_functions
52
+ preexec_functions+=(__orchbee_preexec)
53
+ zshaddhistory_functions+=(__orchbee_history)
54
+ # zsh 5.3 and later chain line editor hooks; without it, the prompt carries no marks and
55
+ # submitted lines keep their prefix, which preexec still reads.
56
+ if builtin autoload -Uz add-zle-hook-widget 2>/dev/null; then
57
+ builtin zle -N __orchbee_line_init
58
+ builtin zle -N __orchbee_line_finish
59
+ add-zle-hook-widget line-init __orchbee_line_init
60
+ add-zle-hook-widget line-finish __orchbee_line_finish
61
+ fi
62
+ }
63
+
64
+ __orchbee_begin_start() {
65
+ builtin emulate -L zsh -o no_aliases
66
+ builtin typeset -g __orchbee_line=$__orchbee_start
67
+ builtin unset __orchbee_start
68
+ local REPLY
69
+ __orchbee_mint
70
+ __orchbee_run=$REPLY
71
+ builtin export ORCHBEE_RUN_TOKEN=$REPLY
72
+ builtin print -rn -- $'\e_orchbee.command.v1;start;'$REPLY$'\e\\'
73
+ }
74
+
75
+ __orchbee_end_start() {
76
+ builtin emulate -L zsh -o no_aliases
77
+ builtin unset __orchbee_line ORCHBEE_RUN_TOKEN
78
+ builtin print -rn -- $'\e_orchbee.command.v1;finish;'$__orchbee_run';'$1$'\e\\'
79
+ __orchbee_run=
80
+ }
81
+
82
+ __orchbee_precmd() {
83
+ local -i code=$?
84
+ builtin emulate -L zsh -o no_aliases
85
+ __orchbee_submitted=
86
+ [[ -n $__orchbee_run ]] || return 0
87
+ builtin print -rn -- $'\e]133;D;'$code$'\a\e_orchbee.command.v1;finish;'$__orchbee_run';'$code$'\e\\'
88
+ __orchbee_run=
89
+ builtin unset ORCHBEE_RUN_TOKEN
90
+ }
91
+
92
+ __orchbee_preexec() {
93
+ builtin emulate -L zsh -o no_aliases
94
+ local REPLY=$__orchbee_submitted
95
+ __orchbee_submitted=
96
+ if [[ -z $REPLY ]] && __orchbee_prefix $1; then
97
+ REPLY=${1[15,46]}
98
+ fi
99
+ [[ -n $REPLY ]] || __orchbee_mint
100
+ __orchbee_run=$REPLY
101
+ builtin export ORCHBEE_RUN_TOKEN=$REPLY
102
+ builtin print -rn -- $'\e]133;C\a\e_orchbee.command.v1;start;'$REPLY$'\e\\'
103
+ }
104
+
105
+ # Whether $1 starts with a submitted line's prefix.
106
+ __orchbee_prefix() {
107
+ builtin emulate -L zsh
108
+ local id=${1[15,46]}
109
+ [[ ${1[1,14]} == ': orchbee-run:' && ${#id} -eq 32 && $id != *[^0-9a-f]* && ${1[47,48]} == '; ' ]]
110
+ }
111
+
112
+ __orchbee_history() {
113
+ builtin emulate -L zsh
114
+ [[ -z $__orchbee_submitted ]] && ! __orchbee_prefix $1
115
+ }
116
+
117
+ __orchbee_line_init() {
118
+ builtin emulate -L zsh
119
+ [[ $CONTEXT == start ]] || return 0
120
+ builtin print -rn -- $'\e]133;P\a\e]133;B\a\e_orchbee.command.v1;ready\e\\'
121
+ }
122
+
123
+ __orchbee_line_finish() {
124
+ builtin emulate -L zsh
125
+ [[ $CONTEXT == start ]] && __orchbee_prefix $BUFFER || return 0
126
+ __orchbee_submitted=${BUFFER[15,46]}
127
+ BUFFER=${BUFFER[49,-1]}
128
+ }
129
+
130
+ __orchbee_load
131
+ builtin unfunction __orchbee_load