@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,188 @@
1
+ // @generated by protoc-gen-es v2.17.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file novatrail/api/v1/debug.proto (package novatrail.api.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ // The debug mode of a local run in the contract between `app` and `api` (R163): which models serve
6
+ // the calls of AI of a task from paper, past the admission list, and what each call returned and
7
+ // cost. `api` serves it only with its debug flag, which a deployment refuses; anywhere else each
8
+ // method answers `unimplemented`, and `app` shows no debug button. Its rules are
9
+ // contracts/README.md, section 15.
10
+
11
+ import { enumDesc, fileDesc, messageDesc, serviceDesc, tsEnum } from "@bufbuild/protobuf/codegenv2";
12
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
13
+ import { file_novatrail_api_v1_attempt } from "./attempt_pb.js";
14
+ import { file_novatrail_api_v1_cause } from "./cause_pb.js";
15
+ import { file_novatrail_paper_v1_key } from "../../paper/v1/key_pb.js";
16
+
17
+ /**
18
+ * Describes the file novatrail/api/v1/debug.proto.
19
+ */
20
+ export const file_novatrail_api_v1_debug = /*@__PURE__*/
21
+ fileDesc("Chxub3ZhdHJhaWwvYXBpL3YxL2RlYnVnLnByb3RvEhBub3ZhdHJhaWwuYXBpLnYxIhEKD0dldERlYnVnUmVxdWVzdCKiAQoQR2V0RGVidWdSZXNwb25zZRIsCgZtb2RlbHMYASADKAsyHC5ub3ZhdHJhaWwuYXBpLnYxLkRlYnVnTW9kZWwSLQoGY2hvaWNlGAIgASgLMh0ubm92YXRyYWlsLmFwaS52MS5EZWJ1Z0Nob2ljZRIxCghhZG1pdHRlZBgDIAMoCzIfLm5vdmF0cmFpbC5hcGkudjEuRGVidWdBZG1pdHRlZCJxCg1EZWJ1Z0FkbWl0dGVkEi0KBGtpbmQYASABKA4yHy5ub3ZhdHJha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FEAMSGwoXREVCVUdfT1VUQ09NRV9VTkNIRUNLRUQQBDKrAgoMRGVidWdTZXJ2aWNlElEKCEdldERlYnVnEiEubm92YXRyYWlsLmFwaS52MS5HZXREZWJ1Z1JlcXVlc3QaIi5ub3ZhdHJhaWwuYXBpLnYxLkdldERlYnVnUmVzcG9uc2USYwoOU2V0RGVidWdNb2RlbHMSJy5ub3ZhdHJhaWwuYXBpLnYxLlNldERlYnVnTW9kZWxzUmVxdWVzdBooLm5vdmF0cmFpbC5hcGkudjEuU2V0RGVidWdNb2RlbHNSZXNwb25zZRJjCg5UYWtlRGVidWdDYWxscxInLm5vdmF0cmFpbC5hcGkudjEuVGFrZURlYnVnQ2FsbHNSZXF1ZXN0Gigubm92YXRyYWlsLmFwaS52MS5UYWtlRGVidWdDYWxsc1Jlc3BvbnNlQsMBChRjb20ubm92YXRyYWlsLmFwaS52MUIKRGVidWdQcm90b1ABWj1naXRodWIuY29tL2FsdG5vdmF0cmFpbC9zcGVjL2NvbnRyYWN0cy9ub3ZhdHJhaWwvYXBpL3YxO2FwaXYxogIDTkFYqgIQTm92YXRyYWlsLkFwaS5WMcoCEE5vdmF0cmFpbFxBcGlcVjHiAhxOb3ZhdHJhaWxcQXBpXFYxXEdQQk1ldGFkYXRh6gISTm92YXRyYWlsOjpBcGk6OlYxYgZwcm90bzM", [file_google_protobuf_timestamp, file_novatrail_api_v1_attempt, file_novatrail_api_v1_cause, file_novatrail_paper_v1_key]);
22
+
23
+ /**
24
+ * Describes the message novatrail.api.v1.GetDebugRequest.
25
+ * Use `create(GetDebugRequestSchema)` to create a new message.
26
+ */
27
+ export const GetDebugRequestSchema = /*@__PURE__*/
28
+ messageDesc(file_novatrail_api_v1_debug, 0);
29
+
30
+ /**
31
+ * Describes the message novatrail.api.v1.GetDebugResponse.
32
+ * Use `create(GetDebugResponseSchema)` to create a new message.
33
+ */
34
+ export const GetDebugResponseSchema = /*@__PURE__*/
35
+ messageDesc(file_novatrail_api_v1_debug, 1);
36
+
37
+ /**
38
+ * Describes the message novatrail.api.v1.DebugAdmitted.
39
+ * Use `create(DebugAdmittedSchema)` to create a new message.
40
+ */
41
+ export const DebugAdmittedSchema = /*@__PURE__*/
42
+ messageDesc(file_novatrail_api_v1_debug, 2);
43
+
44
+ /**
45
+ * Describes the message novatrail.api.v1.DebugModel.
46
+ * Use `create(DebugModelSchema)` to create a new message.
47
+ */
48
+ export const DebugModelSchema = /*@__PURE__*/
49
+ messageDesc(file_novatrail_api_v1_debug, 3);
50
+
51
+ /**
52
+ * Describes the message novatrail.api.v1.DebugChoice.
53
+ * Use `create(DebugChoiceSchema)` to create a new message.
54
+ */
55
+ export const DebugChoiceSchema = /*@__PURE__*/
56
+ messageDesc(file_novatrail_api_v1_debug, 4);
57
+
58
+ /**
59
+ * Describes the message novatrail.api.v1.DebugModelChoice.
60
+ * Use `create(DebugModelChoiceSchema)` to create a new message.
61
+ */
62
+ export const DebugModelChoiceSchema = /*@__PURE__*/
63
+ messageDesc(file_novatrail_api_v1_debug, 5);
64
+
65
+ /**
66
+ * Describes the message novatrail.api.v1.SetDebugModelsRequest.
67
+ * Use `create(SetDebugModelsRequestSchema)` to create a new message.
68
+ */
69
+ export const SetDebugModelsRequestSchema = /*@__PURE__*/
70
+ messageDesc(file_novatrail_api_v1_debug, 6);
71
+
72
+ /**
73
+ * Describes the message novatrail.api.v1.SetDebugModelsResponse.
74
+ * Use `create(SetDebugModelsResponseSchema)` to create a new message.
75
+ */
76
+ export const SetDebugModelsResponseSchema = /*@__PURE__*/
77
+ messageDesc(file_novatrail_api_v1_debug, 7);
78
+
79
+ /**
80
+ * Describes the message novatrail.api.v1.TakeDebugCallsRequest.
81
+ * Use `create(TakeDebugCallsRequestSchema)` to create a new message.
82
+ */
83
+ export const TakeDebugCallsRequestSchema = /*@__PURE__*/
84
+ messageDesc(file_novatrail_api_v1_debug, 8);
85
+
86
+ /**
87
+ * Describes the message novatrail.api.v1.TakeDebugCallsResponse.
88
+ * Use `create(TakeDebugCallsResponseSchema)` to create a new message.
89
+ */
90
+ export const TakeDebugCallsResponseSchema = /*@__PURE__*/
91
+ messageDesc(file_novatrail_api_v1_debug, 9);
92
+
93
+ /**
94
+ * Describes the message novatrail.api.v1.DebugAction.
95
+ * Use `create(DebugActionSchema)` to create a new message.
96
+ */
97
+ export const DebugActionSchema = /*@__PURE__*/
98
+ messageDesc(file_novatrail_api_v1_debug, 10);
99
+
100
+ /**
101
+ * Describes the message novatrail.api.v1.DebugCall.
102
+ * Use `create(DebugCallSchema)` to create a new message.
103
+ */
104
+ export const DebugCallSchema = /*@__PURE__*/
105
+ messageDesc(file_novatrail_api_v1_debug, 11);
106
+
107
+ /**
108
+ * Describes the message novatrail.api.v1.DebugCase.
109
+ * Use `create(DebugCaseSchema)` to create a new message.
110
+ */
111
+ export const DebugCaseSchema = /*@__PURE__*/
112
+ messageDesc(file_novatrail_api_v1_debug, 12);
113
+
114
+ /**
115
+ * Describes the message novatrail.api.v1.DebugTask.
116
+ * Use `create(DebugTaskSchema)` to create a new message.
117
+ */
118
+ export const DebugTaskSchema = /*@__PURE__*/
119
+ messageDesc(file_novatrail_api_v1_debug, 13);
120
+
121
+ /**
122
+ * Describes the enum novatrail.api.v1.DebugEffort.
123
+ */
124
+ export const DebugEffortSchema = /*@__PURE__*/
125
+ enumDesc(file_novatrail_api_v1_debug, 0);
126
+
127
+ /**
128
+ * The effort of a call, as the provider names it.
129
+ *
130
+ * @generated from enum novatrail.api.v1.DebugEffort
131
+ */
132
+ export const DebugEffort = /*@__PURE__*/
133
+ tsEnum(DebugEffortSchema);
134
+
135
+ /**
136
+ * Describes the enum novatrail.api.v1.DebugActionKind.
137
+ */
138
+ export const DebugActionKindSchema = /*@__PURE__*/
139
+ enumDesc(file_novatrail_api_v1_debug, 1);
140
+
141
+ /**
142
+ * Which request of a task from paper.
143
+ *
144
+ * @generated from enum novatrail.api.v1.DebugActionKind
145
+ */
146
+ export const DebugActionKind = /*@__PURE__*/
147
+ tsEnum(DebugActionKindSchema);
148
+
149
+ /**
150
+ * Describes the enum novatrail.api.v1.DebugCallKind.
151
+ */
152
+ export const DebugCallKindSchema = /*@__PURE__*/
153
+ enumDesc(file_novatrail_api_v1_debug, 2);
154
+
155
+ /**
156
+ * What a call does.
157
+ *
158
+ * @generated from enum novatrail.api.v1.DebugCallKind
159
+ */
160
+ export const DebugCallKind = /*@__PURE__*/
161
+ tsEnum(DebugCallKindSchema);
162
+
163
+ /**
164
+ * Describes the enum novatrail.api.v1.DebugOutcome.
165
+ */
166
+ export const DebugOutcomeSchema = /*@__PURE__*/
167
+ enumDesc(file_novatrail_api_v1_debug, 3);
168
+
169
+ /**
170
+ * The verdict a case of the debug mode should get, as the set of a task from paper names it.
171
+ *
172
+ * @generated from enum novatrail.api.v1.DebugOutcome
173
+ */
174
+ export const DebugOutcome = /*@__PURE__*/
175
+ tsEnum(DebugOutcomeSchema);
176
+
177
+ /**
178
+ * The debug mode, from a session of the account on a local run. Every method carries the token of
179
+ * the sign-in service and may get the refusals of every request with a token, which the comment of
180
+ * `AccountService` names; it needs the account of the token alone. The choice and the calls are the
181
+ * account's, in the memory of the process of `api`, and go with it: `api` writes neither to its
182
+ * log nor to its database.
183
+ *
184
+ * @generated from service novatrail.api.v1.DebugService
185
+ */
186
+ export const DebugService = /*@__PURE__*/
187
+ serviceDesc(file_novatrail_api_v1_debug, 0);
188
+
@@ -47,10 +47,10 @@ export declare type ChooseNextRequest = Message<"novatrail.api.v1.ChooseNextRequ
47
47
  skill: string;
