@intentic/extension-manifest 1.431.0 → 1.432.0

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 (68) hide show
  1. package/README.md +46 -2
  2. package/dist/manifest.d.ts +294 -0
  3. package/dist/manifest.d.ts.map +1 -1
  4. package/dist/manifest.js +96 -1
  5. package/dist/manifest.js.map +1 -1
  6. package/dist/permissions.d.ts +23 -0
  7. package/dist/permissions.d.ts.map +1 -1
  8. package/dist/permissions.js +28 -1
  9. package/dist/permissions.js.map +1 -1
  10. package/dist/points/automation-templates.d.ts +68 -0
  11. package/dist/points/automation-templates.d.ts.map +1 -1
  12. package/dist/points/automation-templates.js +29 -1
  13. package/dist/points/automation-templates.js.map +1 -1
  14. package/dist/points/capabilities.d.ts +357 -50
  15. package/dist/points/capabilities.d.ts.map +1 -1
  16. package/dist/points/capabilities.js +22 -51
  17. package/dist/points/capabilities.js.map +1 -1
  18. package/dist/points/capability-broker.d.ts +110 -0
  19. package/dist/points/capability-broker.d.ts.map +1 -0
  20. package/dist/points/capability-broker.js +125 -0
  21. package/dist/points/capability-broker.js.map +1 -0
  22. package/dist/points/channel-facts.d.ts +46 -0
  23. package/dist/points/channel-facts.d.ts.map +1 -0
  24. package/dist/points/channel-facts.js +80 -0
  25. package/dist/points/channel-facts.js.map +1 -0
  26. package/dist/points/index.d.ts +585 -0
  27. package/dist/points/index.d.ts.map +1 -1
  28. package/dist/points/index.js +12 -0
  29. package/dist/points/index.js.map +1 -1
  30. package/dist/points/listener.d.ts +10 -0
  31. package/dist/points/listener.d.ts.map +1 -1
  32. package/dist/points/listener.js +6 -0
  33. package/dist/points/listener.js.map +1 -1
  34. package/dist/points/model-roles.d.ts +31 -0
  35. package/dist/points/model-roles.d.ts.map +1 -0
  36. package/dist/points/model-roles.js +27 -0
  37. package/dist/points/model-roles.js.map +1 -0
  38. package/dist/points/public-routes.d.ts +91 -0
  39. package/dist/points/public-routes.d.ts.map +1 -0
  40. package/dist/points/public-routes.js +140 -0
  41. package/dist/points/public-routes.js.map +1 -0
  42. package/dist/points/sleep-watch.d.ts +15 -0
  43. package/dist/points/sleep-watch.d.ts.map +1 -0
  44. package/dist/points/sleep-watch.js +30 -0
  45. package/dist/points/sleep-watch.js.map +1 -0
  46. package/dist/points/watch-kinds.d.ts +102 -0
  47. package/dist/points/watch-kinds.d.ts.map +1 -0
  48. package/dist/points/watch-kinds.js +118 -0
  49. package/dist/points/watch-kinds.js.map +1 -0
  50. package/intentic-extension.schema.json +1387 -36
  51. package/package.json +2 -2
  52. package/src/manifest.ts +130 -1
  53. package/src/permissions.test.ts +39 -1
  54. package/src/permissions.ts +84 -4
  55. package/src/points/automation-templates.ts +43 -5
  56. package/src/points/capabilities.ts +37 -80
  57. package/src/points/capability-broker.ts +203 -0
  58. package/src/points/channel-facts.test.ts +38 -0
  59. package/src/points/channel-facts.ts +119 -0
  60. package/src/points/index.ts +12 -0
  61. package/src/points/listener.ts +14 -0
  62. package/src/points/model-roles.ts +44 -0
  63. package/src/points/public-routes.test.ts +132 -0
  64. package/src/points/public-routes.ts +198 -0
  65. package/src/points/sleep-watch.ts +54 -0
  66. package/src/points/watch-kinds.test.ts +73 -0
  67. package/src/points/watch-kinds.ts +172 -0
  68. package/src/powers.test.ts +97 -7
