bitlabs-cli-linux-arm64 1.0.9 → 2.0.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/GETTING_STARTED.md +44 -0
- package/GO-LIVE.md +19 -0
- package/README.md +42 -0
- package/SECURITY.md +33 -0
- package/SKILL.md +26 -0
- package/TESTING.md +31 -0
- package/bin/bitlabs +0 -0
- package/bin/bitlabs-mcp +0 -0
- package/bin/bitlabs-onboard +0 -0
- package/docs/agent-setup-hosted.md +61 -0
- package/docs/agent-setup.md +24 -0
- package/docs/dashboard-team-handoff.md +66 -0
- package/docs/distribution-release.md +46 -0
- package/docs/onboard-button.html +34 -0
- package/docs/pairing-flow-proposal.md +7 -0
- package/docs/release-v2.0.0.md +13 -0
- package/onboarding/IMPLEMENTATION.md +61 -0
- package/onboarding/START.md +57 -0
- package/onboarding/callbacks.md +11 -0
- package/onboarding/credentials.md +15 -0
- package/onboarding/dashboard-prompt.md +47 -0
- package/onboarding/hosts/node-sqlite.md +17 -0
- package/onboarding/integrations/iframe-node-sqlite-v1.md +12 -0
- package/onboarding/provisioning.md +22 -0
- package/onboarding/verification.md +31 -0
- package/package.json +25 -5
- package/packages/callback-core/README.md +45 -0
- package/packages/callback-core/core.cjs +106 -0
- package/packages/callback-core/embed.go +10 -0
- package/packages/callback-core/handler.cjs +38 -0
- package/packages/callback-core/package.json +9 -0
- package/packages/callback-core/sqlite-wallet.cjs +165 -0
- package/packages/callback-core/test/callback.test.cjs +265 -0
- package/schemas/capabilities.json +86 -0
- package/schemas/evidence.schema.json +110 -0
- package/schemas/result.schema.json +79 -0
- package/schemas/setup.example.json +33 -0
- package/schemas/setup.schema.json +243 -0
- package/site/README.md +34 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"properties": {
|
|
5
|
+
"schema_version": {
|
|
6
|
+
"const": "1"
|
|
7
|
+
},
|
|
8
|
+
"setup_id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^(?![Bb][Ll][Pp][Uu][Bb]_)[A-Za-z0-9][A-Za-z0-9_-]{0,79}$"
|
|
11
|
+
},
|
|
12
|
+
"plan_sha256": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
15
|
+
},
|
|
16
|
+
"app_id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^(?![Bb][Ll][Pp][Uu][Bb]_)[A-Za-z0-9][A-Za-z0-9_-]{0,79}$"
|
|
19
|
+
},
|
|
20
|
+
"status": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": [
|
|
23
|
+
"HUMAN_ACTION_REQUIRED",
|
|
24
|
+
"RECONCILIATION_REQUIRED",
|
|
25
|
+
"CONFIGURATION_VERIFIED"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"changes": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"properties": {
|
|
34
|
+
"internal_identifier": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": [
|
|
37
|
+
"general.name",
|
|
38
|
+
"general.link",
|
|
39
|
+
"app.features.offers.enabled",
|
|
40
|
+
"app.features.surveys.enabled"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"before": {
|
|
44
|
+
"type": [
|
|
45
|
+
"string",
|
|
46
|
+
"boolean",
|
|
47
|
+
"null"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"after": {
|
|
51
|
+
"type": [
|
|
52
|
+
"string",
|
|
53
|
+
"boolean"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"internal_identifier",
|
|
59
|
+
"before",
|
|
60
|
+
"after"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"next_actions": {
|
|
65
|
+
"type": "array",
|
|
66
|
+
"items": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"required": [
|
|
72
|
+
"schema_version",
|
|
73
|
+
"setup_id",
|
|
74
|
+
"plan_sha256",
|
|
75
|
+
"status",
|
|
76
|
+
"next_actions"
|
|
77
|
+
],
|
|
78
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema"
|
|
79
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1",
|
|
3
|
+
"setup_id": "publisher-staging-001",
|
|
4
|
+
"workspace_id": "workspace-example",
|
|
5
|
+
"app": {
|
|
6
|
+
"mode": "existing",
|
|
7
|
+
"id": "app-example"
|
|
8
|
+
},
|
|
9
|
+
"environment": "staging",
|
|
10
|
+
"integration": "iframe",
|
|
11
|
+
"recipe": "iframe-node-sqlite-v1",
|
|
12
|
+
"provisioning": "dashboard",
|
|
13
|
+
"demand": [
|
|
14
|
+
"surveys"
|
|
15
|
+
],
|
|
16
|
+
"currency": {
|
|
17
|
+
"label": "Coins",
|
|
18
|
+
"base_units_per_usd": "100",
|
|
19
|
+
"user_reward_share_percent": "60",
|
|
20
|
+
"scale": 0,
|
|
21
|
+
"rounding": "floor",
|
|
22
|
+
"preserve_existing": true
|
|
23
|
+
},
|
|
24
|
+
"callback": {
|
|
25
|
+
"url": "https://publisher.example/bitlabs/callback",
|
|
26
|
+
"reconciliation_policy": "review"
|
|
27
|
+
},
|
|
28
|
+
"release": {
|
|
29
|
+
"version": "unreleased",
|
|
30
|
+
"source_revision": "unreleased",
|
|
31
|
+
"artifact_sha256": ""
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"properties": {
|
|
5
|
+
"schema_version": {
|
|
6
|
+
"const": "1"
|
|
7
|
+
},
|
|
8
|
+
"setup_id": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^(?![Bb][Ll][Pp][Uu][Bb]_)[A-Za-z0-9][A-Za-z0-9_-]{0,79}$"
|
|
11
|
+
},
|
|
12
|
+
"workspace_id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^(?![Bb][Ll][Pp][Uu][Bb]_)[A-Za-z0-9][A-Za-z0-9_-]{0,79}$"
|
|
15
|
+
},
|
|
16
|
+
"app": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"mode": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": [
|
|
23
|
+
"existing",
|
|
24
|
+
"create"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"id": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "^(?![Bb][Ll][Pp][Uu][Bb]_)[A-Za-z0-9][A-Za-z0-9_-]{0,79}$"
|
|
30
|
+
},
|
|
31
|
+
"name": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1,
|
|
34
|
+
"maxLength": 100
|
|
35
|
+
},
|
|
36
|
+
"product_url": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"format": "uri",
|
|
39
|
+
"pattern": "^https://[^?#@]+$"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"mode"
|
|
44
|
+
],
|
|
45
|
+
"oneOf": [
|
|
46
|
+
{
|
|
47
|
+
"properties": {
|
|
48
|
+
"mode": {
|
|
49
|
+
"const": "existing"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": [
|
|
53
|
+
"id"
|
|
54
|
+
],
|
|
55
|
+
"not": {
|
|
56
|
+
"required": [
|
|
57
|
+
"name"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"properties": {
|
|
63
|
+
"mode": {
|
|
64
|
+
"const": "create"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": [
|
|
68
|
+
"name"
|
|
69
|
+
],
|
|
70
|
+
"not": {
|
|
71
|
+
"required": [
|
|
72
|
+
"id"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"environment": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"enum": [
|
|
81
|
+
"staging",
|
|
82
|
+
"production"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"integration": {
|
|
86
|
+
"const": "iframe"
|
|
87
|
+
},
|
|
88
|
+
"recipe": {
|
|
89
|
+
"const": "iframe-node-sqlite-v1"
|
|
90
|
+
},
|
|
91
|
+
"provisioning": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"enum": [
|
|
94
|
+
"dashboard",
|
|
95
|
+
"helper"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"demand": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"minItems": 1,
|
|
101
|
+
"maxItems": 2,
|
|
102
|
+
"uniqueItems": true,
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"enum": [
|
|
106
|
+
"offers",
|
|
107
|
+
"surveys"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"currency": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"properties": {
|
|
115
|
+
"label": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"minLength": 1,
|
|
118
|
+
"maxLength": 80
|
|
119
|
+
},
|
|
120
|
+
"base_units_per_usd": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"pattern": "^(0|[1-9][0-9]{0,9})(\\.[0-9]{1,6})?$"
|
|
123
|
+
},
|
|
124
|
+
"user_reward_share_percent": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"pattern": "^(0|[1-9][0-9]{0,9})(\\.[0-9]{1,6})?$"
|
|
127
|
+
},
|
|
128
|
+
"scale": {
|
|
129
|
+
"type": "integer",
|
|
130
|
+
"minimum": 0,
|
|
131
|
+
"maximum": 6
|
|
132
|
+
},
|
|
133
|
+
"rounding": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"enum": [
|
|
136
|
+
"floor",
|
|
137
|
+
"exact"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
"preserve_existing": {
|
|
141
|
+
"type": "boolean"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": [
|
|
145
|
+
"label",
|
|
146
|
+
"base_units_per_usd",
|
|
147
|
+
"scale",
|
|
148
|
+
"rounding",
|
|
149
|
+
"preserve_existing"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"callback": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"properties": {
|
|
156
|
+
"url": {
|
|
157
|
+
"type": "string",
|
|
158
|
+
"format": "uri",
|
|
159
|
+
"pattern": "^https://[^?#@]+$"
|
|
160
|
+
},
|
|
161
|
+
"reconciliation_policy": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"enum": [
|
|
164
|
+
"review",
|
|
165
|
+
"full-reversal"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": [
|
|
170
|
+
"url",
|
|
171
|
+
"reconciliation_policy"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"release": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"additionalProperties": false,
|
|
177
|
+
"properties": {
|
|
178
|
+
"version": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
},
|
|
181
|
+
"source_revision": {
|
|
182
|
+
"type": "string"
|
|
183
|
+
},
|
|
184
|
+
"artifact_sha256": {
|
|
185
|
+
"type": "string"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"required": [
|
|
189
|
+
"version",
|
|
190
|
+
"source_revision",
|
|
191
|
+
"artifact_sha256"
|
|
192
|
+
],
|
|
193
|
+
"oneOf": [
|
|
194
|
+
{
|
|
195
|
+
"properties": {
|
|
196
|
+
"version": {
|
|
197
|
+
"const": "unreleased"
|
|
198
|
+
},
|
|
199
|
+
"source_revision": {
|
|
200
|
+
"const": "unreleased"
|
|
201
|
+
},
|
|
202
|
+
"artifact_sha256": {
|
|
203
|
+
"const": ""
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"properties": {
|
|
209
|
+
"version": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[A-Za-z0-9.-]+)?$"
|
|
212
|
+
},
|
|
213
|
+
"source_revision": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"pattern": "^[a-f0-9]{40}$"
|
|
216
|
+
},
|
|
217
|
+
"artifact_sha256": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": [
|
|
227
|
+
"schema_version",
|
|
228
|
+
"setup_id",
|
|
229
|
+
"workspace_id",
|
|
230
|
+
"app",
|
|
231
|
+
"environment",
|
|
232
|
+
"integration",
|
|
233
|
+
"recipe",
|
|
234
|
+
"provisioning",
|
|
235
|
+
"demand",
|
|
236
|
+
"currency",
|
|
237
|
+
"callback",
|
|
238
|
+
"release"
|
|
239
|
+
],
|
|
240
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
241
|
+
"title": "BitLabs secret-free setup manifest v1",
|
|
242
|
+
"description": "CLI validation additionally enforces public HTTPS hosts, bounded decimal values and no control characters. No credentials are accepted."
|
|
243
|
+
}
|
package/site/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Dashboard setup form and release site
|
|
2
|
+
|
|
3
|
+
## Ready-to-hand-over copy button
|
|
4
|
+
|
|
5
|
+
For the dashboard team, use the source-only package described in [dashboard-team-handoff.md](../docs/dashboard-team-handoff.md). Generate it with `python3 scripts/build-dashboard-handoff.py`, then deliver `handoff/bitlabs-dashboard-button.zip`. It contains a working standalone demo, reusable button assets and a complete copied prompt with code/tests. It needs no dashboard/API access, private repository URL, helper binary, release metadata or callback URL to start. Supplying selected workspace/app IDs is an optional local integration by the dashboard team. Existing-app dashboard provisioning is the default.
|
|
6
|
+
|
|
7
|
+
## Optional release-bound provisioning form
|
|
8
|
+
|
|
9
|
+
The form below is a separate advanced surface. Its release controls do not gate the source-only copy button.
|
|
10
|
+
|
|
11
|
+
The form supports the first iframe/Node/SQLite recipe, prefilled workspace/app IDs, secret-free JSON and one pinned prompt. Existing-app/dashboard-managed staging setup is the default. It never takes a private credential. The dashboard embed must supply `window.BITLABS_DASHBOARD_CONTEXT = {workspace_id, app_id}` from authenticated server context. These values prefill read-only fields; they are metadata and do not confer authorization.
|
|
12
|
+
|
|
13
|
+
`onboarding/START.md` is the canonical workflow router. The source-only button bundles its specialized instructions from `onboarding/dashboard-prompt.md` together with the reference code and tests. The optional form still requires its own reviewed platform-specific release configuration; publishing the source-only button does not configure it. A preview of this optional form has copying/downloading disabled:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
./site/build.sh --preview
|
|
17
|
+
node --test site/test/*.test.cjs
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Publication requires a real, reviewed release configuration and existing helper executable:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
./site/build.sh --release-config /reviewed/release.json --release-dir /reviewed/artifacts
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The configuration contains exactly `version` (semver), `source_revision` (full Git commit), `artifact_sha256` (SHA256 of the **bitlabs-onboard executable**, not an archive), `artifact_file` (basename under release-dir), `platform` (darwin/linux/windows-amd64/arm64), `source_repository` (the actual reviewed GitHub owner/repository matching the checkout origin), and `guide_url` (the exact GitHub blob or raw URL for `onboarding/START.md` at that commit). Do not invent these values or point to a nonexistent release. The build verifies the local executable digest, matching checked-out commit, and clean source tree including untracked files. Review repository ownership and release provenance before publication; passing structural checks does not prove ownership.
|
|
27
|
+
|
|
28
|
+
Each config applies to one helper platform. The dashboard/release publisher must select the publisher's machine platform and inject its matching reviewed config as `window.BITLABS_ONBOARDING_RELEASE`. The prompt names that platform and executable digest. The helper itself verifies the executable digest and compiled version/revision before credentialed provisioning. A wrong platform digest cannot authorize provisioning.
|
|
29
|
+
|
|
30
|
+
For the dashboard, embed the built `docs/onboard-button.html` only after the release is reviewed. No production dashboard code is present in this repository; actual dashboard wiring remains a separate deployment. No hosting deployment is performed by the build.
|
|
31
|
+
|
|
32
|
+
## Public download site
|
|
33
|
+
|
|
34
|
+
Use [distribution-release.md](../docs/distribution-release.md) and `scripts/build-distribution-site.py` for the public site. It publishes the source-only button, complete hosted guide, CLI archives and preserved release history. The optional advanced form above is not the public landing page. Its guide must be publicly accessible at a reviewed immutable location before use by external publishers; a private source-repository URL is insufficient.
|