sideby 0.0.0-stage → 0.2.1

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 (154) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +111 -2
  3. package/README.zh-CN.md +112 -0
  4. package/dist/build.json +1 -0
  5. package/dist/src/cli/args.d.ts +13 -0
  6. package/dist/src/cli/args.js +38 -0
  7. package/dist/src/cli/commands.d.ts +50 -0
  8. package/dist/src/cli/commands.js +566 -0
  9. package/dist/src/cli/format.d.ts +16 -0
  10. package/dist/src/cli/format.js +80 -0
  11. package/dist/src/cli/json-schemas.d.ts +2 -0
  12. package/dist/src/cli/json-schemas.js +259 -0
  13. package/dist/src/cli/main.d.ts +2 -0
  14. package/dist/src/cli/main.js +276 -0
  15. package/dist/src/cli/schemas.d.ts +1 -0
  16. package/dist/src/cli/schemas.js +16 -0
  17. package/dist/src/core/account-name.d.ts +2 -0
  18. package/dist/src/core/account-name.js +2 -0
  19. package/dist/src/core/accounts.d.ts +20 -0
  20. package/dist/src/core/accounts.js +131 -0
  21. package/dist/src/core/config.d.ts +61 -0
  22. package/dist/src/core/config.js +184 -0
  23. package/dist/src/core/create.d.ts +30 -0
  24. package/dist/src/core/create.js +126 -0
  25. package/dist/src/core/doctor.d.ts +41 -0
  26. package/dist/src/core/doctor.js +171 -0
  27. package/dist/src/core/errors.d.ts +12 -0
  28. package/dist/src/core/errors.js +14 -0
  29. package/dist/src/core/file-memo.d.ts +24 -0
  30. package/dist/src/core/file-memo.js +41 -0
  31. package/dist/src/core/fs-safe.d.ts +38 -0
  32. package/dist/src/core/fs-safe.js +205 -0
  33. package/dist/src/core/handoff.d.ts +41 -0
  34. package/dist/src/core/handoff.js +54 -0
  35. package/dist/src/core/identity.d.ts +23 -0
  36. package/dist/src/core/identity.js +79 -0
  37. package/dist/src/core/last-doctor.d.ts +36 -0
  38. package/dist/src/core/last-doctor.js +69 -0
  39. package/dist/src/core/launch.d.ts +37 -0
  40. package/dist/src/core/launch.js +108 -0
  41. package/dist/src/core/login-path.d.ts +23 -0
  42. package/dist/src/core/login-path.js +96 -0
  43. package/dist/src/core/paths.d.ts +13 -0
  44. package/dist/src/core/paths.js +32 -0
  45. package/dist/src/core/quota-levels.d.ts +19 -0
  46. package/dist/src/core/quota-levels.js +34 -0
  47. package/dist/src/core/resume.d.ts +9 -0
  48. package/dist/src/core/resume.js +15 -0
  49. package/dist/src/core/secret-file.d.ts +30 -0
  50. package/dist/src/core/secret-file.js +116 -0
  51. package/dist/src/core/share-meaning.d.ts +6 -0
  52. package/dist/src/core/share-meaning.js +32 -0
  53. package/dist/src/core/share-mode-names.d.ts +1 -0
  54. package/dist/src/core/share-mode-names.js +10 -0
  55. package/dist/src/core/share-modes.d.ts +24 -0
  56. package/dist/src/core/share-modes.js +405 -0
  57. package/dist/src/core/shell-init.d.ts +31 -0
  58. package/dist/src/core/shell-init.js +84 -0
  59. package/dist/src/core/skill-check.d.ts +11 -0
  60. package/dist/src/core/skill-check.js +57 -0
  61. package/dist/src/core/usage-days.d.ts +15 -0
  62. package/dist/src/core/usage-days.js +33 -0
  63. package/dist/src/core/version.d.ts +9 -0
  64. package/dist/src/core/version.js +46 -0
  65. package/dist/src/desktop/app.d.ts +60 -0
  66. package/dist/src/desktop/app.js +316 -0
  67. package/dist/src/desktop/icon.d.ts +16 -0
  68. package/dist/src/desktop/icon.js +174 -0
  69. package/dist/src/families/claude/index.d.ts +10 -0
  70. package/dist/src/families/claude/index.js +127 -0
  71. package/dist/src/families/claude/layout.d.ts +6 -0
  72. package/dist/src/families/claude/layout.js +5 -0
  73. package/dist/src/families/claude/quota-cache.d.ts +31 -0
  74. package/dist/src/families/claude/quota-cache.js +111 -0
  75. package/dist/src/families/claude/quota.d.ts +3 -0
  76. package/dist/src/families/claude/quota.js +53 -0
  77. package/dist/src/families/claude/usage.d.ts +22 -0
  78. package/dist/src/families/claude/usage.js +146 -0
  79. package/dist/src/families/codex/index.d.ts +5 -0
  80. package/dist/src/families/codex/index.js +70 -0
  81. package/dist/src/families/codex/rollout.d.ts +67 -0
  82. package/dist/src/families/codex/rollout.js +298 -0
  83. package/dist/src/families/grok/index.d.ts +8 -0
  84. package/dist/src/families/grok/index.js +82 -0
  85. package/dist/src/families/index.d.ts +3 -0
  86. package/dist/src/families/index.js +40 -0
  87. package/dist/src/families/logos.d.ts +21 -0
  88. package/dist/src/families/logos.js +26 -0
  89. package/dist/src/families/pi/index.d.ts +3 -0
  90. package/dist/src/families/pi/index.js +54 -0
  91. package/dist/src/families/shared/sessions.d.ts +9 -0
  92. package/dist/src/families/shared/sessions.js +70 -0
  93. package/dist/src/families/shared/toml.d.ts +5 -0
  94. package/dist/src/families/shared/toml.js +16 -0
  95. package/dist/src/index.d.ts +5 -0
  96. package/dist/src/index.js +4 -0
  97. package/dist/src/panel/background.d.ts +62 -0
  98. package/dist/src/panel/background.js +274 -0
  99. package/dist/src/panel/handler.d.ts +91 -0
  100. package/dist/src/panel/handler.js +396 -0
  101. package/dist/src/panel/i18n.d.ts +287 -0
  102. package/dist/src/panel/i18n.js +570 -0
  103. package/dist/src/panel/page-logic.d.ts +154 -0
  104. package/dist/src/panel/page-logic.js +326 -0
  105. package/dist/src/panel/page-script.d.ts +2 -0
  106. package/dist/src/panel/page-script.js +1633 -0
  107. package/dist/src/panel/page-styles.d.ts +7 -0
  108. package/dist/src/panel/page-styles.js +514 -0
  109. package/dist/src/panel/page.d.ts +20 -0
  110. package/dist/src/panel/page.js +96 -0
  111. package/dist/src/panel/server.d.ts +32 -0
  112. package/dist/src/panel/server.js +133 -0
  113. package/dist/src/panel/theme.d.ts +116 -0
  114. package/dist/src/panel/theme.js +132 -0
  115. package/dist/src/plugins/account-script.d.ts +4 -0
  116. package/dist/src/plugins/account-script.js +66 -0
  117. package/dist/src/plugins/bus.d.ts +33 -0
  118. package/dist/src/plugins/bus.js +84 -0
  119. package/dist/src/plugins/loader.d.ts +58 -0
  120. package/dist/src/plugins/loader.js +250 -0
  121. package/dist/src/quota/claude-statusline.d.ts +28 -0
  122. package/dist/src/quota/claude-statusline.js +301 -0
  123. package/dist/src/quota/statusline-tap.d.ts +11 -0
  124. package/dist/src/quota/statusline-tap.js +104 -0
  125. package/dist/src/runtime.d.ts +195 -0
  126. package/dist/src/runtime.js +424 -0
  127. package/dist/src/types.d.ts +285 -0
  128. package/dist/src/types.js +3 -0
  129. package/dist/testing/demo.d.ts +8 -0
  130. package/dist/testing/demo.js +50 -0
  131. package/dist/testing/index.d.ts +36 -0
  132. package/dist/testing/index.js +118 -0
  133. package/package.json +66 -4
  134. package/schemas/alias.json +102 -0
  135. package/schemas/app-install.json +74 -0
  136. package/schemas/app-uninstall.json +54 -0
  137. package/schemas/config.json +170 -0
  138. package/schemas/doctor.json +229 -0
  139. package/schemas/error.json +25 -0
  140. package/schemas/families.json +205 -0
  141. package/schemas/list.json +177 -0
  142. package/schemas/new.json +199 -0
  143. package/schemas/next.json +127 -0
  144. package/schemas/plugins.json +74 -0
  145. package/schemas/quota-setup.json +60 -0
  146. package/schemas/quota-teardown.json +30 -0
  147. package/schemas/quota.json +203 -0
  148. package/skills/sideby/SKILL.md +61 -0
  149. package/skills/sideby/references/accounts.md +31 -0
  150. package/skills/sideby/references/diagnose.md +47 -0
  151. package/skills/sideby/references/handoff.md +41 -0
  152. package/skills/sideby/references/quota.md +14 -0
  153. package/skills/sideby/references/setup.md +31 -0
  154. package/skills/sideby/references/sharing.md +17 -0
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/app-install.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "platform",
8
+ "path",
9
+ "files",
10
+ "mode",
11
+ "node",
12
+ "entry",
13
+ "updated",
14
+ "hints"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "type": "number",
19
+ "const": 1
20
+ },
21
+ "platform": {
22
+ "anyOf": [
23
+ {
24
+ "type": "string",
25
+ "const": "darwin"
26
+ },
27
+ {
28
+ "type": "string",
29
+ "const": "linux"
30
+ }
31
+ ]
32
+ },
33
+ "path": {
34
+ "type": "string"
35
+ },
36
+ "files": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "mode": {
43
+ "anyOf": [
44
+ {
45
+ "type": "string",
46
+ "const": "panel"
47
+ },
48
+ {
49
+ "type": "string",
50
+ "const": "url"
51
+ }
52
+ ]
53
+ },
54
+ "url": {
55
+ "type": "string"
56
+ },
57
+ "node": {
58
+ "type": "string"
59
+ },
60
+ "entry": {
61
+ "type": "string"
62
+ },
63
+ "updated": {
64
+ "type": "boolean"
65
+ },
66
+ "hints": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ }
71
+ }
72
+ },
73
+ "title": "sideby app install --json"
74
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/app-uninstall.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "platform",
8
+ "removed",
9
+ "skipped"
10
+ ],
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "type": "number",
14
+ "const": 1
15
+ },
16
+ "platform": {
17
+ "anyOf": [
18
+ {
19
+ "type": "string",
20
+ "const": "darwin"
21
+ },
22
+ {
23
+ "type": "string",
24
+ "const": "linux"
25
+ }
26
+ ]
27
+ },
28
+ "removed": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "skipped": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "object",
38
+ "required": [
39
+ "path",
40
+ "reason"
41
+ ],
42
+ "properties": {
43
+ "path": {
44
+ "type": "string"
45
+ },
46
+ "reason": {
47
+ "type": "string"
48
+ }
49
+ }
50
+ }
51
+ }
52
+ },
53
+ "title": "sideby app uninstall --json"
54
+ }
@@ -0,0 +1,170 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/config.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "$schema": {
7
+ "type": "string"
8
+ },
9
+ "accounts": {
10
+ "type": "object",
11
+ "patternProperties": {
12
+ "^.*$": {
13
+ "type": "object",
14
+ "properties": {
15
+ "args": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string"
19
+ }
20
+ }
21
+ },
22
+ "additionalProperties": false
23
+ }
24
+ },
25
+ "description": "Per-Account settings keyed by `<family>:<name>`."
26
+ },
27
+ "aliases": {
28
+ "type": "object",
29
+ "patternProperties": {
30
+ "^[A-Za-z_][A-Za-z0-9_-]*$": {
31
+ "anyOf": [
32
+ {
33
+ "type": "string"
34
+ },
35
+ {
36
+ "type": "object",
37
+ "required": [
38
+ "account"
39
+ ],
40
+ "properties": {
41
+ "account": {
42
+ "type": "string",
43
+ "pattern": "^[^:]+:.+$",
44
+ "description": "The Account ref, `<family>:<name>`."
45
+ },
46
+ "args": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "string"
50
+ },
51
+ "description": "Host arguments `sideby run <alias>` adds after the Account `args`, before the user’s."
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ }
56
+ ]
57
+ }
58
+ },
59
+ "description": "Short shell function names created by `sideby shell-init`, mapped to an Account ref or to `{ account, args }`."
60
+ },
61
+ "ignore": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "string"
65
+ },
66
+ "description": "Account refs that are not Accounts."
67
+ },
68
+ "pluginDirs": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "string"
72
+ },
73
+ "description": "Absolute or `~/` paths of Plugin directories."
74
+ },
75
+ "plugins": {
76
+ "type": "object",
77
+ "patternProperties": {
78
+ "^.*$": {
79
+ "type": "object",
80
+ "patternProperties": {
81
+ "^.*$": {}
82
+ }
83
+ }
84
+ },
85
+ "description": "Per-Plugin settings; `enabled: false` turns a Plugin off."
86
+ },
87
+ "extraSharedItems": {
88
+ "type": "object",
89
+ "patternProperties": {
90
+ "^.*$": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "object",
94
+ "required": [
95
+ "path",
96
+ "mode"
97
+ ],
98
+ "properties": {
99
+ "path": {
100
+ "type": "string",
101
+ "minLength": 1,
102
+ "pattern": "^(?!/)(?!.*(^|/)\\.\\.(/|$)).+$"
103
+ },
104
+ "mode": {
105
+ "anyOf": [
106
+ {
107
+ "type": "string",
108
+ "const": "link"
109
+ },
110
+ {
111
+ "type": "string",
112
+ "const": "copy"
113
+ },
114
+ {
115
+ "type": "string",
116
+ "const": "link-or-copy"
117
+ },
118
+ {
119
+ "type": "string",
120
+ "const": "link-or-local"
121
+ },
122
+ {
123
+ "type": "string",
124
+ "const": "local"
125
+ },
126
+ {
127
+ "type": "string",
128
+ "const": "local-if-api"
129
+ },
130
+ {
131
+ "type": "string",
132
+ "const": "info"
133
+ }
134
+ ]
135
+ },
136
+ "noSymlink": {
137
+ "type": "boolean"
138
+ },
139
+ "credential": {
140
+ "type": "boolean"
141
+ }
142
+ },
143
+ "additionalProperties": false
144
+ }
145
+ }
146
+ }
147
+ },
148
+ "resumeRouting": {
149
+ "type": "boolean",
150
+ "description": "Make `sideby shell-init` also define Host-named functions (`claude`, `codex`, `grok`) that resume a session by id in the Account that holds it. Off by default."
151
+ },
152
+ "shellInitFile": {
153
+ "type": "object",
154
+ "properties": {
155
+ "zsh": {
156
+ "type": "string",
157
+ "minLength": 1
158
+ },
159
+ "bash": {
160
+ "type": "string",
161
+ "minLength": 1
162
+ }
163
+ },
164
+ "additionalProperties": false,
165
+ "description": "Absolute or `~/` paths of files sideby rewrites with the `sideby shell-init <shell>` output whenever it adds an Account or an alias; source the file from your shell rc."
166
+ }
167
+ },
168
+ "additionalProperties": false,
169
+ "title": "sideby config"
170
+ }
@@ -0,0 +1,229 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/doctor.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "status",
8
+ "accounts",
9
+ "general",
10
+ "fixes"
11
+ ],
12
+ "properties": {
13
+ "schemaVersion": {
14
+ "type": "number",
15
+ "const": 1
16
+ },
17
+ "status": {
18
+ "anyOf": [
19
+ {
20
+ "type": "string",
21
+ "const": "ok"
22
+ },
23
+ {
24
+ "type": "string",
25
+ "const": "issues"
26
+ }
27
+ ]
28
+ },
29
+ "accounts": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "object",
33
+ "required": [
34
+ "ref",
35
+ "family",
36
+ "name",
37
+ "kind",
38
+ "dir",
39
+ "shared",
40
+ "backups",
41
+ "findings"
42
+ ],
43
+ "properties": {
44
+ "ref": {
45
+ "type": "string"
46
+ },
47
+ "family": {
48
+ "type": "string"
49
+ },
50
+ "name": {
51
+ "type": "string"
52
+ },
53
+ "kind": {
54
+ "anyOf": [
55
+ {
56
+ "type": "string",
57
+ "const": "subscription"
58
+ },
59
+ {
60
+ "type": "string",
61
+ "const": "api"
62
+ }
63
+ ]
64
+ },
65
+ "dir": {
66
+ "type": "string"
67
+ },
68
+ "shared": {
69
+ "type": "object",
70
+ "required": [
71
+ "ok",
72
+ "total"
73
+ ],
74
+ "properties": {
75
+ "ok": {
76
+ "type": "number"
77
+ },
78
+ "total": {
79
+ "type": "number"
80
+ }
81
+ }
82
+ },
83
+ "backups": {
84
+ "type": "number"
85
+ },
86
+ "findings": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "object",
90
+ "required": [
91
+ "level",
92
+ "account",
93
+ "item",
94
+ "code",
95
+ "message",
96
+ "source",
97
+ "fixable"
98
+ ],
99
+ "properties": {
100
+ "level": {
101
+ "anyOf": [
102
+ {
103
+ "type": "string",
104
+ "const": "ok"
105
+ },
106
+ {
107
+ "type": "string",
108
+ "const": "warn"
109
+ },
110
+ {
111
+ "type": "string",
112
+ "const": "fail"
113
+ }
114
+ ]
115
+ },
116
+ "account": {
117
+ "type": "string"
118
+ },
119
+ "item": {
120
+ "type": "string"
121
+ },
122
+ "code": {
123
+ "type": "string"
124
+ },
125
+ "message": {
126
+ "type": "string"
127
+ },
128
+ "hint": {
129
+ "type": "string"
130
+ },
131
+ "source": {
132
+ "type": "string"
133
+ },
134
+ "fixable": {
135
+ "type": "boolean"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "general": {
144
+ "type": "array",
145
+ "items": {
146
+ "type": "object",
147
+ "required": [
148
+ "level",
149
+ "account",
150
+ "item",
151
+ "code",
152
+ "message",
153
+ "source",
154
+ "fixable"
155
+ ],
156
+ "properties": {
157
+ "level": {
158
+ "anyOf": [
159
+ {
160
+ "type": "string",
161
+ "const": "ok"
162
+ },
163
+ {
164
+ "type": "string",
165
+ "const": "warn"
166
+ },
167
+ {
168
+ "type": "string",
169
+ "const": "fail"
170
+ }
171
+ ]
172
+ },
173
+ "account": {
174
+ "type": "string"
175
+ },
176
+ "item": {
177
+ "type": "string"
178
+ },
179
+ "code": {
180
+ "type": "string"
181
+ },
182
+ "message": {
183
+ "type": "string"
184
+ },
185
+ "hint": {
186
+ "type": "string"
187
+ },
188
+ "source": {
189
+ "type": "string"
190
+ },
191
+ "fixable": {
192
+ "type": "boolean"
193
+ }
194
+ }
195
+ }
196
+ },
197
+ "fixes": {
198
+ "type": "array",
199
+ "items": {
200
+ "type": "object",
201
+ "required": [
202
+ "account",
203
+ "item",
204
+ "code",
205
+ "ok",
206
+ "message"
207
+ ],
208
+ "properties": {
209
+ "account": {
210
+ "type": "string"
211
+ },
212
+ "item": {
213
+ "type": "string"
214
+ },
215
+ "code": {
216
+ "type": "string"
217
+ },
218
+ "ok": {
219
+ "type": "boolean"
220
+ },
221
+ "message": {
222
+ "type": "string"
223
+ }
224
+ }
225
+ }
226
+ }
227
+ },
228
+ "title": "sideby doctor --json"
229
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/error.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "error",
8
+ "code"
9
+ ],
10
+ "properties": {
11
+ "schemaVersion": {
12
+ "type": "number",
13
+ "const": 1
14
+ },
15
+ "error": {
16
+ "type": "string",
17
+ "description": "What went wrong and what to do next."
18
+ },
19
+ "code": {
20
+ "type": "string",
21
+ "description": "`usage` for a malformed command line (exit 2), a reason such as `no-quota-source` or `alias-invalid`, or `error`."
22
+ }
23
+ },
24
+ "title": "sideby error --json"
25
+ }