@@ -0,0 +1,118 @@
1
+ import { z } from "zod";
2
+ export const WATCH_KIND_ID = /^(?!url$)[a-z][a-z0-9-]{0,63}$/u;
3
+ export const WATCH_PARAM_KEY = /^(?!kind$)[a-z][a-zA-Z0-9]{0,39}$/u;
4
+ const TEXT_MAX = 2000;
5
+ const compiles = (pattern) => {
6
+ try {
7
+ void new RegExp(pattern, "u");
8
+ return true;
9
+ }
10
+ catch {
11
+ return false;
12
+ }
13
+ };
14
+ export const WatchKindFieldSchema = z.object({
15
+ key: z
16
+ .string()
17
+ .regex(WATCH_PARAM_KEY, "a parameter's key is a camelCase word, and not `kind`")
18
+ .describe("The parameter's name as the automation stores it, beside `kind`: what `--with <key>=<value>` sets on the command line."),
19
+ label: z.string().min(1).max(80).describe("The box's label in the composer."),
20
+ type: z
21
+ .enum(["text", "switch"])
22
+ .optional()
23
+ .describe("`text` (the default): a line of text, stored as typed. `switch`: on or off, stored as `true` only when on."),
24
+ required: z.boolean().optional().describe("Whether a source of this kind must carry it. A switch is never required."),
25
+ placeholder: z.string().min(1).max(200).optional().describe("An example value, shown in the empty box."),
26
+ hint: z.string().min(1).max(300).optional().describe("One sentence on what it changes, behind the field's (i)."),
27
+ pattern: z
28
+ .string()
29
+ .min(1)
30
+ .max(300)
31
+ .refine(compiles, "the pattern does not compile as a regular expression")
32
+ .optional()
33
+ .describe("A regular expression a text value must match, checked when the automation is saved, in the composer and by the command."),
34
+ patternHint: z.string().min(1).max(120).optional().describe("What a value that matches looks like, said when one does not: `owner/name`."),
35
+ maxLength: z.number().int().positive().max(TEXT_MAX).optional().describe(`The longest a text value may be. Absent means ${TEXT_MAX} characters.`),
36
+ });
37
+ const PLACEHOLDER = /\{([a-zA-Z0-9]+)\}/gu;
38
+ const SEGMENT = /\[([^[\]]*)\]/gu;
39
+ export const sentenceKeys = (sentence) => [...sentence.matchAll(PLACEHOLDER)].map((match) => match[1] ?? "");
40
+ export const WatchKindDeclarationSchema = z.object({
41
+ id: z
42
+ .string()
43
+ .regex(WATCH_KIND_ID, "a watch kind's id is a lowercase word: letters, digits and dashes, and not `url`, the sandbox's own")
44
+ .describe("The kind's id, which an automation's source names as `kind`. Keep it once shipped: a stored automation names it."),
45
+ label: z.string().min(1).max(40).describe("What the composer's chip says: a few words, like `npm package`."),
46
+ icon: z.string().min(1).optional().describe("A name from the host's icon set for the chip."),
47
+ logo: z.string().min(1).optional().describe("A simple-icons slug, drawn where a logo fits better than an icon."),
48
+ description: z.string().min(1).max(300).describe("One sentence under the chips on what the check looks at and when it passes."),
49
+ sentence: z
50
+ .string()
51
+ .min(1)
52
+ .max(200)
53
+ .describe("What one source of this kind watches, in a few words, for the automation's row, its approval card and the wake: `{key}` puts a parameter in, and a `[…]` segment is left out when a parameter it names is absent or off, like `GitHub releases of {repo}[ (prereleases too){prereleases}]`. A switch puts nothing in: it only keeps its segment."),
54
+ fields: z.array(WatchKindFieldSchema).max(12).describe("Its parameters, in the order the composer draws them."),
55
+ capabilities: z
56
+ .array(z.string().min(1))
57
+ .optional()
58
+ .describe("Ids of this extension's own capability cards whose credential-gateway addresses each check is handed, as the automation's role reaches them: a GitHub card for a private repository's releases. Never a credential itself."),
59
+ });
60
+ export const WatchKindContributionSchema = WatchKindDeclarationSchema
61
+ .superRefine((kind, ctx) => {
62
+ const keys = kind.fields.map((field) => field.key);
63
+ const doubled = keys.find((key, index) => keys.indexOf(key) !== index);
64
+ if (doubled !== undefined) {
65
+ ctx.addIssue({ code: "custom", path: ["fields"], message: `the field "${doubled}" is declared twice` });
66
+ }
67
+ const unknown = sentenceKeys(kind.sentence).find((key) => !keys.includes(key));
68
+ if (unknown !== undefined) {
69
+ ctx.addIssue({ code: "custom", path: ["sentence"], message: `the sentence names "{${unknown}}", which is none of the kind's fields` });
70
+ }
71
+ for (const [index, field] of kind.fields.entries()) {
72
+ if (field.type === "switch" && (field.required === true || field.pattern !== undefined || field.maxLength !== undefined)) {
73
+ ctx.addIssue({ code: "custom", path: ["fields", index], message: `a switch is never required and has no pattern or length` });
74
+ }
75
+ }
76
+ })
77
+ .meta({ power: { key: "watch-kind:${id}", sentence: 'its backend checks "${label}" watches for the sandbox\'s automations' } });
78
+ const present = (value) => value !== undefined && value !== false && value !== "";
79
+ const wordsOf = (value) => (value === undefined || value === true || value === false ? "" : value);
80
+ export const watchSentence = (kind, params) => {
81
+ if (kind === undefined) {
82
+ const named = Object.entries(params).filter(([key, value]) => key !== "kind" && present(value));
83
+ return named.length === 0 ? params.kind : `${params.kind} ${named.map(([key, value]) => (value === true ? key : `${key}=${wordsOf(value)}`)).join(" ")}`;
84
+ }
85
+ const fill = (text) => text.replace(PLACEHOLDER, (_whole, key) => wordsOf(params[key]));
86
+ return fill(kind.sentence.replace(SEGMENT, (_whole, inner) => (sentenceKeys(inner).every((key) => present(params[key])) ? inner : ""))).trim();
87
+ };
88
+ const fieldSchema = (field) => {
89
+ if (field.type === "switch") {
90
+ return z.boolean({ error: `${field.label} is on or off` }).optional();
91
+ }
92
+ const max = field.maxLength ?? TEXT_MAX;
93
+ let text = z
94
+ .string({ error: `${field.label} ${field.required === true ? "is required" : "takes text"}` })
95
+ .refine((value) => value.trim() !== "", `${field.label} is empty`)
96
+ .refine((value) => value.length <= max, `${field.label} is longer than ${max} characters`);
97
+ if (field.pattern !== undefined && compiles(field.pattern)) {
98
+ const pattern = new RegExp(field.pattern, "u");
99
+ text = text.refine((value) => pattern.test(value), field.patternHint === undefined ? `${field.label} does not look right` : `${field.label} must look like ${field.patternHint}`);
100
+ }
101
+ return field.required === true ? text : text.optional();
102
+ };
103
+ export const watchParamsSchema = (kind) => {
104
+ const takes = kind.fields.map((field) => field.key).join(", ");
105
+ return z.strictObject(Object.fromEntries(kind.fields.map((field) => [field.key, fieldSchema(field)])), {
106
+ error: (issue) => (issue.code === "unrecognized_keys" ? `a ${kind.id} watch has no ${issue.keys.join(", ")}${takes === "" ? "" : `: it takes ${takes}`}` : undefined),
107
+ });
108
+ };
109
+ export const watchParamsProblem = (kind, params) => {
110
+ const { kind: _kind, ...rest } = params;
111
+ return watchParamsSchema(kind).safeParse(rest).error?.issues[0]?.message;
112
+ };
113
+ export const watchKindsPoint = {
114
+ name: "watchKinds",
115
+ description: "Ready-made checks an automation can name instead of a guard command: a package's version, a service's newest release. Your backend answers each check (`api.checks.serve(id, handler)`), and the sandbox runs it on the automation's schedule with no shell and no model, firing only when it passes or when what it saw changed. The composer, the `automations` command and the approval card draw each kind from this declaration. Needs a `server` bundle.",
116
+ schema: z.array(WatchKindContributionSchema),
117
+ };
118
+ //# sourceMappingURL=watch-kinds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watch-kinds.js","sourceRoot":"","sources":["../../src/points/watch-kinds.ts"],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