48
48
 
49
49
  /**
50
- * The provider of the learner's own key, by its code in the admission table, without the key: with
51
- * a profile of its owner that checks the tasks by its own key, so that `api` judges the engine's
52
- * pool, and a choice of nothing, by that route, as `BeginAttempt` by the same route would begin a
53
- * task, though the request calls no AI. Empty on platform AI (R84; R99).
50
+ * The provider of the learner's own key, by its code in the admission table, without the key:
51
+ * with a profile of its owner that checks the tasks by its own key, so that `api` judges the
52
+ * engine's pool, and a choice of nothing, by that route, as `BeginAttempt` by the same route
53
+ * would begin a task, though the request calls no AI. Empty on platform AI (R84; R99).
54
54
  *
55
55
  * @generated from field: string own_key_provider = 4;
56
56
  */
@@ -423,10 +423,10 @@ export declare type OpenLessonRequest = Message<"novatrail.api.v1.OpenLessonRequ
423
423
  choiceId: string;
424
424
 
425
425
  /**
426
- * The provider of the learner's own key, by its code in the admission table, without the key: with
427
- * a profile of its owner that checks the tasks by its own key, so that an engine's choice that a
428
- * refusal `CAUSE_RUN_ENDED` gives goes by that route, though the request calls no AI. Empty on
429
- * platform AI (R84; R99).
426
+ * The provider of the learner's own key, by its code in the admission table, without the key:
427
+ * with a profile of its owner that checks the tasks by its own key, so that an engine's choice
428
+ * that a refusal `CAUSE_RUN_ENDED` gives goes by that route, though the request calls no AI.
429
+ * Empty on platform AI (R84; R99).
430
430
  *
431
431
  * @generated from field: string own_key_provider = 3;
432
432
  */
