@skillcdn/console 0.1.6 → 0.1.7

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.
Files changed (88) hide show
  1. package/README.md +50 -2
  2. package/SKILLCDN.md +29 -0
  3. package/dist/cli/cli.d.ts +3 -0
  4. package/dist/cli/cli.d.ts.map +1 -1
  5. package/dist/cli/cli.js +61 -0
  6. package/dist/cli/cli.js.map +1 -1
  7. package/dist/cli/help.d.ts.map +1 -1
  8. package/dist/cli/help.js +5 -0
  9. package/dist/cli/help.js.map +1 -1
  10. package/dist/cli/main.js +2 -0
  11. package/dist/cli/main.js.map +1 -1
  12. package/dist/cli/serve.d.ts +37 -0
  13. package/dist/cli/serve.d.ts.map +1 -0
  14. package/dist/cli/serve.js +218 -0
  15. package/dist/cli/serve.js.map +1 -0
  16. package/dist/console.d.ts +6 -0
  17. package/dist/console.d.ts.map +1 -1
  18. package/dist/console.js +78 -13
  19. package/dist/console.js.map +1 -1
  20. package/dist/data.d.ts.map +1 -1
  21. package/dist/data.js +5 -1
  22. package/dist/data.js.map +1 -1
  23. package/dist/i18n/en.d.ts +4 -0
  24. package/dist/i18n/en.d.ts.map +1 -1
  25. package/dist/i18n/en.js +4 -0
  26. package/dist/i18n/en.js.map +1 -1
  27. package/dist/i18n/ko.d.ts.map +1 -1
  28. package/dist/i18n/ko.js +4 -0
  29. package/dist/i18n/ko.js.map +1 -1
  30. package/dist/schemas.d.ts +1 -0
  31. package/dist/schemas.d.ts.map +1 -1
  32. package/dist/schemas.js +5 -0
  33. package/dist/schemas.js.map +1 -1
  34. package/dist/web.d.ts +16 -0
  35. package/dist/web.d.ts.map +1 -0
  36. package/dist/web.js +149 -0
  37. package/dist/web.js.map +1 -0
  38. package/docs/specs/cli.md +92 -0
  39. package/docs/specs/rest.md +220 -0
  40. package/package.json +14 -3
  41. package/skills/building-a-console/SKILL.md +79 -0
  42. package/skills/working-the-board/SKILL.md +78 -0
  43. package/src/api.ts +235 -0
  44. package/src/cli/cli.ts +1114 -0
  45. package/src/cli/credentials.ts +68 -0
  46. package/src/cli/directory.ts +59 -0
  47. package/src/cli/format.ts +284 -0
  48. package/src/cli/help.ts +326 -0
  49. package/src/cli/main.ts +39 -0
  50. package/src/cli/serve.ts +276 -0
  51. package/src/cli/terminal.ts +28 -0
  52. package/src/client.ts +533 -0
  53. package/src/components/board.tsx +112 -0
  54. package/src/components/connect.tsx +126 -0
  55. package/src/components/decision-form.tsx +136 -0
  56. package/src/components/decision-list.tsx +278 -0
  57. package/src/components/documents.tsx +569 -0
  58. package/src/components/event-feed.tsx +129 -0
  59. package/src/components/markdown.tsx +72 -0
  60. package/src/components/people.tsx +59 -0
  61. package/src/components/projects.tsx +364 -0
  62. package/src/components/runs.tsx +175 -0
  63. package/src/components/shell.tsx +284 -0
  64. package/src/components/sign-in.tsx +61 -0
  65. package/src/components/skills.tsx +78 -0
  66. package/src/components/task-form.tsx +229 -0
  67. package/src/components/task-view.tsx +272 -0
  68. package/src/components/tokens.tsx +223 -0
  69. package/src/components/ui.tsx +219 -0
  70. package/src/connect-page.tsx +148 -0
  71. package/src/connect.ts +27 -0
  72. package/src/console.tsx +1166 -0
  73. package/src/data.ts +493 -0
  74. package/src/docs-page.tsx +334 -0
  75. package/src/documents.ts +76 -0
  76. package/src/i18n/en.ts +537 -0
  77. package/src/i18n/index.ts +76 -0
  78. package/src/i18n/ko.ts +511 -0
  79. package/src/index.ts +142 -0
  80. package/src/limits.ts +61 -0
  81. package/src/router.ts +295 -0
  82. package/src/routes.ts +106 -0
  83. package/src/schemas.ts +776 -0
  84. package/src/styles/console.css +2432 -0
  85. package/src/text.ts +33 -0
  86. package/src/use-action.ts +37 -0
  87. package/src/vocabulary.ts +109 -0
  88. package/src/web.ts +170 -0
