@altnovatrail/contracts 0.18.44 → 0.19.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.
@@ -0,0 +1,70 @@
1
+ // @generated by protoc-gen-es v2.17.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/api/v1/paper.proto (package novatrail.api.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // A task from the learner's paper in the contract between `app` and `api` (R162): the tasks found
6
+ // on the photo of a page, and the attempts of the tasks picked. Each attempt is then checked and
7
+ // hinted by `AttemptService`, its work a `PaperWork`. What each message means, and what `api` keeps
8
+ // of the page and of the attempts, are the rules of contracts/README.md, section 15.
9
+
10
+ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
11
+ import { file_novatrail_api_v1_attempt } from "./attempt_pb.js";
12
+ import { file_novatrail_api_v1_cause } from "./cause_pb.js";
13
+ import { file_novatrail_observation_v1_observation } from "../../observation/v1/observation_pb.js";
14
+
15
+ /**
16
+ * Describes the file novatrail/api/v1/paper.proto.
17
+ */
18
+ export const file_novatrail_api_v1_paper = /*@__PURE__*/
19
+ fileDesc("Chxub3ZhdHJhaWwvYXBpL3YxL3BhcGVyLnByb3RvEhBub3ZhdHJhaWwuYXBpLnYxIp4CChBGaW5kVGFza3NSZXF1ZXN0EhIKCnByb2ZpbGVfaWQYASABKAkSFwoPaWRlbXBvdGVuY3lfa2V5GAIgASgJEg0KBXBob3RvGAMgASgMEikKB293bl9rZXkYBCABKAsyGC5ub3ZhdHJhaWwuYXBpLnYxLk93bktleRIhChRjbG9ja19vZmZzZXRfbWludXRlcxgFIAEoBUgAiAEBEg8KB3JlcXVlc3QYBiABKAkSKgoFZm91bmQYByADKAsyGy5ub3ZhdHJhaWwuYXBpLnYxLlRhc2tGcmFtZRIqCgVkcmF3bhgIIAMoCzIbLm5vdmF0cmFpbC5hcGkudjEuVGFza0ZyYW1lQhcKFV9jbG9ja19vZmZ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iBnByb3RvMw", [file_novatrail_api_v1_attempt, file_novatrail_api_v1_cause, file_novatrail_observation_v1_observation]);
20
+
21
+ /**
22
+ * Describes the message novatrail.api.v1.FindTasksRequest.
23
+ * Use `create(FindTasksRequestSchema)` to create a new message.
24
+ */
25
+ export const FindTasksRequestSchema = /*@__PURE__*/
26
+ messageDesc(file_novatrail_api_v1_paper, 0);
27
+
28
+ /**
29
+ * Describes the message novatrail.api.v1.FindTasksResponse.
30
+ * Use `create(FindTasksResponseSchema)` to create a new message.
31
+ */
32
+ export const FindTasksResponseSchema = /*@__PURE__*/
33
+ messageDesc(file_novatrail_api_v1_paper, 1);
34
+
35
+ /**
36
+ * Describes the message novatrail.api.v1.TaskFrame.
37
+ * Use `create(TaskFrameSchema)` to create a new message.
38
+ */
39
+ export const TaskFrameSchema = /*@__PURE__*/
40
+ messageDesc(file_novatrail_api_v1_paper, 2);
41
+
42
+ /**
43
+ * Describes the message novatrail.api.v1.BeginPaperAttemptsRequest.
44
+ * Use `create(BeginPaperAttemptsRequestSchema)` to create a new message.
45
+ */
46
+ export const BeginPaperAttemptsRequestSchema = /*@__PURE__*/
47
+ messageDesc(file_novatrail_api_v1_paper, 3);
48
+
49
+ /**
50
+ * Describes the message novatrail.api.v1.BeginPaperAttemptsResponse.
51
+ * Use `create(BeginPaperAttemptsResponseSchema)` to create a new message.
52
+ */
53
+ export const BeginPaperAttemptsResponseSchema = /*@__PURE__*/
54
+ messageDesc(file_novatrail_api_v1_paper, 4);
55
+
56
+ /**
57
+ * The requests of a task from paper, from a learner's session: each method is a learning request,
58
+ * with the right `can_learn`, open to every profile. Every method carries the token of the sign-in
59
+ * service and may get the refusals of every request with a token, which the comment of
60
+ * `AccountService` names with what `app` does on each; a profile that is not the account's gets
61
+ * `CAUSE_NO_PROFILE`, a request of a profile whose consent is not confirmed `CAUSE_NO_CONSENT`, one
62
+ * of a profile whose age is to be given again `CAUSE_AGE_NEEDED`, and a request whose form the
63
+ * contract refuses the code `invalid_argument` with no `Refusal`. The server keeps no photo and no
64
+ * crop, not even as a stored work (R09; R113).
65
+ *
66
+ * @generated from service novatrail.api.v1.PaperService
67
+ */
68
+ export const PaperService = /*@__PURE__*/
69
+ serviceDesc(file_novatrail_api_v1_paper, 0);
70
+
@@ -412,8 +412,10 @@ export declare const WorkService: GenService<{
412
412
  * image does not know the attempt's package digest, whatever work of the attempt was kept before,
413
413
  * and `CAUSE_VERSION_NOT_GIVEN` when the attempt's version is out of the window of formats that
414
414
  * `api` reads and no work of the attempt was kept before, so that its kind cannot be known; a
415
- * withdrawn version, which the image still holds, gives the kind by its task. On each refusal
416
- * `api` keeps nothing of the work, and `app` keeps it on the device alone.
415
+ * withdrawn version, which the image still holds, gives the kind by its task. An attempt of a
416
+ * task from paper gets `invalid_argument`: its work is never a stored work, and stays in the
417
+ * profile's history on the device (R162). On each refusal `api` keeps nothing of the work, and
418
+ * `app` keeps it on the device alone.
417
419
  *
418
420
  * @generated from rpc novatrail.api.v1.WorkService.PutWork
419
421
  */
@@ -0,0 +1,213 @@
1
+ // @generated by protoc-gen-es v2.17.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/paper/v1/key.proto (package novatrail.paper.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // The key of a task from the learner's paper (R162): the answer a program compares the reading of
6
+ // the work with, and where it came from. `tutor` gives an answer of AI, the solver of `module-kit`
7
+ // gives one from the formula AI read of the statement, and `api` keeps the key on the attempt while
8
+ // it is open; it never reaches the device (R05). The formula, the solver, the key and the verdict
9
+ // by it are the rules of contracts/README.md, section 16.
10
+
11
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
12
+ import type { Message } from "@bufbuild/protobuf";
13
+
14
+ /**
15
+ * Describes the file novatrail/paper/v1/key.proto.
16
+ */
17
+ export declare const file_novatrail_paper_v1_key: GenFile;
18
+
19
+ /**
20
+ * An answer of a task from paper: a number or an option, of the check kinds `number` and `choice`
21
+ * of the module format (section 15 of its text).
22
+ *
23
+ * @generated from message novatrail.paper.v1.Answer
24
+ */
25
+ export declare type Answer = Message<"novatrail.paper.v1.Answer"> & {
26
+ /**
27
+ * The kind of the answer and what it holds.
28
+ *
29
+ * @generated from oneof novatrail.paper.v1.Answer.kind
30
+ */
31
+ kind: {
32
+ /**
33
+ * A number.
34
+ *
35
+ * @generated from field: novatrail.paper.v1.Number number = 1;
36
+ */
37
+ value: Number;
38
+ case: "number";
39
+ } | {
40
+ /**
41
+ * An option of the ones the statement prints.
42
+ *
43
+ * @generated from field: novatrail.paper.v1.Choice choice = 2;
44
+ */
45
+ value: Choice;
46
+ case: "choice";
47
+ } | { case: undefined; value?: undefined };
48
+ };
49
+
50
+ /**
51
+ * Describes the message novatrail.paper.v1.Answer.
52
+ * Use `create(AnswerSchema)` to create a new message.
53
+ */
54
+ export declare const AnswerSchema: GenMessage<Answer>;
55
+
56
+ /**
57
+ * An answer that is a number.
58
+ *
59
+ * @generated from message novatrail.paper.v1.Number
60
+ */
61
+ export declare type Number = Message<"novatrail.paper.v1.Number"> & {
62
+ /**
63
+ * The number, in the notation of the check kind `number`: an integer, a decimal with a point or a
64
+ * simple fraction, at most 16 characters, such as "7", "-3", "2.5" or "3/4".
65
+ *
66
+ * @generated from field: string value = 1;
67
+ */
68
+ value: string;
69
+
70
+ /**
71
+ * The words that may follow the number in the answer, as "cm" and "centimetres" in "12 cm", as
72
+ * the `units` of the check kind `number`; none when the answer takes none.
73
+ *
74
+ * @generated from field: repeated string units = 2;
75
+ */
76
+ units: string[];
77
+
78
+ /**
79
+ * The letter of the unknown, such as "x", when the learner may write the answer as "x = 4"; empty
80
+ * otherwise.
81
+ *
82
+ * @generated from field: string unknown = 3;
83
+ */
84
+ unknown: string;
85
+ };
86
+
87
+ /**
88
+ * Describes the message novatrail.paper.v1.Number.
89
+ * Use `create(NumberSchema)` to create a new message.
90
+ */
91
+ export declare const NumberSchema: GenMessage<Number>;
92
+
93
+ /**
94
+ * An answer that is one of the options the statement prints.
95
+ *
96
+ * @generated from message novatrail.paper.v1.Choice
97
+ */
98
+ export declare type Choice = Message<"novatrail.paper.v1.Choice"> & {
99
+ /**
100
+ * The labels of the options as the statement prints them, without their brackets, such as "A",
101
+ * "B", "C" and "D", in the statement's order.
102
+ *
103
+ * @generated from field: repeated string options = 1;
104
+ */
105
+ options: string[];
106
+
107
+ /**
108
+ * The label of the right option, one of `options`.
109
+ *
110
+ * @generated from field: string key = 2;
111
+ */
112
+ key: string;
113
+ };
114
+
115
+ /**
116
+ * Describes the message novatrail.paper.v1.Choice.
117
+ * Use `create(ChoiceSchema)` to create a new message.
118
+ */
119
+ export declare const ChoiceSchema: GenMessage<Choice>;
120
+
121
+ /**
122
+ * The key of an attempt of a task from paper, which `api` keeps on the attempt while it is open:
123
+ * the tasks the reading of the statement found on the crop, as each of a column of sums framed
124
+ * together, each with its own key.
125
+ *
126
+ * @generated from message novatrail.paper.v1.Key
127
+ */
128
+ export declare type Key = Message<"novatrail.paper.v1.Key"> & {
129
+ /**
130
+ * The tasks on the crop, from 1 to 20, in the order of the page: top to bottom, and left to
131
+ * right in a row. The task at the place n is the item n of the attempt's submissions.
132
+ *
133
+ * @generated from field: repeated novatrail.paper.v1.TaskKey tasks = 1;
134
+ */
135
+ tasks: TaskKey[];
136
+ };
137
+
138
+ /**
139
+ * Describes the message novatrail.paper.v1.Key.
140
+ * Use `create(KeySchema)` to create a new message.
141
+ */
142
+ export declare const KeySchema: GenMessage<Key>;
143
+
144
+ /**
145
+ * One task on the crop of a task from paper, and its key.
146
+ *
147
+ * @generated from message novatrail.paper.v1.TaskKey
148
+ */
149
+ export declare type TaskKey = Message<"novatrail.paper.v1.TaskKey"> & {
150
+ /**
151
+ * The task as the page prints it, at most 200 bytes of UTF-8, as "□ − 3 = 7": the reading of the
152
+ * work is given it, to tell which task each answer is of. It is the printed statement alone,
153
+ * never the learner's writing.
154
+ *
155
+ * @generated from field: string statement = 1;
156
+ */
157
+ statement: string;
158
+
159
+ /**
160
+ * Where the key came from; not given when the task has none.
161
+ *
162
+ * @generated from field: novatrail.paper.v1.Provenance provenance = 2;
163
+ */
164
+ provenance: Provenance;
165
+
166
+ /**
167
+ * The answer, or none when the task has no one answer a program can compare: its item is
168
+ * unchecked, and with no answer in any task every submission gets the outcome `CAUSE_NO_KEY`.
169
+ *
170
+ * @generated from field: novatrail.paper.v1.Answer answer = 3;
171
+ */
172
+ answer?: Answer | undefined;
173
+ };
174
+
175
+ /**
176
+ * Describes the message novatrail.paper.v1.TaskKey.
177
+ * Use `create(TaskKeySchema)` to create a new message.
178
+ */
179
+ export declare const TaskKeySchema: GenMessage<TaskKey>;
180
+
181
+ /**
182
+ * Where a key of a task from paper came from (concepts 9.4).
183
+ *
184
+ * @generated from enum novatrail.paper.v1.Provenance
185
+ */
186
+ export enum Provenance {
187
+ /**
188
+ * Not given: no key has it.
189
+ *
190
+ * @generated from enum value: PROVENANCE_UNSPECIFIED = 0;
191
+ */
192
+ UNSPECIFIED = 0,
193
+
194
+ /**
195
+ * The solver of `module-kit` computed it from the formula AI read of the statement.
196
+ *
197
+ * @generated from enum value: PROVENANCE_SOLVER = 1;
198
+ */
199
+ SOLVER = 1,
200
+
201
+ /**
202
+ * AI derived it, by solving the task from its crop.
203
+ *
204
+ * @generated from enum value: PROVENANCE_AI = 2;
205
+ */
206
+ AI = 2,
207
+ }
208
+
209
+ /**
210
+ * Describes the enum novatrail.paper.v1.Provenance.
211
+ */
212
+ export declare const ProvenanceSchema: GenEnum<Provenance>;
213
+
@@ -0,0 +1,67 @@
1
+ // @generated by protoc-gen-es v2.17.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/paper/v1/key.proto (package novatrail.paper.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // The key of a task from the learner's paper (R162): the answer a program compares the reading of
6
+ // the work with, and where it came from. `tutor` gives an answer of AI, the solver of `module-kit`
7
+ // gives one from the formula AI read of the statement, and `api` keeps the key on the attempt while
8
+ // it is open; it never reaches the device (R05). The formula, the solver, the key and the verdict
9
+ // by it are the rules of contracts/README.md, section 16.
10
+
11
+ import { enumDesc, fileDesc, messageDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
12
+
13
+ /**
14
+ * Describes the file novatrail/paper/v1/key.proto.
15
+ */
16
+ export const file_novatrail_paper_v1_key = /*@__PURE__*/
17
+ fileDesc("Chxub3ZhdHJhaWwvcGFwZXIvdjEva2V5LnByb3RvEhJub3ZhdHJhaWwucGFwZXIudjEibAoGQW5zd2VyEiwKBm51bWJlchgBIAEoCzIaLm5vdmF0cmFpbC5wYXBlci52MS5OdW1iZXJIABIsCgZjaG9pY2UYAiABKAsyGi5ub3ZhdHJhaWwucGFwZXIudjEuQ2hvaWNlSABCBgoEa2luZCI3CgZOdW1iZXISDQoFdmFsdWUYASABKAkSDQoFdW5pdHMYAiADKAkSDwoHdW5rbm93bhgDIAEoCSImCgZDaG9pY2USDwoHb3B0aW9ucxgBIAMoCRILCgNrZXkYAiABKAkiMQoDS2V5EioKBXRhc2tzGAEgAygLMhsubm92YXRyYWlsLnBhcGVyLnYxLlRhc2tLZXkifAoHVGFza0tleRIRCglzdGF0ZW1lbnQYASABKAkSMgoKcHJvdmVuYW5jZRgCIAEoDjIeLm5vdmF0cmFpbC5wYXBlci52MS5Qcm92ZW5hbmNlEioKBmFuc3dlchgDIAEoCzIaLm5vdmF0cmFpbC5wYXBlci52MS5BbnN3ZXIqUgoKUHJvdmVuYW5jZRIaChZQUk9WRU5BTkNFX1VOU1BFQ0lGSUVEEAASFQoRUFJPVkVOQU5DRV9TT0xWRVIQARIRCg1QUk9WRU5BTkNFX0FJEAJCzwEKFmNvbS5ub3ZhdHJhaWwucGFwZXIudjFCCEtleVByb3RvUAFaQWdpdGh1Yi5jb20vYWx0bm92YXRyYWlsL3NwZWMvY29udHJhY3RzL25vdmF0cmFpbC9wYXBlci92MTtwYXBlcnYxogIDTlBYqgISTm92YXRyYWlsLlBhcGVyLlYxygISTm92YXRyYWlsXFBhcGVyXFYx4gIeTm92YXRyYWlsXFBhcGVyXFYxXEdQQk1ldGFkYXRh6gIUTm92YXRyYWlsOjpQYXBlcjo6VjFiBnByb3RvMw");
18
+
19
+ /**
20
+ * Describes the message novatrail.paper.v1.Answer.
21
+ * Use `create(AnswerSchema)` to create a new message.
22
+ */
23
+ export const AnswerSchema = /*@__PURE__*/
24
+ messageDesc(file_novatrail_paper_v1_key, 0);
25
+
26
+ /**
27
+ * Describes the message novatrail.paper.v1.Number.
28
+ * Use `create(NumberSchema)` to create a new message.
29
+ */
30
+ export const NumberSchema = /*@__PURE__*/
31
+ messageDesc(file_novatrail_paper_v1_key, 1);
32
+
33
+ /**
34
+ * Describes the message novatrail.paper.v1.Choice.
35
+ * Use `create(ChoiceSchema)` to create a new message.
36
+ */
37
+ export const ChoiceSchema = /*@__PURE__*/
38
+ messageDesc(file_novatrail_paper_v1_key, 2);
39
+
40
+ /**
41
+ * Describes the message novatrail.paper.v1.Key.
42
+ * Use `create(KeySchema)` to create a new message.
43
+ */
44
+ export const KeySchema = /*@__PURE__*/
45
+ messageDesc(file_novatrail_paper_v1_key, 3);
46
+
47
+ /**
48
+ * Describes the message novatrail.paper.v1.TaskKey.
49
+ * Use `create(TaskKeySchema)` to create a new message.
50
+ */
51
+ export const TaskKeySchema = /*@__PURE__*/
52
+ messageDesc(file_novatrail_paper_v1_key, 4);
53
+
54
+ /**
55
+ * Describes the enum novatrail.paper.v1.Provenance.
56
+ */
57
+ export const ProvenanceSchema = /*@__PURE__*/
58
+ enumDesc(file_novatrail_paper_v1_key, 0);
59
+
60
+ /**
61
+ * Where a key of a task from paper came from (concepts 9.4).
62
+ *
63
+ * @generated from enum novatrail.paper.v1.Provenance
64
+ */
65
+ export const Provenance = /*@__PURE__*/
66
+ tsEnum(ProvenanceSchema);
67
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altnovatrail/contracts",
3
- "version": "0.18.44",
3
+ "version": "0.19.1",
4
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
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -21,6 +21,10 @@
21
21
  "types": "./novatrail/api/v1/cause_pb.d.ts",
22
22
  "default": "./novatrail/api/v1/cause_pb.js"
23
23
  },
24
+ "./novatrail/api/v1/debug_pb.js": {
25
+ "types": "./novatrail/api/v1/debug_pb.d.ts",
26
+ "default": "./novatrail/api/v1/debug_pb.js"
27
+ },
24
28
  "./novatrail/api/v1/learning_pb.js": {
25
29
  "types": "./novatrail/api/v1/learning_pb.d.ts",
26
30
  "default": "./novatrail/api/v1/learning_pb.js"
@@ -37,6 +41,10 @@
37
41
  "types": "./novatrail/api/v1/package_pb.d.ts",
38
42
  "default": "./novatrail/api/v1/package_pb.js"
39
43
  },
44
+ "./novatrail/api/v1/paper_pb.js": {
45
+ "types": "./novatrail/api/v1/paper_pb.d.ts",
46
+ "default": "./novatrail/api/v1/paper_pb.js"
47
+ },
40
48
  "./novatrail/api/v1/progress_pb.js": {
41
49
  "types": "./novatrail/api/v1/progress_pb.d.ts",
42
50
  "default": "./novatrail/api/v1/progress_pb.js"
@@ -57,6 +65,10 @@
57
65
  "types": "./novatrail/observation/v1/observation_pb.d.ts",
58
66
  "default": "./novatrail/observation/v1/observation_pb.js"
59
67
  },
68
+ "./novatrail/paper/v1/key_pb.js": {
69
+ "types": "./novatrail/paper/v1/key_pb.d.ts",
70
+ "default": "./novatrail/paper/v1/key_pb.js"
71
+ },
60
72
  "./vectors/eval/v1/boxes.json": "./vectors/eval/v1/boxes.json",
61
73
  "./vectors/eval/v1/crops.json": "./vectors/eval/v1/crops.json",
62
74
  "./vectors/eval/v1/groups.json": "./vectors/eval/v1/groups.json",