@@ -480,10 +480,10 @@ export declare type GetLessonRunRequest = Message<"novatrail.api.v1.GetLessonRun
480
480
  lessonRunId: string;
481
481
 
482
482
  /**
483
- * The provider of the learner's own key, by its code in the admission table, without the key: with
484
- * a profile of its owner that checks the tasks by its own key, so that an engine's choice that a
485
- * refusal `CAUSE_RUN_ENDED` gives goes by that route, though the request calls no AI. Empty on
486
- * platform AI (R84; R99).
483
+ * The provider of the learner's own key, by its code in the admission table, without the key:
484
+ * with a profile of its owner that checks the tasks by its own key, so that an engine's choice
485
+ * that a refusal `CAUSE_RUN_ENDED` gives goes by that route, though the request calls no AI.
486
+ * Empty on platform AI (R84; R99).
487
487
  *
488
488
  * @generated from field: string own_key_provider = 3;
489
489
  */
@@ -588,10 +588,10 @@ export declare type CompleteLessonRequest = Message<"novatrail.api.v1.CompleteLe
588
588
  lessonRunId: string;
589
589
 
590
590
  /**
591
- * The provider of the learner's own key, by its code in the admission table, without the key: with
592
- * a profile of its owner that checks the tasks by its own key, so that the engine's choice that
593
- * the end of the run gives goes by that route, though the request calls no AI. Empty on platform
594
- * AI (R84; R99).
591
+ * The provider of the learner's own key, by its code in the admission table, without the key:
592
+ * with a profile of its owner that checks the tasks by its own key, so that the engine's choice
593
+ * that the end of the run gives goes by that route, though the request calls no AI. Empty on
594
+ * platform AI (R84; R99).
595
595
  *
596
596
  * @generated from field: string own_key_provider = 3;
597
597
  */