package/src/api.ts ADDED
@@ -0,0 +1,235 @@
1
+ // The first layer of @skillcdn/console (docs/architecture.md, "The package and custom
2
+ // consoles"): the vocabulary, the schemas and the client of the console's REST API, so that a
3
+ // custom UI talks to any console with types, and so that the contract has one source. No React
4
+ // here: the server and the command line import this entry point, and nothing of the pages.
5
+
6
+ export {
7
+ ApiError,
8
+ type ClientOptions,
9
+ type ConsoleClient,
10
+ createClient,
11
+ type DocumentFilter,
12
+ type EventFilter,
13
+ type FetchLike,
14
+ type FileUpload,
15
+ type ProjectClient,
16
+ } from "./client.js";
17
+ export {
18
+ CONNECT_CODE_ALPHABET,
19
+ CONNECT_CODE_LENGTH,
20
+ isConnectCode,
21
+ normalizeConnectCode,
22
+ } from "./connect.js";
23
+ export {
24
+ DOCUMENT_PATH,
25
+ documentPathsIn,
26
+ folderOf,
27
+ foldersAbove,
28
+ isDocumentPath,
29
+ isFolderPath,
30
+ nameOf,
31
+ } from "./documents.js";
32
+ export {
33
+ DEFAULT_TOKEN_DAYS,
34
+ EVENTS_PAGE_LIMIT,
35
+ LIST_LIMIT,
36
+ MAX_AGENT_LENGTH,
37
+ MAX_ARTIFACTS_PER_RUN,
38
+ MAX_BODY_LENGTH,
39
+ MAX_DOCUMENT_LENGTH,
40
+ MAX_DOCUMENT_PATH_LENGTH,
41
+ MAX_DOCUMENT_SEGMENT_LENGTH,
42
+ MAX_FILE_BYTES,
43
+ MAX_FILE_NAME_LENGTH,
44
+ MAX_FILES_PER_DOCUMENT,
45
+ MAX_LANGUAGE_TAG_LENGTH,
46
+ MAX_LINK_LABEL_LENGTH,
47
+ MAX_LINKS,
48
+ MAX_NOTE_LENGTH,
49
+ MAX_OPTION_LABEL_LENGTH,
50
+ MAX_OPTIONS,
51
+ MAX_PROJECT_DESCRIPTION_LENGTH,
52
+ MAX_PROJECT_KEY_LENGTH,
53
+ MAX_PROJECT_NAME_LENGTH,
54
+ MAX_QUESTION_LENGTH,
55
+ MAX_REPORTS_PER_RUN,
56
+ MAX_SEARCH_LENGTH,
57
+ MAX_SECRET_LENGTH,
58
+ MAX_SKILLS_ADDRESS_LENGTH,
59
+ MAX_SUMMARY_LENGTH,
60
+ MAX_TITLE_LENGTH,
61
+ MAX_TOKEN_DAYS,
62
+ MAX_TOKEN_NAME_LENGTH,
63
+ MAX_TOKENS_PER_PERSON,
64
+ MAX_URL_LENGTH,
65
+ MAX_VERSIONS_PER_DOCUMENT,
66
+ MIN_OPTIONS,
67
+ } from "./limits.js";
68
+ export {
69
+ AUTH_ROUTES,
70
+ CLAIM_PATH,
71
+ connectPath,
72
+ isSignInFailure,
73
+ loginPath,
74
+ PROJECT_COLLECTIONS,
75
+ type ProjectCollection,
76
+ personTokensPath,
77
+ projectPath,
78
+ REST_ROUTES,
79
+ RETURN_TO_PARAM,
80
+ restPath,
81
+ SIGN_IN_FAILURES,
82
+ SIGN_IN_PARAM,
83
+ type SignInFailure,
84
+ signInPath,
85
+ } from "./routes.js";
86
+ export {
87
+ type RestAnswerInput,
88
+ type RestArtifact,
89
+ type RestArtifactInput,
90
+ type RestBacklink,
91
+ type RestClaim,
92
+ type RestClaimInput,
93
+ type RestConnectInput,
94
+ type RestConnection,
95
+ type RestConnectRequest,
96
+ type RestDecision,
97
+ type RestDecisionInput,
98
+ type RestDecisionOption,
99
+ type RestDecisionPatch,
100
+ type RestDecisions,
101
+ type RestDocument,
102
+ type RestDocumentFile,
103
+ type RestDocumentInput,
104
+ type RestDocumentLink,
105
+ type RestDocumentSummary,
106
+ type RestDocuments,
107
+ type RestError,
108
+ type RestEvent,
109
+ type RestEventData,
110
+ type RestEvents,
111
+ type RestFile,
112
+ type RestFileInput,
113
+ type RestMe,
114
+ type RestMember,
115
+ type RestMemberInput,
116
+ type RestMemberPatch,
117
+ type RestMembers,
118
+ type RestMePatch,
119
+ type RestPeople,
120
+ type RestPerson,
121
+ type RestPersonPatch,
122
+ type RestProject,
123
+ type RestProjectInput,
124
+ type RestProjectPatch,
125
+ type RestProjects,
126
+ type RestProvider,
127
+ type RestReport,
128
+ type RestReportInput,
129
+ type RestRun,
130
+ type RestRunEndInput,
131
+ type RestRunInput,
132
+ type RestRuns,
133
+ type RestSkill,
134
+ type RestSkills,
135
+ type RestTask,
136
+ type RestTaskInput,
137
+ type RestTaskLink,
138
+ type RestTaskPatch,
139
+ type RestTasks,
140
+ type RestToken,
141
+ type RestTokenCreated,
142
+ type RestTokenInput,
143
+ type RestTokens,
144
+ type RestVersion,
145
+ type RestVersionSummary,
146
+ type RestVersions,
147
+ restAnswerInputSchema,
148
+ restArtifactInputSchema,
149
+ restArtifactSchema,
150
+ restBacklinkSchema,
151
+ restClaimInputSchema,
152
+ restClaimSchema,
153
+ restConnectInputSchema,
154
+ restConnectionSchema,
155
+ restConnectRequestSchema,
156
+ restDecisionInputSchema,
157
+ restDecisionOptionSchema,
158
+ restDecisionPatchSchema,
159
+ restDecisionSchema,
160
+ restDecisionsSchema,
161
+ restDocumentFileSchema,
162
+ restDocumentInputSchema,
163
+ restDocumentLinkSchema,
164
+ restDocumentSchema,
165
+ restDocumentSummarySchema,
166
+ restDocumentsSchema,
167
+ restErrorSchema,
168
+ restEventDataSchema,
169
+ restEventSchema,
170
+ restEventsSchema,
171
+ restFileInputSchema,
172
+ restFileSchema,
173
+ restMemberInputSchema,
174
+ restMemberPatchSchema,
175
+ restMemberSchema,
176
+ restMembersSchema,
177
+ restMePatchSchema,
178
+ restMeSchema,
179
+ restPeopleSchema,
180
+ restPersonPatchSchema,
181
+ restPersonSchema,
182
+ restProjectInputSchema,
183
+ restProjectPatchSchema,
184
+ restProjectSchema,
185
+ restProjectsSchema,
186
+ restProviderSchema,
187
+ restReportInputSchema,
188
+ restReportSchema,
189
+ restRunEndInputSchema,
190
+ restRunInputSchema,
191
+ restRunSchema,
192
+ restRunsSchema,
193
+ restSkillSchema,
194
+ restSkillsSchema,
195
+ restTaskInputSchema,
196
+ restTaskLinkSchema,
197
+ restTaskPatchSchema,
198
+ restTaskSchema,
199
+ restTasksSchema,
200
+ restTokenCreatedSchema,
201
+ restTokenInputSchema,
202
+ restTokenSchema,
203
+ restTokensSchema,
204
+ restVersionSchema,
205
+ restVersionSummarySchema,
206
+ restVersionsSchema,
207
+ } from "./schemas.js";
208
+ export { hasForbiddenCodePoint } from "./text.js";
209
+ export {
210
+ ARTIFACT_KINDS,
211
+ type ArtifactKind,
212
+ EVENT_KINDS,
213
+ type EventKind,
214
+ isProviderKey,
215
+ LINK_SOURCES,
216
+ type LinkSource,
217
+ PERSON_ROLES,
218
+ type PersonRole,
219
+ PROJECT_ROLES,
220
+ PROJECT_VISIBILITIES,
221
+ PROVIDER_KEYS,
222
+ type ProjectRole,
223
+ type ProjectVisibility,
224
+ type ProviderKey,
225
+ RUN_ENDINGS,
226
+ RUN_STATUSES,
227
+ type RunEnding,
228
+ type RunStatus,
229
+ SKILLS_STATUSES,
230
+ type SkillsStatus,
231
+ TASK_PRIORITIES,
232
+ TASK_STATES,
233
+ type TaskPriority,
234
+ type TaskState,
235
+ } from "./vocabulary.js";