sideby 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.
Files changed (145) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +453 -2
  3. package/README.zh-CN.md +455 -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 +37 -0
  8. package/dist/src/cli/commands.js +487 -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 +224 -0
  13. package/dist/src/cli/main.d.ts +2 -0
  14. package/dist/src/cli/main.js +186 -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 +18 -0
  20. package/dist/src/core/accounts.js +116 -0
  21. package/dist/src/core/config.d.ts +60 -0
  22. package/dist/src/core/config.js +181 -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 +35 -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/secret-file.d.ts +30 -0
  48. package/dist/src/core/secret-file.js +116 -0
  49. package/dist/src/core/share-mode-names.d.ts +1 -0
  50. package/dist/src/core/share-mode-names.js +10 -0
  51. package/dist/src/core/share-modes.d.ts +24 -0
  52. package/dist/src/core/share-modes.js +405 -0
  53. package/dist/src/core/shell-init.d.ts +25 -0
  54. package/dist/src/core/shell-init.js +61 -0
  55. package/dist/src/core/skill-check.d.ts +11 -0
  56. package/dist/src/core/skill-check.js +57 -0
  57. package/dist/src/core/usage-days.d.ts +15 -0
  58. package/dist/src/core/usage-days.js +33 -0
  59. package/dist/src/core/version.d.ts +9 -0
  60. package/dist/src/core/version.js +46 -0
  61. package/dist/src/desktop/app.d.ts +60 -0
  62. package/dist/src/desktop/app.js +316 -0
  63. package/dist/src/desktop/icon.d.ts +16 -0
  64. package/dist/src/desktop/icon.js +174 -0
  65. package/dist/src/families/claude/index.d.ts +10 -0
  66. package/dist/src/families/claude/index.js +124 -0
  67. package/dist/src/families/claude/layout.d.ts +6 -0
  68. package/dist/src/families/claude/layout.js +5 -0
  69. package/dist/src/families/claude/quota-cache.d.ts +31 -0
  70. package/dist/src/families/claude/quota-cache.js +111 -0
  71. package/dist/src/families/claude/quota.d.ts +3 -0
  72. package/dist/src/families/claude/quota.js +53 -0
  73. package/dist/src/families/claude/usage.d.ts +22 -0
  74. package/dist/src/families/claude/usage.js +146 -0
  75. package/dist/src/families/codex/index.d.ts +5 -0
  76. package/dist/src/families/codex/index.js +67 -0
  77. package/dist/src/families/codex/rollout.d.ts +67 -0
  78. package/dist/src/families/codex/rollout.js +298 -0
  79. package/dist/src/families/grok/index.d.ts +8 -0
  80. package/dist/src/families/grok/index.js +78 -0
  81. package/dist/src/families/index.d.ts +3 -0
  82. package/dist/src/families/index.js +40 -0
  83. package/dist/src/families/logos.d.ts +21 -0
  84. package/dist/src/families/logos.js +26 -0
  85. package/dist/src/families/pi/index.d.ts +3 -0
  86. package/dist/src/families/pi/index.js +54 -0
  87. package/dist/src/families/shared/toml.d.ts +5 -0
  88. package/dist/src/families/shared/toml.js +16 -0
  89. package/dist/src/index.d.ts +5 -0
  90. package/dist/src/index.js +4 -0
  91. package/dist/src/panel/background.d.ts +62 -0
  92. package/dist/src/panel/background.js +274 -0
  93. package/dist/src/panel/handler.d.ts +93 -0
  94. package/dist/src/panel/handler.js +411 -0
  95. package/dist/src/panel/i18n.d.ts +287 -0
  96. package/dist/src/panel/i18n.js +570 -0
  97. package/dist/src/panel/page-logic.d.ts +154 -0
  98. package/dist/src/panel/page-logic.js +326 -0
  99. package/dist/src/panel/page-script.d.ts +2 -0
  100. package/dist/src/panel/page-script.js +1633 -0
  101. package/dist/src/panel/page-styles.d.ts +7 -0
  102. package/dist/src/panel/page-styles.js +514 -0
  103. package/dist/src/panel/page.d.ts +20 -0
  104. package/dist/src/panel/page.js +96 -0
  105. package/dist/src/panel/server.d.ts +32 -0
  106. package/dist/src/panel/server.js +133 -0
  107. package/dist/src/panel/theme.d.ts +116 -0
  108. package/dist/src/panel/theme.js +132 -0
  109. package/dist/src/plugins/account-script.d.ts +4 -0
  110. package/dist/src/plugins/account-script.js +66 -0
  111. package/dist/src/plugins/bus.d.ts +33 -0
  112. package/dist/src/plugins/bus.js +84 -0
  113. package/dist/src/plugins/loader.d.ts +58 -0
  114. package/dist/src/plugins/loader.js +250 -0
  115. package/dist/src/quota/claude-statusline.d.ts +28 -0
  116. package/dist/src/quota/claude-statusline.js +301 -0
  117. package/dist/src/quota/statusline-tap.d.ts +11 -0
  118. package/dist/src/quota/statusline-tap.js +104 -0
  119. package/dist/src/runtime.d.ts +149 -0
  120. package/dist/src/runtime.js +371 -0
  121. package/dist/src/types.d.ts +278 -0
  122. package/dist/src/types.js +3 -0
  123. package/dist/testing/demo.d.ts +8 -0
  124. package/dist/testing/demo.js +50 -0
  125. package/dist/testing/index.d.ts +36 -0
  126. package/dist/testing/index.js +117 -0
  127. package/package.json +66 -4
  128. package/schemas/alias.json +102 -0
  129. package/schemas/app-install.json +74 -0
  130. package/schemas/app-uninstall.json +54 -0
  131. package/schemas/config.json +166 -0
  132. package/schemas/doctor.json +229 -0
  133. package/schemas/error.json +25 -0
  134. package/schemas/list.json +177 -0
  135. package/schemas/new.json +181 -0
  136. package/schemas/next.json +127 -0
  137. package/schemas/plugins.json +74 -0
  138. package/schemas/quota-setup.json +60 -0
  139. package/schemas/quota-teardown.json +30 -0
  140. package/schemas/quota.json +203 -0
  141. package/skills/sideby/SKILL.md +52 -0
  142. package/skills/sideby/references/accounts.md +31 -0
  143. package/skills/sideby/references/diagnose.md +47 -0
  144. package/skills/sideby/references/handoff.md +41 -0
  145. package/skills/sideby/references/quota.md +14 -0