@@ -693,27 +693,29 @@ export declare const LessonRunRefSchema: GenMessage<LessonRunRef>;
693
693
  * `app` does on each; a profile that is not the account's gets `CAUSE_NO_PROFILE`, a request of a
694
694
  * profile whose consent is not confirmed `CAUSE_NO_CONSENT`, one of a profile whose age is to be
695
695
  * given again `CAUSE_AGE_NEEDED`, and a request whose form the contract refuses the code
696
- * `invalid_argument` with no `Refusal`. A profile has one open attempt: a new one closes the one
697
- * before `CLOSE_REASON_LEFT`. A lesson run goes on the package it began on, and every attempt of
698
- * its task segments too. `app` keeps the place in a lesson and the state of its demos by the key
699
- * "lesson's full ID, package digest", beside the ID of the run: the state of another run under the
700
- * same key it drops, and it erases the state of the lesson at every end of the run, in an answer
701
- * or in a refusal. An engine's choice that an answer or a refusal gives goes by the route to AI that
702
- * the request names, the own key's by `own_key_provider` or platform AI's without it, so that it
703
- * gives nothing that `BeginAttempt` by the same route would refuse; a profile not of the category
704
- * `adult` that names a provider gets `CAUSE_KEY_NOT_FOR_PROFILE` (R84; R99).
696
+ * `invalid_argument` with no `Refusal`. A profile has one open attempt of a task of a module: a new
697
+ * one closes the one before `CLOSE_REASON_LEFT`, and leaves as they are the open attempts of tasks
698
+ * from paper, which `PaperService` begins (R162). A lesson run goes on the package it began on, and
699
+ * every attempt of its task segments too. `app` keeps the place in a lesson and the state of its
700
+ * demos by the key "lesson's full ID, package digest", beside the ID of the run: the state of
701
+ * another run under the same key it drops, and it erases the state of the lesson at every end of
702
+ * the run, in an answer or in a refusal. An engine's choice that an answer or a refusal gives goes
703
+ * by the route to AI that the request names, the own key's by `own_key_provider` or platform AI's
704
+ * without it, so that it gives nothing that `BeginAttempt` by the same route would refuse; a
705
+ * profile not of the category `adult` that names a provider gets `CAUSE_KEY_NOT_FOR_PROFILE` (R84;
706
+ * R99).
705
707
  *
706
708
  * @generated from service novatrail.api.v1.LearningService
707
709
  */
