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.
- package/LICENSE +21 -0
- package/README.md +111 -2
- package/README.zh-CN.md +112 -0
- package/dist/build.json +1 -0
- package/dist/src/cli/args.d.ts +13 -0
- package/dist/src/cli/args.js +38 -0
- package/dist/src/cli/commands.d.ts +50 -0
- package/dist/src/cli/commands.js +566 -0
- package/dist/src/cli/format.d.ts +16 -0
- package/dist/src/cli/format.js +80 -0
- package/dist/src/cli/json-schemas.d.ts +2 -0
- package/dist/src/cli/json-schemas.js +259 -0
- package/dist/src/cli/main.d.ts +2 -0
- package/dist/src/cli/main.js +276 -0
- package/dist/src/cli/schemas.d.ts +1 -0
- package/dist/src/cli/schemas.js +16 -0
- package/dist/src/core/account-name.d.ts +2 -0
- package/dist/src/core/account-name.js +2 -0
- package/dist/src/core/accounts.d.ts +20 -0
- package/dist/src/core/accounts.js +131 -0
- package/dist/src/core/config.d.ts +61 -0
- package/dist/src/core/config.js +184 -0
- package/dist/src/core/create.d.ts +30 -0
- package/dist/src/core/create.js +126 -0
- package/dist/src/core/doctor.d.ts +41 -0
- package/dist/src/core/doctor.js +171 -0
- package/dist/src/core/errors.d.ts +12 -0
- package/dist/src/core/errors.js +14 -0
- package/dist/src/core/file-memo.d.ts +24 -0
- package/dist/src/core/file-memo.js +41 -0
- package/dist/src/core/fs-safe.d.ts +38 -0
- package/dist/src/core/fs-safe.js +205 -0
- package/dist/src/core/handoff.d.ts +41 -0
- package/dist/src/core/handoff.js +54 -0
- package/dist/src/core/identity.d.ts +23 -0
- package/dist/src/core/identity.js +79 -0
- package/dist/src/core/last-doctor.d.ts +36 -0
- package/dist/src/core/last-doctor.js +69 -0
- package/dist/src/core/launch.d.ts +37 -0
- package/dist/src/core/launch.js +108 -0
- package/dist/src/core/login-path.d.ts +23 -0
- package/dist/src/core/login-path.js +96 -0
- package/dist/src/core/paths.d.ts +13 -0
- package/dist/src/core/paths.js +32 -0
- package/dist/src/core/quota-levels.d.ts +19 -0
- package/dist/src/core/quota-levels.js +34 -0
- package/dist/src/core/resume.d.ts +9 -0
- package/dist/src/core/resume.js +15 -0
- package/dist/src/core/secret-file.d.ts +30 -0
- package/dist/src/core/secret-file.js +116 -0
- package/dist/src/core/share-meaning.d.ts +6 -0
- package/dist/src/core/share-meaning.js +32 -0
- package/dist/src/core/share-mode-names.d.ts +1 -0
- package/dist/src/core/share-mode-names.js +10 -0
- package/dist/src/core/share-modes.d.ts +24 -0
- package/dist/src/core/share-modes.js +405 -0
- package/dist/src/core/shell-init.d.ts +31 -0
- package/dist/src/core/shell-init.js +84 -0
- package/dist/src/core/skill-check.d.ts +11 -0
- package/dist/src/core/skill-check.js +57 -0
- package/dist/src/core/usage-days.d.ts +15 -0
- package/dist/src/core/usage-days.js +33 -0
- package/dist/src/core/version.d.ts +9 -0
- package/dist/src/core/version.js +46 -0
- package/dist/src/desktop/app.d.ts +60 -0
- package/dist/src/desktop/app.js +316 -0
- package/dist/src/desktop/icon.d.ts +16 -0
- package/dist/src/desktop/icon.js +174 -0
- package/dist/src/families/claude/index.d.ts +10 -0
- package/dist/src/families/claude/index.js +127 -0
- package/dist/src/families/claude/layout.d.ts +6 -0
- package/dist/src/families/claude/layout.js +5 -0
- package/dist/src/families/claude/quota-cache.d.ts +31 -0
- package/dist/src/families/claude/quota-cache.js +111 -0
- package/dist/src/families/claude/quota.d.ts +3 -0
- package/dist/src/families/claude/quota.js +53 -0
- package/dist/src/families/claude/usage.d.ts +22 -0
- package/dist/src/families/claude/usage.js +146 -0
- package/dist/src/families/codex/index.d.ts +5 -0
- package/dist/src/families/codex/index.js +70 -0
- package/dist/src/families/codex/rollout.d.ts +67 -0
- package/dist/src/families/codex/rollout.js +298 -0
- package/dist/src/families/grok/index.d.ts +8 -0
- package/dist/src/families/grok/index.js +82 -0
- package/dist/src/families/index.d.ts +3 -0
- package/dist/src/families/index.js +40 -0
- package/dist/src/families/logos.d.ts +21 -0
- package/dist/src/families/logos.js +26 -0
- package/dist/src/families/pi/index.d.ts +3 -0
- package/dist/src/families/pi/index.js +54 -0
- package/dist/src/families/shared/sessions.d.ts +9 -0
- package/dist/src/families/shared/sessions.js +70 -0
- package/dist/src/families/shared/toml.d.ts +5 -0
- package/dist/src/families/shared/toml.js +16 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.js +4 -0
- package/dist/src/panel/background.d.ts +62 -0
- package/dist/src/panel/background.js +274 -0
- package/dist/src/panel/handler.d.ts +91 -0
- package/dist/src/panel/handler.js +396 -0
- package/dist/src/panel/i18n.d.ts +287 -0
- package/dist/src/panel/i18n.js +570 -0
- package/dist/src/panel/page-logic.d.ts +154 -0
- package/dist/src/panel/page-logic.js +326 -0
- package/dist/src/panel/page-script.d.ts +2 -0
- package/dist/src/panel/page-script.js +1633 -0
- package/dist/src/panel/page-styles.d.ts +7 -0
- package/dist/src/panel/page-styles.js +514 -0
- package/dist/src/panel/page.d.ts +20 -0
- package/dist/src/panel/page.js +96 -0
- package/dist/src/panel/server.d.ts +32 -0
- package/dist/src/panel/server.js +133 -0
- package/dist/src/panel/theme.d.ts +116 -0
- package/dist/src/panel/theme.js +132 -0
- package/dist/src/plugins/account-script.d.ts +4 -0
- package/dist/src/plugins/account-script.js +66 -0
- package/dist/src/plugins/bus.d.ts +33 -0
- package/dist/src/plugins/bus.js +84 -0
- package/dist/src/plugins/loader.d.ts +58 -0
- package/dist/src/plugins/loader.js +250 -0
- package/dist/src/quota/claude-statusline.d.ts +28 -0
- package/dist/src/quota/claude-statusline.js +301 -0
- package/dist/src/quota/statusline-tap.d.ts +11 -0
- package/dist/src/quota/statusline-tap.js +104 -0
- package/dist/src/runtime.d.ts +195 -0
- package/dist/src/runtime.js +424 -0
- package/dist/src/types.d.ts +285 -0
- package/dist/src/types.js +3 -0
- package/dist/testing/demo.d.ts +8 -0
- package/dist/testing/demo.js +50 -0
- package/dist/testing/index.d.ts +36 -0
- package/dist/testing/index.js +118 -0
- package/package.json +66 -4
- package/schemas/alias.json +102 -0
- package/schemas/app-install.json +74 -0
- package/schemas/app-uninstall.json +54 -0
- package/schemas/config.json +170 -0
- package/schemas/doctor.json +229 -0
- package/schemas/error.json +25 -0
- package/schemas/families.json +205 -0
- package/schemas/list.json +177 -0
- package/schemas/new.json +199 -0
- package/schemas/next.json +127 -0
- package/schemas/plugins.json +74 -0
- package/schemas/quota-setup.json +60 -0
- package/schemas/quota-teardown.json +30 -0
- package/schemas/quota.json +203 -0
- package/skills/sideby/SKILL.md +61 -0
- package/skills/sideby/references/accounts.md +31 -0
- package/skills/sideby/references/diagnose.md +47 -0
- package/skills/sideby/references/handoff.md +41 -0
- package/skills/sideby/references/quota.md +14 -0
- package/skills/sideby/references/setup.md +31 -0
- package/skills/sideby/references/sharing.md +17 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "sideby/families.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schemaVersion",
|
|
7
|
+
"families"
|
|
8
|
+
],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"type": "number",
|
|
12
|
+
"const": 1
|
|
13
|
+
},
|
|
14
|
+
"families": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"allOf": [
|
|
18
|
+
{
|
|
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
|
+
"type": "object",
|
|
51
|
+
"required": [
|
|
52
|
+
"layout",
|
|
53
|
+
"selectVar",
|
|
54
|
+
"login",
|
|
55
|
+
"quota",
|
|
56
|
+
"usage",
|
|
57
|
+
"quotaSetup",
|
|
58
|
+
"shared"
|
|
59
|
+
],
|
|
60
|
+
"properties": {
|
|
61
|
+
"layout": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"required": [
|
|
64
|
+
"main",
|
|
65
|
+
"account"
|
|
66
|
+
],
|
|
67
|
+
"properties": {
|
|
68
|
+
"main": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"account": {
|
|
72
|
+
"type": "string"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"description": "Relative to HOME, for example `.claude` and `.claude-<name>`."
|
|
76
|
+
},
|
|
77
|
+
"selectVar": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "Environment variable that selects a non-main Account directory."
|
|
80
|
+
},
|
|
81
|
+
"login": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"required": [
|
|
84
|
+
"args",
|
|
85
|
+
"hint"
|
|
86
|
+
],
|
|
87
|
+
"properties": {
|
|
88
|
+
"args": {
|
|
89
|
+
"anyOf": [
|
|
90
|
+
{
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "null"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"description": "Arguments of the Host's sign-in command; null when sign-in happens inside the Host."
|
|
101
|
+
},
|
|
102
|
+
"hint": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"quota": {
|
|
108
|
+
"type": "boolean"
|
|
109
|
+
},
|
|
110
|
+
"usage": {
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
},
|
|
113
|
+
"quotaSetup": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"description": "Quota needs `sideby quota setup <family>` once."
|
|
116
|
+
},
|
|
117
|
+
"shared": {
|
|
118
|
+
"type": "array",
|
|
119
|
+
"items": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"required": [
|
|
122
|
+
"path",
|
|
123
|
+
"mode",
|
|
124
|
+
"source",
|
|
125
|
+
"meaning"
|
|
126
|
+
],
|
|
127
|
+
"properties": {
|
|
128
|
+
"path": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
},
|
|
131
|
+
"mode": {
|
|
132
|
+
"anyOf": [
|
|
133
|
+
{
|
|
134
|
+
"type": "string",
|
|
135
|
+
"const": "link"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"type": "string",
|
|
139
|
+
"const": "copy"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"type": "string",
|
|
143
|
+
"const": "link-or-copy"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "string",
|
|
147
|
+
"const": "link-or-local"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"type": "string",
|
|
151
|
+
"const": "local"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "string",
|
|
155
|
+
"const": "local-if-api"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "string",
|
|
159
|
+
"const": "info"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "string",
|
|
163
|
+
"const": "json-key"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
"key": {
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
"mainPath": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"credential": {
|
|
174
|
+
"type": "boolean"
|
|
175
|
+
},
|
|
176
|
+
"noSymlink": {
|
|
177
|
+
"type": "boolean"
|
|
178
|
+
},
|
|
179
|
+
"source": {
|
|
180
|
+
"anyOf": [
|
|
181
|
+
{
|
|
182
|
+
"type": "string",
|
|
183
|
+
"const": "family"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "string",
|
|
187
|
+
"const": "config"
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"meaning": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"description": "What the item looks like in each Account, in one fixed sentence."
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"title": "sideby families --json"
|
|
205
|
+
}
|
|
@@ -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
|
+
}
|
package/schemas/new.json
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
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
|
+
"suggestion": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"required": [
|
|
182
|
+
"name"
|
|
183
|
+
],
|
|
184
|
+
"properties": {
|
|
185
|
+
"name": {
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"alias": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"aliasProblem": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"description": "Only with `--next`: the picked name, the short command that follows the existing pattern, or why that short command was left out."
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"title": "sideby new --json"
|
|
199
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "sideby/next.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schemaVersion",
|
|
7
|
+
"family",
|
|
8
|
+
"pick",
|
|
9
|
+
"accounts",
|
|
10
|
+
"hasQuota"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"schemaVersion": {
|
|
14
|
+
"type": "number",
|
|
15
|
+
"const": 1
|
|
16
|
+
},
|
|
17
|
+
"family": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"pick": {
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "null"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"description": "The recommended account; null when none can be used now (exit code 1)."
|
|
30
|
+
},
|
|
31
|
+
"accounts": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"required": [
|
|
36
|
+
"ref",
|
|
37
|
+
"kind",
|
|
38
|
+
"state",
|
|
39
|
+
"pressure"
|
|
40
|
+
],
|
|
41
|
+
"properties": {
|
|
42
|
+
"ref": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"kind": {
|
|
46
|
+
"anyOf": [
|
|
47
|
+
{
|
|
48
|
+
"type": "string",
|
|
49
|
+
"const": "subscription"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "string",
|
|
53
|
+
"const": "api"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"state": {
|
|
58
|
+
"anyOf": [
|
|
59
|
+
{
|
|
60
|
+
"type": "string",
|
|
61
|
+
"const": "ready"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "string",
|
|
65
|
+
"const": "unknown"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "string",
|
|
69
|
+
"const": "api"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "string",
|
|
73
|
+
"const": "full"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "string",
|
|
77
|
+
"const": "logged-out"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"description": "ready and unknown can be picked; api only with --include-api; full and logged-out never."
|
|
81
|
+
},
|
|
82
|
+
"pressure": {
|
|
83
|
+
"anyOf": [
|
|
84
|
+
{
|
|
85
|
+
"type": "number"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "null"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"description": "Used percent of the fullest window not reset yet; null without quota."
|
|
92
|
+
},
|
|
93
|
+
"resetsAt": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"description": "For full: when its last full window resets."
|
|
96
|
+
},
|
|
97
|
+
"observedAt": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "When the account's quota was recorded (its last session)."
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"description": "Every account of the family, best first."
|
|
104
|
+
},
|
|
105
|
+
"hasQuota": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"description": "False when no account has quota data: the pick is then a guess, and `sideby next` does not start it (exit 1)."
|
|
108
|
+
},
|
|
109
|
+
"earliestReset": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"required": [
|
|
112
|
+
"ref",
|
|
113
|
+
"at"
|
|
114
|
+
],
|
|
115
|
+
"properties": {
|
|
116
|
+
"ref": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"at": {
|
|
120
|
+
"type": "string"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"description": "Set when nothing can be picked and some accounts are full: the first to come back."
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"title": "sideby next --json"
|
|
127
|
+
}
|