@altnovatrail/contracts 0.0.0-stage → 0.7.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 ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,48 @@
1
- # Temporary Holding Version
1
+ # @altnovatrail/contracts
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The code of [NovaTrail](https://github.com/altnovatrail)'s API contracts for TypeScript: the messages and enums of each contract, with their descriptors, for [protobuf-es](https://github.com/bufbuild/protobuf-es) and Connect. The contracts are the protobuf files under [`contracts/`](https://github.com/altnovatrail/spec/tree/main/contracts) in `altnovatrail/spec`, and their text is [`contracts/README.md`](https://github.com/altnovatrail/spec/blob/main/contracts/README.md). `protoc-gen-es` generates this code from them: JavaScript with its declarations. Go code takes the same contracts from the Go module `github.com/altnovatrail/spec/contracts`, at the tag `contracts/vX.Y.Z` of the same number.
4
+
5
+ Each file of code is exported by its path, the path of its `.proto` file with `_pb.js` in the place of `.proto`:
6
+
7
+ ```ts
8
+ import { create, fromJson, toJson } from "@bufbuild/protobuf";
9
+ import { ObservationSchema, Unreadable } from "@altnovatrail/contracts/novatrail/observation/v1/observation_pb.js";
10
+
11
+ const observation = fromJson(ObservationSchema, json);
12
+ const written = toJson(ObservationSchema, observation, { useProtoFieldName: true });
13
+ ```
14
+
15
+ The code imports the runtime of protobuf-es, `@bufbuild/protobuf`, which the package depends on at the exact version of `protoc-gen-es` that wrote it. Take the runtime at that version too, or let npm install it with the package.
16
+
17
+ JSON of a contract names each field by its protobuf name, in snake case, as the files of `spec` do: whatever writes it passes `useProtoFieldName: true` to `toJson`. A reader takes both the protobuf name and the lowerCamelCase one, as `fromJson` does ([the contracts' text](https://github.com/altnovatrail/spec/blob/main/contracts/README.md), section 6). The package has no types of JSON: `protoc-gen-es` would spell them in lowerCamelCase.
18
+
19
+ The package is read through its `exports`, under `"moduleResolution": "nodenext"`, `"node16"` or `"bundler"`. `spec` checks its declarations with TypeScript 7 under both, strictly, and runs its code under Node.
20
+
21
+ ## Versions
22
+
23
+ The package's version is the tag of the release of `altnovatrail/spec` it comes from, without its `v`: 0.7.0 is `v0.7.0`. Every release from the line 0.7 on carries one, even when the contracts have not changed. Take it at an exact version, the same tag as the `spec` submodule and the Go modules of `spec` you hold, and move all of them together. Leave it out of Dependabot, as the Go modules: a release of `spec` comes out with each change of its documents. Dependabot's `ignore` matches a dependency by the name the manifest gives it, `@altnovatrail/contracts` here, and `github.com/altnovatrail/spec/contracts` for the Go module.
24
+
25
+ Within a contract's package — its last part, `v1` — a release only adds. A change that breaks it comes as a new package, `v2`, beside the old one, in a new line of `spec` ([the contracts' text](https://github.com/altnovatrail/spec/blob/main/contracts/README.md), section 2).
26
+
27
+ ## Checking the archive
28
+
29
+ The archive in npm is the file `altnovatrail-contracts-<version>.tgz` of that release, which the release signs with cosign and whose attestation names it. A NovaTrail repository lets the package into its code only once spec's `release-verify-npm` has accepted its lock file, in CI of the pull request that changes it (decision R77 of spec; [RULES.md](https://github.com/altnovatrail/spec/blob/main/RULES.md), Hard rules). It runs from the repository's `spec` submodule:
30
+
31
+ ```sh
32
+ just -f spec/justfile release-verify-npm package-lock.json
33
+ ```
34
+
35
+ For this package, it downloads the archive from the registry and checks it against Sigstore's trust root and the cosign bundle of the file of the same name in the release of `altnovatrail/spec`. The archive must be signed by spec's own `.github/workflows/release.yml` on `main`, and is tied to its tag by the version its `package.json` holds. Last, the lock file's `integrity` must be the hash of the bytes so checked. A single archive, with its bundle beside it, is checked by `just -f spec/justfile release-verify spec v0.7.0 altnovatrail-contracts-0.7.0.tgz`.
36
+
37
+ The release's attestation ties the archive to the release, not to a commit, and `gh release verify-asset` checks it apart:
38
+
39
+ ```sh
40
+ npm pack @altnovatrail/contracts@0.7.0
41
+ gh release verify-asset v0.7.0 altnovatrail-contracts-0.7.0.tgz -R altnovatrail/spec
42
+ ```
43
+
44
+ The release publishes that file to npm itself, by trusted publishing, and npm gives each version it publishes that way a provenance attestation. The provenance names `.github/workflows/release.yml` of `altnovatrail/spec` and the commit of the run that published it, which is the tip of `main` when the run began rather than always the commit the release was cut from. 0.7.0 was published by hand and has no provenance. A release whose run did not publish its version — one that came out before the release published this package, or one whose publish failed and was not run again — has none in npm, so take a tag whose version is there.
45
+
46
+ ## License
47
+
48
+ [Apache-2.0](https://github.com/altnovatrail/spec/blob/main/LICENSE). The runtime, `@bufbuild/protobuf`, is under Apache-2.0 and BSD-3-Clause.
@@ -0,0 +1,222 @@
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/observation/v1/observation.proto (package novatrail.observation.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // The observation: what AI read in a learner's work, answer slot by answer slot, before any check
6
+ // runs. A reader of `tutor` gives one; `module-kit` joins the observations of two readers into one
7
+ // and gives the verdict on it. What the messages mean, how two observations are joined and which
8
+ // verdict an observation gives are the rules of contracts/README.md, section 10.
9
+
10
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
11
+ import type { Message } from "@bufbuild/protobuf";
12
+
13
+ /**
14
+ * Describes the file novatrail/observation/v1/observation.proto.
15
+ */
16
+ export declare const file_novatrail_observation_v1_observation: GenFile;
17
+
18
+ /**
19
+ * What AI read in a work: one reader's observation, or the one that `module-kit` joins from two.
20
+ *
21
+ * @generated from message novatrail.observation.v1.Observation
22
+ */
23
+ export declare type Observation = Message<"novatrail.observation.v1.Observation"> & {
24
+ /**
25
+ * Every answer slot whose answer AI reads, each once, in the task's order: items by their place,
26
+ * and answer slots by their place in the item. On a handwriting sheet these are the slots bound
27
+ * `anywhere`, `zone` and `sheet`; on a workbook, every box. A slot bound `choice` is tapped, not
28
+ * read, and is not here.
29
+ *
30
+ * @generated from field: repeated novatrail.observation.v1.AnswerSlotObservation answer_slots = 1;
31
+ */
32
+ answerSlots: AnswerSlotObservation[];
33
+ };
34
+
35
+ /**
36
+ * Describes the message novatrail.observation.v1.Observation.
37
+ * Use `create(ObservationSchema)` to create a new message.
38
+ */
39
+ export declare const ObservationSchema: GenMessage<Observation>;
40
+
41
+ /**
42
+ * What was read in one answer slot.
43
+ *
44
+ * @generated from message novatrail.observation.v1.AnswerSlotObservation
45
+ */
46
+ export declare type AnswerSlotObservation = Message<"novatrail.observation.v1.AnswerSlotObservation"> & {
47
+ /**
48
+ * The answer slot.
49
+ *
50
+ * @generated from field: novatrail.observation.v1.AnswerSlotPlace answer_slot = 1;
51
+ */
52
+ answerSlot?: AnswerSlotPlace | undefined;
53
+
54
+ /**
55
+ * What the reading gives: a value, or why it gives none.
56
+ *
57
+ * @generated from oneof novatrail.observation.v1.AnswerSlotObservation.read
58
+ */
59
+ read: {
60
+ /**
61
+ * The value as it is written, never empty: the reader does not normalize it
62
+ * (contracts/README.md, section 10). In a slot bound `sheet`, the text of the essay.
63
+ *
64
+ * @generated from field: string value = 2;
65
+ */
66
+ value: string;
67
+ case: "value";
68
+ } | {
69
+ /**
70
+ * Why the reading gives no value.
71
+ *
72
+ * @generated from field: novatrail.observation.v1.Unreadable unreadable = 3;
73
+ */
74
+ value: Unreadable;
75
+ case: "unreadable";
76
+ } | { case: undefined; value?: undefined };
77
+
78
+ /**
79
+ * Where the value stands on the crop: only in a slot bound `anywhere`, only beside a value, and
80
+ * only when the reader names a valid box. In every other slot the place is the answer slot
81
+ * itself.
82
+ *
83
+ * @generated from field: novatrail.observation.v1.CropBox crop_box = 4;
84
+ */
85
+ cropBox?: CropBox | undefined;
86
+ };
87
+
88
+ /**
89
+ * Describes the message novatrail.observation.v1.AnswerSlotObservation.
90
+ * Use `create(AnswerSlotObservationSchema)` to create a new message.
91
+ */
92
+ export declare const AnswerSlotObservationSchema: GenMessage<AnswerSlotObservation>;
93
+
94
+ /**
95
+ * An answer slot by its place, which has no ID: its item's place among the task's items, and its
96
+ * place among the item's answer slots, each from 1. On a workbook an answer slot is a box.
97
+ *
98
+ * @generated from message novatrail.observation.v1.AnswerSlotPlace
99
+ */
100
+ export declare type AnswerSlotPlace = Message<"novatrail.observation.v1.AnswerSlotPlace"> & {
101
+ /**
102
+ * The item's place among the task's items, from 1.
103
+ *
104
+ * @generated from field: int32 item = 1;
105
+ */
106
+ item: number;
107
+
108
+ /**
109
+ * The answer slot's place among the item's answer slots, from 1.
110
+ *
111
+ * @generated from field: int32 slot = 2;
112
+ */
113
+ slot: number;
114
+ };
115
+
116
+ /**
117
+ * Describes the message novatrail.observation.v1.AnswerSlotPlace.
118
+ * Use `create(AnswerSlotPlaceSchema)` to create a new message.
119
+ */
120
+ export declare const AnswerSlotPlaceSchema: GenMessage<AnswerSlotPlace>;
121
+
122
+ /**
123
+ * A box on the crop the device sent, in whole thousandths of the crop's height and width, from 0
124
+ * to 1000, as [ymin, xmin, ymax, xmax]: ymin < ymax and xmin < xmax (R53).
125
+ *
126
+ * @generated from message novatrail.observation.v1.CropBox
127
+ */
128
+ export declare type CropBox = Message<"novatrail.observation.v1.CropBox"> & {
129
+ /**
130
+ * The top edge, in thousandths of the crop's height.
131
+ *
132
+ * @generated from field: int32 ymin = 1;
133
+ */
134
+ ymin: number;
135
+
136
+ /**
137
+ * The left edge, in thousandths of the crop's width.
138
+ *
139
+ * @generated from field: int32 xmin = 2;
140
+ */
141
+ xmin: number;
142
+
143
+ /**
144
+ * The bottom edge, in thousandths of the crop's height.
145
+ *
146
+ * @generated from field: int32 ymax = 3;
147
+ */
148
+ ymax: number;
149
+
150
+ /**
151
+ * The right edge, in thousandths of the crop's width.
152
+ *
153
+ * @generated from field: int32 xmax = 4;
154
+ */
155
+ xmax: number;
156
+ };
157
+
158
+ /**
159
+ * Describes the message novatrail.observation.v1.CropBox.
160
+ * Use `create(CropBoxSchema)` to create a new message.
161
+ */
162
+ export declare const CropBoxSchema: GenMessage<CropBox>;
163
+
164
+ /**
165
+ * Why a reading gives an answer slot no value. In a slot whose check gives a verdict, each makes
166
+ * the verdict `unreadable`, with the reason named as the value is, in lower case and without its
167
+ * prefix; an essay that is blank or illegible does not reach the assessment by its rubric
168
+ * (contracts/README.md, section 10).
169
+ *
170
+ * @generated from enum novatrail.observation.v1.Unreadable
171
+ */
172
+ export enum Unreadable {
173
+ /**
174
+ * No reason: never sent. An observation that holds it, or a reason its reader does not know, is
175
+ * not valid.
176
+ *
177
+ * @generated from enum value: UNREADABLE_UNSPECIFIED = 0;
178
+ */
179
+ UNSPECIFIED = 0,
180
+
181
+ /**
182
+ * Nothing is written in the slot. On a workbook, a box that sends no crop.
183
+ *
184
+ * @generated from enum value: UNREADABLE_BLANK = 1;
185
+ */
186
+ BLANK = 1,
187
+
188
+ /**
189
+ * Something is written, and it cannot be read.
190
+ *
191
+ * @generated from enum value: UNREADABLE_ILLEGIBLE = 2;
192
+ */
193
+ ILLEGIBLE = 2,
194
+
195
+ /**
196
+ * What is written can be read more than one way: a digit written mirrored, a value with another
197
+ * reading, or two readers who read it differently.
198
+ *
199
+ * @generated from enum value: UNREADABLE_AMBIGUOUS = 3;
200
+ */
201
+ AMBIGUOUS = 3,
202
+
203
+ /**
204
+ * In a slot bound `anywhere`: the work holds no final answer.
205
+ *
206
+ * @generated from enum value: UNREADABLE_NO_FINAL_ANSWER = 4;
207
+ */
208
+ NO_FINAL_ANSWER = 4,
209
+
210
+ /**
211
+ * In a slot bound `anywhere`: the work holds more than one final answer.
212
+ *
213
+ * @generated from enum value: UNREADABLE_SEVERAL_FINAL_ANSWERS = 5;
214
+ */
215
+ SEVERAL_FINAL_ANSWERS = 5,
216
+ }
217
+
218
+ /**
219
+ * Describes the enum novatrail.observation.v1.Unreadable.
220
+ */
221
+ export declare const UnreadableSchema: GenEnum<Unreadable>;
222
+
@@ -0,0 +1,62 @@
1
+ // @generated by protoc-gen-es v2.16.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/observation/v1/observation.proto (package novatrail.observation.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // The observation: what AI read in a learner's work, answer slot by answer slot, before any check
6
+ // runs. A reader of `tutor` gives one; `module-kit` joins the observations of two readers into one
7
+ // and gives the verdict on it. What the messages mean, how two observations are joined and which
8
+ // verdict an observation gives are the rules of contracts/README.md, section 10.
9
+
10
+ import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
11
+
12
+ /**
13
+ * Describes the file novatrail/observation/v1/observation.proto.
14
+ */
15
+ export const file_novatrail_observation_v1_observation = /*@__PURE__*/
16
+ fileDesc("Cipub3ZhdHJhaWwvb2JzZXJ2YXRpb24vdjEvb2JzZXJ2YXRpb24ucHJvdG8SGG5vdmF0cmFpbC5vYnNlcnZhdGlvbi52MSJUCgtPYnNlcnZhdGlvbhJFCgxhbnN3ZXJfc2xvdHMYASADKAsyLy5ub3ZhdHJhaWwub2JzZXJ2YXRpb24udjEuQW5zd2VyU2xvdE9ic2VydmF0aW9uIuEBChVBbnN3ZXJTbG90T2JzZXJ2YXRpb24SPgoLYW5zd2VyX3Nsb3QYASABKAsyKS5ub3ZhdHJhaWwub2JzZXJ2YXRpb24udjEuQW5zd2VyU2xvdFBsYWNlEg8KBXZhbHVlGAIgASgJSAASOgoKdW5yZWFkYWJsZRgDIAEoDjIkLm5vdmF0cmFpbC5vYnNlcnZhdGlvbi52MS5VbnJlYWRhYmxlSAASMwoIY3JvcF9ib3gYBCABKAsyIS5ub3ZhdHJhaWwub2JzZXJ2YXRpb24udjEuQ3JvcEJveEIGCgRyZWFkIi0KD0Fuc3dlclNsb3RQbGFjZRIMCgRpdGVtGAEgASgFEgwKBHNsb3QYAiABKAUiQQoHQ3JvcEJveBIMCgR5bWluGAEgASgFEgwKBHhtaW4YAiABKAUSDAoEeW1heBgDIAEoBRIMCgR4bWF4GAQgASgFKrgBCgpVbnJlYWRhYmxlEhoKFlVOUkVBREFCTEVfVU5TUEVDSUZJRUQQABIUChBVTlJFQURBQkxFX0JMQU5LEAESGAoUVU5SRUFEQUJMRV9JTExFR0lCTEUQAhIYChRVTlJFQURBQkxFX0FNQklHVU9VUxADEh4KGlVOUkVBREFCTEVfTk9fRklOQUxfQU5TV0VSEAQSJAogVU5SRUFEQUJMRV9TRVZFUkFMX0ZJTkFMX0FOU1dFUlMQBUKBAgocY29tLm5vdmF0cmFpbC5vYnNlcnZhdGlvbi52MUIQT2JzZXJ2YXRpb25Qcm90b1ABWk1naXRodWIuY29tL2FsdG5vdmF0cmFpbC9zcGVjL2NvbnRyYWN0cy9ub3ZhdHJhaWwvb2JzZXJ2YXRpb24vdjE7b2JzZXJ2YXRpb252MaICA05PWKoCGE5vdmF0cmFpbC5PYnNlcnZhdGlvbi5WMcoCGE5vdmF0cmFpbFxPYnNlcnZhdGlvblxWMeICJE5vdmF0cmFpbFxPYnNlcnZhdGlvblxWMVxHUEJNZXRhZGF0YeoCGk5vdmF0cmFpbDo6T2JzZXJ2YXRpb246OlYxYgZwcm90bzM");
17
+
18
+ /**
19
+ * Describes the message novatrail.observation.v1.Observation.
20
+ * Use `create(ObservationSchema)` to create a new message.
21
+ */
22
+ export const ObservationSchema = /*@__PURE__*/
23
+ messageDesc(file_novatrail_observation_v1_observation, 0);
24
+
25
+ /**
26
+ * Describes the message novatrail.observation.v1.AnswerSlotObservation.
27
+ * Use `create(AnswerSlotObservationSchema)` to create a new message.
28
+ */
29
+ export const AnswerSlotObservationSchema = /*@__PURE__*/
30
+ messageDesc(file_novatrail_observation_v1_observation, 1);
31
+
32
+ /**
33
+ * Describes the message novatrail.observation.v1.AnswerSlotPlace.
34
+ * Use `create(AnswerSlotPlaceSchema)` to create a new message.
35
+ */
36
+ export const AnswerSlotPlaceSchema = /*@__PURE__*/
37
+ messageDesc(file_novatrail_observation_v1_observation, 2);
38
+
39
+ /**
40
+ * Describes the message novatrail.observation.v1.CropBox.
41
+ * Use `create(CropBoxSchema)` to create a new message.
42
+ */
43
+ export const CropBoxSchema = /*@__PURE__*/
44
+ messageDesc(file_novatrail_observation_v1_observation, 3);
45
+
46
+ /**
47
+ * Describes the enum novatrail.observation.v1.Unreadable.
48
+ */
49
+ export const UnreadableSchema = /*@__PURE__*/
50
+ enumDesc(file_novatrail_observation_v1_observation, 0);
51
+
52
+ /**
53
+ * Why a reading gives an answer slot no value. In a slot whose check gives a verdict, each makes
54
+ * the verdict `unreadable`, with the reason named as the value is, in lower case and without its
55
+ * prefix; an essay that is blank or illegible does not reach the assessment by its rubric
56
+ * (contracts/README.md, section 10).
57
+ *
58
+ * @generated from enum novatrail.observation.v1.Unreadable
59
+ */
60
+ export const Unreadable = /*@__PURE__*/
61
+ tsEnum(UnreadableSchema);
62
+
package/package.json CHANGED
@@ -1,6 +1,25 @@
1
1
  {
2
2
  "name": "@altnovatrail/contracts",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.7.1",
4
+ "description": "The code of NovaTrail's API contracts for TypeScript, which protoc-gen-es generates from their protobuf files: the messages and enums of each contract, with their descriptors, for @bufbuild/protobuf and Connect.",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/altnovatrail/spec.git"
9
+ },
10
+ "type": "module",
11
+ "exports": {
12
+ "./novatrail/observation/v1/observation_pb.js": {
13
+ "types": "./novatrail/observation/v1/observation_pb.d.ts",
14
+ "default": "./novatrail/observation/v1/observation_pb.js"
15
+ },
16
+ "./package.json": "./package.json"
17
+ },
18
+ "files": [
19
+ "novatrail"
20
+ ],
21
+ "sideEffects": false,
22
+ "dependencies": {
23
+ "@bufbuild/protobuf": "2.16.0"
24
+ }
25
+ }