@@ -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
+ }
@@ -0,0 +1,177 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/list.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "families",
8
+ "accounts",
9
+ "pluginErrors"
10
+ ],
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "type": "number",
14
+ "const": 1
15
+ },
16
+ "families": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "required": [
21
+ "id",
22
+ "title",
23
+ "bin",
24
+ "installUrl",
25
+ "installed",
26
+ "plugin"
27
+ ],
28
+ "properties": {
29
+ "id": {
30
+ "type": "string"
31
+ },
32
+ "title": {
33
+ "type": "string"
34
+ },
35
+ "bin": {
36
+ "type": "string"
37
+ },
38
+ "installUrl": {
39
+ "type": "string"
40
+ },
41
+ "installed": {
42
+ "type": "boolean"
43
+ },
44
+ "plugin": {
45
+ "type": "string"
46
+ }
47
+ }
48
+ }
49
+ },
50
+ "accounts": {
51
+ "type": "array",
52
+ "items": {
53
+ "allOf": [
54
+ {
55
+ "type": "object",
56
+ "required": [
57
+ "family",
58
+ "name",
59
+ "ref",
60
+ "dir",
61
+ "isMain",
62
+ "kind"
63
+ ],
64
+ "properties": {
65
+ "family": {
66
+ "type": "string"
67
+ },
68
+ "name": {
69
+ "type": "string"
70
+ },
71
+ "ref": {
72
+ "type": "string"
73
+ },
74
+ "dir": {
75
+ "type": "string"
76
+ },
77
+ "isMain": {
78
+ "type": "boolean"
79
+ },
80
+ "kind": {
81
+ "anyOf": [
82
+ {
83
+ "type": "string",
84
+ "const": "subscription"
85
+ },
86
+ {
87
+ "type": "string",
88
+ "const": "api"
89
+ }
90
+ ]
91
+ },
92
+ "secretFile": {
93
+ "type": "string"
94
+ }
95
+ }
96
+ },
97
+ {
98
+ "type": "object",
99
+ "required": [
100
+ "familyTitle",
101
+ "hostInstalled",
102
+ "login"
103
+ ],
104
+ "properties": {
105
+ "familyTitle": {
106
+ "type": "string"
107
+ },
108
+ "hostInstalled": {
109
+ "type": "boolean"
110
+ },
111
+ "login": {
112
+ "anyOf": [
113
+ {
114
+ "type": "string",
115
+ "const": "logged-in"
116
+ },
117
+ {
118
+ "type": "string",
119
+ "const": "logged-out"
120
+ },
121
+ {
122
+ "type": "string",
123
+ "const": "unknown"
124
+ },
125
+ {
126
+ "type": "string",
127
+ "const": "not-needed"
128
+ }
129
+ ]
130
+ },
131
+ "model": {
132
+ "type": "string"
133
+ },
134
+ "identity": {
135
+ "type": "object",
136
+ "properties": {
137
+ "email": {
138
+ "type": "string"
139
+ },
140
+ "org": {
141
+ "type": "string"
142
+ }
143
+ },
144
+ "description": "Who the account is signed in as, from the host's login file: identity fields only, never a token (ADR-0003)."
145
+ },
146
+ "problems": {
147
+ "type": "array",
148
+ "items": {
149
+ "type": "string"
150
+ }
151
+ }
152
+ }
153
+ }
154
+ ]
155
+ }
156
+ },
157
+ "pluginErrors": {
158
+ "type": "array",
159
+ "items": {
160
+ "type": "object",
161
+ "required": [
162
+ "where",
163
+ "message"
164
+ ],
165
+ "properties": {
166
+ "where": {
167
+ "type": "string"
168
+ },
169
+ "message": {
170
+ "type": "string"
171
+ }
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "title": "sideby list --json"
177
+ }
@@ -0,0 +1,181 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/new.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "ok",
8
+ "account",
9
+ "steps",
10
+ "hookErrors",
11
+ "nextSteps"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "number",
16
+ "const": 1
17
+ },
18
+ "ok": {
19
+ "type": "boolean"
20
+ },
21
+ "account": {
22
+ "type": "object",
23
+ "required": [
24
+ "family",
25
+ "name",
26
+ "ref",
27
+ "dir",
28
+ "isMain",
29
+ "kind"
30
+ ],
31
+ "properties": {
32
+ "family": {
33
+ "type": "string"
34
+ },
35
+ "name": {
36
+ "type": "string"
37
+ },
38
+ "ref": {
39
+ "type": "string"
40
+ },
41
+ "dir": {
42
+ "type": "string"
43
+ },
44
+ "isMain": {
45
+ "type": "boolean"
46
+ },
47
+ "kind": {
48
+ "anyOf": [
49
+ {
50
+ "type": "string",
51
+ "const": "subscription"
52
+ },
53
+ {
54
+ "type": "string",
55
+ "const": "api"
56
+ }
57
+ ]
58
+ },
59
+ "secretFile": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ },
64
+ "steps": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "required": [
69
+ "item",
70
+ "action",
71
+ "ok"
72
+ ],
73
+ "properties": {
74
+ "item": {
75
+ "type": "string"
76
+ },
77
+ "action": {
78
+ "type": "string"
79
+ },
80
+ "ok": {
81
+ "type": "boolean"
82
+ },
83
+ "message": {
84
+ "type": "string"
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "hookErrors": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "object",
93
+ "required": [
94
+ "plugin",
95
+ "message"
96
+ ],
97
+ "properties": {
98
+ "plugin": {
99
+ "type": "string"
100
+ },
101
+ "message": {
102
+ "type": "string"
103
+ }
104
+ }
105
+ }
106
+ },
107
+ "nextSteps": {
108
+ "type": "array",
109
+ "items": {
110
+ "type": "string"
111
+ }
112
+ },
113
+ "alias": {
114
+ "type": "object",
115
+ "required": [
116
+ "name",
117
+ "added"
118
+ ],
119
+ "properties": {
120
+ "name": {
121
+ "type": "string"
122
+ },
123
+ "added": {
124
+ "type": "boolean"
125
+ },
126
+ "message": {
127
+ "type": "string"
128
+ }
129
+ },
130
+ "description": "The `--alias` short command; `added: false` means the Account exists without it."
131
+ },
132
+ "shellInitFiles": {
133
+ "type": "array",
134
+ "items": {
135
+ "type": "object",
136
+ "required": [
137
+ "shell",
138
+ "path",
139
+ "ok"
140
+ ],
141
+ "properties": {
142
+ "shell": {
143
+ "anyOf": [
144
+ {
145
+ "type": "string",
146
+ "const": "zsh"
147
+ },
148
+ {
149
+ "type": "string",
150
+ "const": "bash"
151
+ }
152
+ ]
153
+ },
154
+ "path": {
155
+ "type": "string"
156
+ },
157
+ "ok": {
158
+ "type": "boolean"
159
+ },
160
+ "action": {
161
+ "anyOf": [
162
+ {
163
+ "type": "string",
164
+ "const": "written"
165
+ },
166
+ {
167
+ "type": "string",
168
+ "const": "unchanged"
169
+ }
170
+ ]
171
+ },
172
+ "message": {
173
+ "type": "string"
174
+ }
175
+ }
176
+ },
177
+ "description": "One entry per config `shellInitFile`, rewritten after the change."
178
+ }
179
+ },
180
+ "title": "sideby new --json"
181
+ }