soulbridge 0.0.98 → 0.0.101
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 +202 -202
- package/dist/packages/cli/src/cli.js +0 -0
- package/dist/packages/core/src/config/status.d.ts +15 -15
- package/dist/packages/core/src/config/status.js +15 -15
- package/dist/packages/core/src/index.js +1 -1
- package/dist/packages/core/src/roles.d.ts +8 -9
- package/dist/packages/core/src/roles.js +4 -10
- package/dist/packages/core/src/sqlite.d.ts +2 -1
- package/dist/packages/core/src/sqlite.js +12 -6
- package/package.json +2 -2
- package/dist/packages/core/src/dimensions.d.ts +0 -28
- package/dist/packages/core/src/dimensions.js +0 -53
package/LICENSE
CHANGED
|
@@ -1,202 +1,202 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
-
|
|
181
|
-
To apply the Apache License to your work, attach the following
|
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
-
replaced with your own identifying information. (Don't include
|
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
-
comment syntax for the file format. We also recommend that a
|
|
186
|
-
file or class name and description of purpose be included on the
|
|
187
|
-
same "printed page" as the copyright notice for easier
|
|
188
|
-
identification within third-party archives.
|
|
189
|
-
|
|
190
|
-
Copyright 2023 The Sigstore Authors
|
|
191
|
-
|
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
-
you may not use this file except in compliance with the License.
|
|
194
|
-
You may obtain a copy of the License at
|
|
195
|
-
|
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
-
|
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
-
See the License for the specific language governing permissions and
|
|
202
|
-
limitations under the License.
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2023 The Sigstore Authors
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
File without changes
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fact lifecycle vocabulary — declared once, imported everywhere.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* These four replaced none/open/kept/broken/superseded. The older set mixed "what kind of
|
|
5
|
+
* fact" with "how far it has come", so every reader had to remember which values counted as
|
|
6
|
+
* live. The four below are the only ones written now: `raw` is the exchange itself,
|
|
7
|
+
* `candidate` is held but not injected, `active` is in use, `retracted` is kept for the
|
|
8
|
+
* record and read by nothing.
|
|
7
9
|
*
|
|
8
|
-
* Values match the column defaults in sqlite.ts; changing one is a schema migration,
|
|
9
|
-
*
|
|
10
|
+
* Values match the column defaults in sqlite.ts; changing one is a schema migration, not a
|
|
11
|
+
* rename.
|
|
10
12
|
*/
|
|
11
13
|
export declare const FACT_STATUS: {
|
|
12
|
-
/**
|
|
13
|
-
readonly
|
|
14
|
-
/**
|
|
15
|
-
readonly
|
|
16
|
-
/**
|
|
17
|
-
readonly
|
|
18
|
-
/**
|
|
19
|
-
readonly
|
|
20
|
-
/** Replaced by another fact; kept for the record, never injected. */
|
|
21
|
-
readonly superseded: 'superseded';
|
|
14
|
+
/** The exchange itself; not a distilled fact. */
|
|
15
|
+
readonly raw: 'raw';
|
|
16
|
+
/** Held, not injected: unverified inference or an unconfirmed rule. */
|
|
17
|
+
readonly candidate: 'candidate';
|
|
18
|
+
/** In use: retrieval, rules, profile, evidence. */
|
|
19
|
+
readonly active: 'active';
|
|
20
|
+
/** Replaced or withdrawn; kept for the audit trail, injected nowhere. */
|
|
21
|
+
readonly retracted: 'retracted';
|
|
22
22
|
};
|
|
23
23
|
export type FactStatus = (typeof FACT_STATUS)[keyof typeof FACT_STATUS];
|
|
24
24
|
/** Where a fact came from, in the trust sense (not a type). */
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fact lifecycle vocabulary — declared once, imported everywhere.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* These four replaced none/open/kept/broken/superseded. The older set mixed "what kind of
|
|
5
|
+
* fact" with "how far it has come", so every reader had to remember which values counted as
|
|
6
|
+
* live. The four below are the only ones written now: `raw` is the exchange itself,
|
|
7
|
+
* `candidate` is held but not injected, `active` is in use, `retracted` is kept for the
|
|
8
|
+
* record and read by nothing.
|
|
7
9
|
*
|
|
8
|
-
* Values match the column defaults in sqlite.ts; changing one is a schema migration,
|
|
9
|
-
*
|
|
10
|
+
* Values match the column defaults in sqlite.ts; changing one is a schema migration, not a
|
|
11
|
+
* rename.
|
|
10
12
|
*/
|
|
11
13
|
export const FACT_STATUS = {
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
/** Replaced by another fact; kept for the record, never injected. */
|
|
21
|
-
superseded: 'superseded',
|
|
14
|
+
/** The exchange itself; not a distilled fact. */
|
|
15
|
+
raw: 'raw',
|
|
16
|
+
/** Held, not injected: unverified inference or an unconfirmed rule. */
|
|
17
|
+
candidate: 'candidate',
|
|
18
|
+
/** In use: retrieval, rules, profile, evidence. */
|
|
19
|
+
active: 'active',
|
|
20
|
+
/** Replaced or withdrawn; kept for the audit trail, injected nowhere. */
|
|
21
|
+
retracted: 'retracted',
|
|
22
22
|
};
|
|
23
23
|
/** Where a fact came from, in the trust sense (not a type). */
|
|
24
24
|
export const FACT_SOURCE = {
|
|
@@ -557,7 +557,7 @@ export class Soul {
|
|
|
557
557
|
// lost, and "the fact changed" is never claimed without a real predecessor.
|
|
558
558
|
const target = operation.targetId ? this.store.fact(operation.targetId) : null;
|
|
559
559
|
const sameScope = target && target.soulId === this.soulId && target.userId === this.userId;
|
|
560
|
-
if (target && sameScope && target
|
|
560
|
+
if (target && sameScope && isActive(target)) {
|
|
561
561
|
this.store.supersedeFact(target.id, written.id);
|
|
562
562
|
}
|
|
563
563
|
else {
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The two decisions every reader used to make for itself, in one place.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* - `status` moves from none/superseded to raw/candidate/active/retracted, but old rows keep
|
|
8
|
-
* their old values until the migration runs.
|
|
4
|
+
* `role` says what a fact is for; `status` says how far it has come. Both used to be read by
|
|
5
|
+
* matching Chinese type labels and status strings at each call site, which is how one filter
|
|
6
|
+
* ended up admitting retired facts after a rename.
|
|
9
7
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* This is the contract step: the dual-vocabulary fallback is gone. The migration normalises
|
|
9
|
+
* old rows (none/open/kept → active, broken/superseded → retracted) and the writer always
|
|
10
|
+
* stores a role, so a reader sees exactly one vocabulary.
|
|
13
11
|
*/
|
|
14
12
|
import type { Fact } from './types.ts';
|
|
15
13
|
import type { FactRole } from './types.ts';
|
|
16
|
-
|
|
14
|
+
/** Rows written before the role column existed cannot appear after the migration. */
|
|
15
|
+
export declare function roleOf(fact: Pick<Fact, 'role'>): FactRole;
|
|
17
16
|
export declare function isActive(fact: Pick<Fact, 'status'>): boolean;
|
|
18
17
|
export declare function isRetracted(fact: Pick<Fact, 'status'>): boolean;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { FACT_STATE_MIGRATION, LEGACY_ROLE_BY_TYPE } from './config/domains.js';
|
|
2
1
|
import { FACT_STATUS } from './config/status.js';
|
|
3
|
-
|
|
4
|
-
/** Old and new status values that mean "this is in use". */
|
|
5
|
-
const ACTIVE_STATES = new Set(['active', 'none', 'kept', 'open']);
|
|
2
|
+
/** Rows written before the role column existed cannot appear after the migration. */
|
|
6
3
|
export function roleOf(fact) {
|
|
7
|
-
|
|
8
|
-
return fact.role;
|
|
9
|
-
return LEGACY_ROLES[fact.typeName ?? ''] ?? 'observation';
|
|
4
|
+
return fact.role ?? 'observation';
|
|
10
5
|
}
|
|
11
6
|
export function isActive(fact) {
|
|
12
|
-
return
|
|
7
|
+
return String(fact.status) === FACT_STATUS.active;
|
|
13
8
|
}
|
|
14
9
|
export function isRetracted(fact) {
|
|
15
|
-
|
|
16
|
-
return mapped === 'retracted' || String(fact.status) === FACT_STATUS.superseded;
|
|
10
|
+
return String(fact.status) === FACT_STATUS.retracted;
|
|
17
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatabaseSync } from 'node:sqlite';
|
|
2
2
|
import type { SoulStore } from './store.ts';
|
|
3
|
-
export declare const SCHEMA_VERSION =
|
|
3
|
+
export declare const SCHEMA_VERSION = 10;
|
|
4
4
|
export declare const AFFECT_RETENTION_MS: number;
|
|
5
5
|
export declare class DbNewerThanBinaryError extends Error {
|
|
6
6
|
readonly code = "DB_NEWER_THAN_BINARY";
|
|
@@ -13,6 +13,7 @@ export declare class DbNewerThanBinaryError extends Error {
|
|
|
13
13
|
* old table stays as a read-only legacy copy.
|
|
14
14
|
*/
|
|
15
15
|
/** v6 → v7: turn threads (a topic's turns need not be adjacent) plus turns.thread_id. */
|
|
16
|
+
export declare function upgradeToV10(db: DatabaseSync): void;
|
|
16
17
|
export declare function upgradeToV9(db: DatabaseSync): void;
|
|
17
18
|
export declare function upgradeToV8(db: DatabaseSync): void;
|
|
18
19
|
export declare function upgradeToV7(db: DatabaseSync): void;
|
|
@@ -12,7 +12,7 @@ import { DEFAULT_EMOTION } from './types.js';
|
|
|
12
12
|
import { FACT_STATUS, MEMORY_STATUS } from './config/status.js';
|
|
13
13
|
import { LEGACY_ROLE_BY_TYPE } from './config/domains.js';
|
|
14
14
|
import { bm25, buildCorpusStats, tokenize } from './scoring.js';
|
|
15
|
-
export const SCHEMA_VERSION =
|
|
15
|
+
export const SCHEMA_VERSION = 10;
|
|
16
16
|
/** How many recent pairs are considered before scoring. Bounded so recall stays O(candidates). */
|
|
17
17
|
const RECALL_CANDIDATES = 500;
|
|
18
18
|
export const AFFECT_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
|
|
@@ -175,7 +175,7 @@ CREATE TABLE IF NOT EXISTS facts (
|
|
|
175
175
|
at_end INTEGER,
|
|
176
176
|
at_precision TEXT NOT NULL DEFAULT 'unknown',
|
|
177
177
|
place_id TEXT,
|
|
178
|
-
status TEXT NOT NULL DEFAULT '
|
|
178
|
+
status TEXT NOT NULL DEFAULT 'active',
|
|
179
179
|
confidence REAL NOT NULL DEFAULT 1,
|
|
180
180
|
source TEXT NOT NULL DEFAULT 'experienced',
|
|
181
181
|
source_turn_id TEXT,
|
|
@@ -299,6 +299,12 @@ function upgradeToV3(db) {
|
|
|
299
299
|
* old table stays as a read-only legacy copy.
|
|
300
300
|
*/
|
|
301
301
|
/** v6 → v7: turn threads (a topic's turns need not be adjacent) plus turns.thread_id. */
|
|
302
|
+
export function upgradeToV10(db) {
|
|
303
|
+
// The four-state vocabulary (config/status.ts). Everything written under the old names
|
|
304
|
+
// becomes one of the two states the code now reads; after this the fallbacks are gone.
|
|
305
|
+
db.exec("UPDATE facts SET status = 'active' WHERE status IN ('none','open','kept')");
|
|
306
|
+
db.exec("UPDATE facts SET status = 'retracted' WHERE status IN ('broken','superseded')");
|
|
307
|
+
}
|
|
302
308
|
export function upgradeToV9(db) {
|
|
303
309
|
// Time became locatability (ADR 0032): a fact may be known to exist without a
|
|
304
310
|
// date, and that is a value — unknown — not a reason to discard it.
|
|
@@ -442,8 +448,8 @@ export function openSqlite(file) {
|
|
|
442
448
|
upgradeToV7(db);
|
|
443
449
|
if (version < 8)
|
|
444
450
|
upgradeToV8(db);
|
|
445
|
-
if (version <
|
|
446
|
-
|
|
451
|
+
if (version < 10)
|
|
452
|
+
upgradeToV10(db);
|
|
447
453
|
// v6 adds tables only; SCHEMA creates them on every open, nothing to copy.
|
|
448
454
|
setVersion(db, SCHEMA_VERSION);
|
|
449
455
|
db.exec('COMMIT');
|
|
@@ -827,7 +833,7 @@ export function openSqlite(file) {
|
|
|
827
833
|
},
|
|
828
834
|
supersedeFact(oldId, newId) {
|
|
829
835
|
withRetry(() => db
|
|
830
|
-
.prepare(`UPDATE facts SET status = '${FACT_STATUS.
|
|
836
|
+
.prepare(`UPDATE facts SET status = '${FACT_STATUS.retracted}', superseded_by = ? WHERE id = ?`)
|
|
831
837
|
.run(newId, oldId));
|
|
832
838
|
},
|
|
833
839
|
/* ---------------- gaps ---------------- */
|
|
@@ -1083,7 +1089,7 @@ export function openSqlite(file) {
|
|
|
1083
1089
|
.prepare(`SELECT DISTINCT f.* FROM facts f
|
|
1084
1090
|
JOIN fact_slots s ON s.fact_id = f.id AND s.value_type = 'entity'
|
|
1085
1091
|
JOIN entities e ON e.id = s.entity_id
|
|
1086
|
-
WHERE f.soul_id = ? AND f.user_id = ? AND f.status
|
|
1092
|
+
WHERE f.soul_id = ? AND f.user_id = ? AND f.status = '${FACT_STATUS.active}'
|
|
1087
1093
|
AND (e.name = ? OR e.aliases LIKE ?)
|
|
1088
1094
|
AND (? IS NULL OR f.statement LIKE ? OR COALESCE(f.type_name, '') LIKE ?)
|
|
1089
1095
|
ORDER BY COALESCE(f.at, f.created_at) DESC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soulbridge",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.101",
|
|
4
4
|
"description": "A personality layer for any agent: continuity, forgetting, and growth across tools.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"typecheck": "tsc --noEmit",
|
|
53
53
|
"prepublishOnly": "npm run build && npm test",
|
|
54
54
|
"sync:prompts": "node scripts/sync-prompts.mjs",
|
|
55
|
-
"
|
|
55
|
+
"setup": "node scripts/install-hooks.mjs"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/node": "^26.6.5",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The profile dimension vocabulary, declared once.
|
|
3
|
-
*
|
|
4
|
-
* A dimension is a noun we ship to two model stages and to the merge parser: the
|
|
5
|
-
* classifier decides which lens a lesson belongs to, the merge decides which lens a
|
|
6
|
-
* line belongs to, and the parser rejects anything else. Those three must agree, so
|
|
7
|
-
* the names AND their admission criteria live here and nowhere else — prompts render
|
|
8
|
-
* this, they do not retype it.
|
|
9
|
-
*
|
|
10
|
-
* The definitions are borrowed from measurement traditions on purpose:
|
|
11
|
-
* 价值观 ← Schwartz; 人际关系 ← interpersonal circumplex (warmth × dominance);
|
|
12
|
-
* 生活兴趣 ← RIASEC; 情绪 ← core affect. 边界 has no taxonomy — it quotes the words.
|
|
13
|
-
* These are admission criteria for a sentence, not a personality theory.
|
|
14
|
-
*/
|
|
15
|
-
export declare const PROFILE_DIMENSIONS: readonly ['价值观', '工作方式', '沟通偏好', '情绪', '人际关系', '生活兴趣', '边界'];
|
|
16
|
-
export type ProfileDimension = (typeof PROFILE_DIMENSIONS)[number];
|
|
17
|
-
/** What counts as a line in each dimension, and what does not. */
|
|
18
|
-
export declare const PROFILE_DIMENSION_DEFINITIONS: Record<ProfileDimension, string>;
|
|
19
|
-
export declare function isProfileDimension(value: unknown): value is ProfileDimension;
|
|
20
|
-
/**
|
|
21
|
-
* Render the definitions block both prompts embed.
|
|
22
|
-
*
|
|
23
|
-
* Generated from the declaration above so a new dimension cannot be added to the
|
|
24
|
-
* vocabulary without appearing in the prompt (and vice versa).
|
|
25
|
-
*/
|
|
26
|
-
export declare function renderDimensionDefinitions(): string;
|
|
27
|
-
/** The "维度=价值观|工作方式|…" line, generated rather than retyped. */
|
|
28
|
-
export declare function dimensionChoices(): string;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The profile dimension vocabulary, declared once.
|
|
3
|
-
*
|
|
4
|
-
* A dimension is a noun we ship to two model stages and to the merge parser: the
|
|
5
|
-
* classifier decides which lens a lesson belongs to, the merge decides which lens a
|
|
6
|
-
* line belongs to, and the parser rejects anything else. Those three must agree, so
|
|
7
|
-
* the names AND their admission criteria live here and nowhere else — prompts render
|
|
8
|
-
* this, they do not retype it.
|
|
9
|
-
*
|
|
10
|
-
* The definitions are borrowed from measurement traditions on purpose:
|
|
11
|
-
* 价值观 ← Schwartz; 人际关系 ← interpersonal circumplex (warmth × dominance);
|
|
12
|
-
* 生活兴趣 ← RIASEC; 情绪 ← core affect. 边界 has no taxonomy — it quotes the words.
|
|
13
|
-
* These are admission criteria for a sentence, not a personality theory.
|
|
14
|
-
*/
|
|
15
|
-
export const PROFILE_DIMENSIONS = [
|
|
16
|
-
'价值观',
|
|
17
|
-
'工作方式',
|
|
18
|
-
'沟通偏好',
|
|
19
|
-
'情绪',
|
|
20
|
-
'人际关系',
|
|
21
|
-
'生活兴趣',
|
|
22
|
-
'边界',
|
|
23
|
-
];
|
|
24
|
-
/** What counts as a line in each dimension, and what does not. */
|
|
25
|
-
export const PROFILE_DIMENSION_DEFINITIONS = {
|
|
26
|
-
价值观: '超越具体情境、值得追求的目标(Schwartz)。"想把事做对"算;"这个接口用 POST"不算。',
|
|
27
|
-
工作方式: '面对任务时的稳定做法。"先验证再动手"算;"这次改了 A 文件"不算。',
|
|
28
|
-
沟通偏好: '希望信息以什么形式、什么节奏出现。"整轮对话当整体"算。',
|
|
29
|
-
情绪: '对具体事件的感受与强度。"被反复确认会烦"算;"今天天气"不算。',
|
|
30
|
-
人际关系: '与特定人的位置和距离(温暖 × 支配)。"她最近压力大"算。',
|
|
31
|
-
生活兴趣: '自愿投入时间的事。"喜欢爬山"算。',
|
|
32
|
-
边界: '明确说过的"不要"。没有公认分类学,必须贴着原话,不许概括。',
|
|
33
|
-
};
|
|
34
|
-
export function isProfileDimension(value) {
|
|
35
|
-
return typeof value === 'string' && PROFILE_DIMENSIONS.includes(value);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Render the definitions block both prompts embed.
|
|
39
|
-
*
|
|
40
|
-
* Generated from the declaration above so a new dimension cannot be added to the
|
|
41
|
-
* vocabulary without appearing in the prompt (and vice versa).
|
|
42
|
-
*/
|
|
43
|
-
export function renderDimensionDefinitions() {
|
|
44
|
-
const lines = PROFILE_DIMENSIONS.map((dimension) => `- ${dimension}:${PROFILE_DIMENSION_DEFINITIONS[dimension]}`);
|
|
45
|
-
return `<dimensions>
|
|
46
|
-
每个维度是什么,决定什么算一条、什么不算:
|
|
47
|
-
${lines.join('\n')}
|
|
48
|
-
</dimensions>`;
|
|
49
|
-
}
|
|
50
|
-
/** The "维度=价值观|工作方式|…" line, generated rather than retyped. */
|
|
51
|
-
export function dimensionChoices() {
|
|
52
|
-
return `维度=${PROFILE_DIMENSIONS.join('|')}`;
|
|
53
|
-
}
|