708
710
  export declare const LearningService: GenService<{
709
711
  /**
710
712
  * "Something else": the engine's choice of what comes next, outside a lesson or in place of one,
711
- * when the learner asks for it, or when nothing is open. It closes the open attempt
712
- * `CLOSE_REASON_LEFT`, and `app` warns beforehand that the attempt cannot be gone back to. The
713
- * choice gives a lesson or a task, or nothing, with the outcome that says why, by the route the
714
- * request names. Refusals: `CAUSE_NOT_FOUND`, a skill named that no module connected has,
715
- * `CAUSE_KEY_NOT_FOR_PROFILE`, `CAUSE_KEY_ALREADY_USED` and `CAUSE_STILL_GOING`. A repeat with
716
- * the same idempotency key gets the same choice.
713
+ * when the learner asks for it, or when nothing is open. It closes the open attempt of a task of
714
+ * a module `CLOSE_REASON_LEFT`, and `app` warns beforehand that the attempt cannot be gone back
715
+ * to. The choice gives a lesson or a task, or nothing, with the outcome that says why, by the
716
+ * route the request names. Refusals: `CAUSE_NOT_FOUND`, a skill named that no module connected
717
+ * has, `CAUSE_KEY_NOT_FOR_PROFILE`, `CAUSE_KEY_ALREADY_USED` and `CAUSE_STILL_GOING`. A repeat
718
+ * with the same idempotency key gets the same choice.
717
719
  *
718
720
  * @generated from rpc novatrail.api.v1.LearningService.ChooseNext
719
721
  */
@@ -724,19 +726,19 @@ export declare const LearningService: GenService<{
724
726
  },
725
727
  /**
726
728
  * Begins an attempt: by an engine's choice of a task, on a task segment of a lesson run, or the
727
- * same task again. It closes the open attempt `CLOSE_REASON_LEFT`. A choice begins one attempt:
728
- * once it has, another request by it gets `CAUSE_ALREADY_EXISTS`, and `app` reads the open
729
- * attempt of the profile; a choice of a lesson gets `invalid_argument`. An attempt on a segment
730
- * of a run whose package the image no longer gives ends the run `RUN_END_REASON_UNCHECKED` and
731
- * gets `CAUSE_RUN_ENDED`, and `app` then asks `CheckPackages`. The answer is the attempt with
732
- * the open view of its task, of an instance when the task is a template; the seed of the attempt
733
- * never goes to the device. Refusals: `CAUSE_QUOTA`, `CAUSE_PLATFORM_LIMIT` and
734
- * `CAUSE_NOT_ADMITTED`, when platform AI checks the task, and a lesson run stays open on them;
735
- * `CAUSE_NOT_SUITABLE`, `CAUSE_NO_CURRENT_VERSION`, `CAUSE_PACKAGE_UNKNOWN`,
736
- * `CAUSE_RUN_ENDED`, `CAUSE_SEGMENT_UNAVAILABLE`, `CAUSE_ALREADY_EXISTS`,
737
- * `CAUSE_KEY_NOT_FOR_PROFILE`, `CAUSE_NOT_FOUND`, `CAUSE_KEY_ALREADY_USED` and
738
- * `CAUSE_STILL_GOING`. A repeat with the same idempotency key gets the same attempt and its open
739
- * view.
729
+ * same task again. It closes the open attempt of a task of a module `CLOSE_REASON_LEFT`. A choice
730
+ * begins one attempt: once it has, another request by it gets `CAUSE_ALREADY_EXISTS`, and `app`
731
+ * reads the open attempt of the profile; a choice of a lesson gets `invalid_argument`. An attempt
732
+ * on a segment of a run whose package the image no longer gives ends the run
733
+ * `RUN_END_REASON_UNCHECKED` and gets `CAUSE_RUN_ENDED`, and `app` then asks `CheckPackages`. The
734
+ * answer is the attempt with the open view of its task, of an instance when the task is a
735
+ * template; the seed of the attempt never goes to the device. Refusals: `CAUSE_QUOTA`,
736
+ * `CAUSE_PLATFORM_LIMIT` and `CAUSE_NOT_ADMITTED`, when platform AI checks the task, and a lesson
737
+ * run stays open on them; `CAUSE_NOT_SUITABLE`, `CAUSE_NO_CURRENT_VERSION`,
738
+ * `CAUSE_PACKAGE_UNKNOWN`, `CAUSE_RUN_ENDED`, `CAUSE_SEGMENT_UNAVAILABLE`,
739
+ * `CAUSE_ALREADY_EXISTS`, `CAUSE_KEY_NOT_FOR_PROFILE`, `CAUSE_NOT_FOUND`,
740
+ * `CAUSE_KEY_ALREADY_USED` and `CAUSE_STILL_GOING`. A repeat with the same idempotency key gets
741
+ * the same attempt and its open view.
740
742
  *
741
743
  * @generated from rpc novatrail.api.v1.LearningService.BeginAttempt
742
744
  */
@@ -749,8 +751,9 @@ export declare const LearningService: GenService<{
749
751
  * The open attempt, by which the learner goes on with it, on another device too, with a clean
750
752
  * sheet: the strokes stay on the device that wrote them, but for a work another device put by
751
753
  * `WorkService.PutWork`, which `GetWork` gives back. Refusals: `CAUSE_NOT_FOUND`,
752
- * `CAUSE_ATTEMPT_CLOSED` with its close reason, and `CAUSE_PACKAGE_UNKNOWN`. It repeats by the
753
- * state of the attempt.
754
+ * `CAUSE_ATTEMPT_CLOSED` with its close reason, and `CAUSE_PACKAGE_UNKNOWN`. An attempt of a task
755
+ * from paper gets `invalid_argument`: it has no open view, and only the device that holds its
756
+ * page goes on with it (R162). It repeats by the state of the attempt.
754
757
  *
755
758
  * @generated from rpc novatrail.api.v1.LearningService.GetOpenAttempt
756
759
  */
@@ -158,15 +158,17 @@ export const LessonRunRefSchema = /*@__PURE__*/
158
158
  * `app` does on each; a profile that is not the account's gets `CAUSE_NO_PROFILE`, a request of a
159
159
  * profile whose consent is not confirmed `CAUSE_NO_CONSENT`, one of a profile whose age is to be
160
160
  * given again `CAUSE_AGE_NEEDED`, and a request whose form the contract refuses the code
161
- * `invalid_argument` with no `Refusal`. A profile has one open attempt: a new one closes the one
162
- * before `CLOSE_REASON_LEFT`. A lesson run goes on the package it began on, and every attempt of
163
- * its task segments too. `app` keeps the place in a lesson and the state of its demos by the key
164
- * "lesson's full ID, package digest", beside the ID of the run: the state of another run under the
165
- * same key it drops, and it erases the state of the lesson at every end of the run, in an answer
166
- * or in a refusal. An engine's choice that an answer or a refusal gives goes by the route to AI that
167
- * the request names, the own key's by `own_key_provider` or platform AI's without it, so that it
168
- * gives nothing that `BeginAttempt` by the same route would refuse; a profile not of the category
169
- * `adult` that names a provider gets `CAUSE_KEY_NOT_FOR_PROFILE` (R84; R99).
161
+ * `invalid_argument` with no `Refusal`. A profile has one open attempt of a task of a module: a new
162
+ * one closes the one before `CLOSE_REASON_LEFT`, and leaves as they are the open attempts of tasks
163
+ * from paper, which `PaperService` begins (R162). A lesson run goes on the package it began on, and
164
+ * every attempt of its task segments too. `app` keeps the place in a lesson and the state of its
165
+ * demos by the key "lesson's full ID, package digest", beside the ID of the run: the state of
166
+ * another run under the same key it drops, and it erases the state of the lesson at every end of
167
+ * the run, in an answer or in a refusal. An engine's choice that an answer or a refusal gives goes
168
+ * by the route to AI that the request names, the own key's by `own_key_provider` or platform AI's
169
+ * without it, so that it gives nothing that `BeginAttempt` by the same route would refuse; a
170
+ * profile not of the category `adult` that names a provider gets `CAUSE_KEY_NOT_FOR_PROFILE` (R84;
171
+ * R99).
170
172
  *
171
173
  * @generated from service novatrail.api.v1.LearningService
172
174
  */
@@ -0,0 +1,279 @@
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 type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
11
+ import type { Message } from "@bufbuild/protobuf";
12
+ import type { OwnKey } from "./attempt_pb.js";
13
+ import type { Outcome } from "./cause_pb.js";
14
+ import type { CropBox } from "../../observation/v1/observation_pb.js";
15
+
16
+ /**
17
+ * Describes the file novatrail/api/v1/paper.proto.
18
+ */
19
+ export declare const file_novatrail_api_v1_paper: GenFile;
20
+
21
+ /**
22
+ * The photo of a page, for its tasks to be found, and the learner's request about them.
23
+ *
24
+ * @generated from message novatrail.api.v1.FindTasksRequest
25
+ */
26
+ export declare type FindTasksRequest = Message<"novatrail.api.v1.FindTasksRequest"> & {
27
+ /**
28
+ * The profile.
29
+ *
30
+ * @generated from field: string profile_id = 1;
31
+ */
32
+ profileId: string;
33
+
34
+ /**
35
+ * The idempotency key of this action of the learner.
36
+ *
37
+ * @generated from field: string idempotency_key = 2;
38
+ */
39
+ idempotencyKey: string;
40
+
41
+ /**
42
+ * The photo of the page, as the camera of `app` took it or as the learner picked it, a JPEG or a
43
+ * PNG of at most 4 MiB, without the metadata of its file (privacy 6): `app` scales it down to
44
+ * fit.
45
+ *
46
+ * @generated from field: bytes photo = 3;
47
+ */
48
+ photo: Uint8Array;
49
+
50
+ /**
51
+ * The learner's own key and its provider: with a profile of its owner.
52
+ *
53
+ * @generated from field: novatrail.api.v1.OwnKey own_key = 4;
54
+ */
55
+ ownKey?: OwnKey | undefined;
56
+
57
+ /**
58
+ * The offset of the device's clock from UTC, in minutes: with a request on platform AI alone.
59
+ *
60
+ * @generated from field: optional int32 clock_offset_minutes = 5;
61
+ */
62
+ clockOffsetMinutes?: number | undefined;
63
+
64
+ /**
65
+ * The learner's request about the page, in their own words: which tasks to take and how to split
66
+ * them, as "only the first column, each example a task of its own". At most 200 code points,
67
+ * with no control character, not spaces alone; empty finds the tasks as the finding's rule alone
68
+ * gives them. It goes to the AI as data, never as an instruction, and the server keeps none of it
69
+ * (R165).
70
+ *
71
+ * @generated from field: string request = 6;
72
+ */
73
+ request: string;
74
+
75
+ /**
76
+ * The frames the AI found on the page and that are on it now, at most 20, in the order of the
77
+ * page: with a request alone.
78
+ *
79
+ * @generated from field: repeated novatrail.api.v1.TaskFrame found = 7;
80
+ */
81
+ found: TaskFrame[];
82
+
83
+ /**
84
+ * The frames the learner drew on the page, at most 40, in the order of the page: with a request
85
+ * alone. The answer repeats none of them.
86
+ *
87
+ * @generated from field: repeated novatrail.api.v1.TaskFrame drawn = 8;
88
+ */
89
+ drawn: TaskFrame[];
90
+ };
91
+
92
+ /**
93
+ * Describes the message novatrail.api.v1.FindTasksRequest.
94
+ * Use `create(FindTasksRequestSchema)` to create a new message.
95
+ */
96
+ export declare const FindTasksRequestSchema: GenMessage<FindTasksRequest>;
97
+
98
+ /**
99
+ * The tasks found on a page.
100
+ *
101
+ * @generated from message novatrail.api.v1.FindTasksResponse
102
+ */
103
+ export declare type FindTasksResponse = Message<"novatrail.api.v1.FindTasksResponse"> & {
104
+ /**
105
+ * The frame of each task found, in the order of the page, top to bottom: empty when AI found
106
+ * none, or gave no answer.
107
+ *
108
+ * @generated from field: repeated novatrail.api.v1.TaskFrame frames = 1;
109
+ */
110
+ frames: TaskFrame[];
111
+
112
+ /**
113
+ * What the call of AI came to, when it gave no frames: a failure of AI, or of the own key its
114
+ * limit reached or the key refused.
115
+ *
116
+ * @generated from field: novatrail.api.v1.Outcome outcome = 2;
117
+ */
118
+ outcome?: Outcome | undefined;
119
+
120
+ /**
121
+ * The answer of a repeat with the same idempotency key, which holds no frames: the server keeps
122
+ * none.
123
+ *
124
+ * @generated from field: bool repeated = 3;
125
+ */
126
+ repeated: boolean;
127
+ };
128
+
129
+ /**
130
+ * Describes the message novatrail.api.v1.FindTasksResponse.
131
+ * Use `create(FindTasksResponseSchema)` to create a new message.
132
+ */
133
+ export declare const FindTasksResponseSchema: GenMessage<FindTasksResponse>;
134
+
135
+ /**
136
+ * A rectangle round one task on the photo of a page, by which `app` cuts the task's crop on the
137
+ * device (concepts 8).
138
+ *
139
+ * @generated from message novatrail.api.v1.TaskFrame
140
+ */
141
+ export declare type TaskFrame = Message<"novatrail.api.v1.TaskFrame"> & {
142
+ /**
143
+ * The frame, in whole thousandths of the photo's height and width, as a box on a crop is written.
144
+ *
145
+ * @generated from field: novatrail.observation.v1.CropBox box = 1;
146
+ */
147
+ box?: CropBox | undefined;
148
+ };
149
+
150
+ /**
151
+ * Describes the message novatrail.api.v1.TaskFrame.
152
+ * Use `create(TaskFrameSchema)` to create a new message.
153
+ */
154
+ export declare const TaskFrameSchema: GenMessage<TaskFrame>;
155
+
156
+ /**
157
+ * The beginning of the attempts of the tasks picked on a page.
158
+ *
159
+ * @generated from message novatrail.api.v1.BeginPaperAttemptsRequest
160
+ */
161
+ export declare type BeginPaperAttemptsRequest = Message<"novatrail.api.v1.BeginPaperAttemptsRequest"> & {
162
+ /**
163
+ * The profile.
164
+ *
165
+ * @generated from field: string profile_id = 1;
166
+ */
167
+ profileId: string;
168
+
169
+ /**
170
+ * The idempotency key of this action of the learner.
171
+ *
172
+ * @generated from field: string idempotency_key = 2;
173
+ */
174
+ idempotencyKey: string;
175
+
176
+ /**
177
+ * How many tasks were picked, those the AI found and those framed by hand: from 1 to 20.
178
+ *
179
+ * @generated from field: int32 tasks = 3;
180
+ */
181
+ tasks: number;
182
+
183
+ /**
184
+ * The provider of the learner's own key, by its code in the admission table, without the key:
185
+ * with a profile of its owner that checks the tasks by its own key, so that `api` checks no
186
+ * quota. Empty on platform AI. Each later request on an attempt that calls AI goes by the
187
+ * `own_key` it carries, or on platform AI without one (R84).
188
+ *
189
+ * @generated from field: string own_key_provider = 4;
190
+ */
191
+ ownKeyProvider: string;
192
+
193
+ /**
194
+ * The page the tasks are on, by the ID `app` gives it, which names its file of the export: 1 to
195
+ * 200 letters, digits, -, _ and dots, the first not a dot. A Start again on the same page, after
196
+ * "Add", names it again and closes none of its attempts; another page closes them (R162).
197
+ *
198
+ * @generated from field: string page_id = 5;
199
+ */
200
+ pageId: string;
201
+ };
202
+
203
+ /**
204
+ * Describes the message novatrail.api.v1.BeginPaperAttemptsRequest.
205
+ * Use `create(BeginPaperAttemptsRequestSchema)` to create a new message.
206
+ */
207
+ export declare const BeginPaperAttemptsRequestSchema: GenMessage<BeginPaperAttemptsRequest>;
208
+
209
+ /**
210
+ * The attempts begun.
211
+ *
212
+ * @generated from message novatrail.api.v1.BeginPaperAttemptsResponse
213
+ */
214
+ export declare type BeginPaperAttemptsResponse = Message<"novatrail.api.v1.BeginPaperAttemptsResponse"> & {
215
+ /**
216
+ * The ID of each attempt, in the order of the tasks.
217
+ *
218
+ * @generated from field: repeated string attempt_ids = 1;
219
+ */
220
+ attemptIds: string[];
221
+ };
222
+
223
+ /**
224
+ * Describes the message novatrail.api.v1.BeginPaperAttemptsResponse.
225
+ * Use `create(BeginPaperAttemptsResponseSchema)` to create a new message.
226
+ */
227
+ export declare const BeginPaperAttemptsResponseSchema: GenMessage<BeginPaperAttemptsResponse>;
228
+
229
+ /**
230
+ * The requests of a task from paper, from a learner's session: each method is a learning request,
231
+ * with the right `can_learn`, open to every profile. Every method carries the token of the sign-in
232
+ * service and may get the refusals of every request with a token, which the comment of
233
+ * `AccountService` names with what `app` does on each; a profile that is not the account's gets
234
+ * `CAUSE_NO_PROFILE`, a request of a profile whose consent is not confirmed `CAUSE_NO_CONSENT`, one
235
+ * of a profile whose age is to be given again `CAUSE_AGE_NEEDED`, and a request whose form the
236
+ * contract refuses the code `invalid_argument` with no `Refusal`. The server keeps no photo and no
237
+ * crop, not even as a stored work (R09; R113).
238
+ *
239
+ * @generated from service novatrail.api.v1.PaperService
240
+ */
241
+ export declare const PaperService: GenService<{
242
+ /**
243
+ * Finds the tasks on the photo of a page: one call of AI, the capability `task_finding`, whose
244
+ * answer is the task frames alone, and no text of the page; each sum or equation that says by
245
+ * itself what to do, as each of a column under one instruction, is a task of its own. With the
246
+ * learner's request about the page, the call gets it as data, with the frames on the page now,
247
+ * and its frames replace those found before; it gives none that repeats a frame the learner
248
+ * drew. It makes no call without the reserve of the quota. Refusals: `CAUSE_QUOTA`,
249
+ * `CAUSE_PLATFORM_LIMIT` and `CAUSE_NOT_ADMITTED`, on platform AI; `CAUSE_NOT_ADMITTED` on the
250
+ * own key too; `CAUSE_KEY_NOT_FOR_PROFILE`, `CAUSE_KEY_ALREADY_USED` and `CAUSE_STILL_GOING`. A
251
+ * call of AI that gives no frames is no refusal: the answer names the outcome, and the learner
252
+ * frames the tasks by hand. A repeat with the same idempotency key gets an answer `repeated`
253
+ * without frames, with no AI: the server keeps none.
254
+ *
255
+ * @generated from rpc novatrail.api.v1.PaperService.FindTasks
256
+ */
257
+ findTasks: {
258
+ methodKind: "unary";
259
+ input: typeof FindTasksRequestSchema;
260
+ output: typeof FindTasksResponseSchema;
261
+ },
262
+ /**
263
+ * Begins the attempts of the tasks picked on a page, one for each, in the order of the tasks. It
264
+ * closes the open attempts of tasks from paper that the profile has on another page,
265
+ * `CLOSE_REASON_LEFT`, and none of the same page, and leaves the open attempt of a task of a
266
+ * module as it is. Refusals: `CAUSE_QUOTA`, `CAUSE_PLATFORM_LIMIT` and `CAUSE_NOT_ADMITTED`, on
267
+ * platform AI, as `LearningService.BeginAttempt` meets them; `CAUSE_KEY_NOT_FOR_PROFILE`,
268
+ * `CAUSE_KEY_ALREADY_USED` and `CAUSE_STILL_GOING`. A repeat with the same idempotency key gets
269
+ * the same attempts.
270
+ *
271
+ * @generated from rpc novatrail.api.v1.PaperService.BeginPaperAttempts
272
+ */
273
+ beginPaperAttempts: {
274
+ methodKind: "unary";
275
+ input: typeof BeginPaperAttemptsRequestSchema;
276
+ output: typeof BeginPaperAttemptsResponseSchema;
277
+ },
278
+ }>;
279
+