@namzu/sdk 44.3.0 → 45.1.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.
- package/CHANGELOG.md +94 -0
- package/dist/authorization/command-line.d.ts +66 -19
- package/dist/authorization/command-line.d.ts.map +1 -1
- package/dist/authorization/command-line.js +130 -270
- package/dist/authorization/command-line.js.map +1 -1
- package/dist/authorization/gate.d.ts +7 -0
- package/dist/authorization/gate.d.ts.map +1 -1
- package/dist/authorization/gate.js +13 -3
- package/dist/authorization/gate.js.map +1 -1
- package/dist/authorization/rules.d.ts +10 -1
- package/dist/authorization/rules.d.ts.map +1 -1
- package/dist/authorization/rules.js +55 -8
- package/dist/authorization/rules.js.map +1 -1
- package/dist/authorization/shell-lexer.d.ts +152 -0
- package/dist/authorization/shell-lexer.d.ts.map +1 -0
- package/dist/authorization/shell-lexer.js +2156 -0
- package/dist/authorization/shell-lexer.js.map +1 -0
- package/dist/authorization/skill-grant.d.ts +182 -0
- package/dist/authorization/skill-grant.d.ts.map +1 -0
- package/dist/authorization/skill-grant.js +314 -0
- package/dist/authorization/skill-grant.js.map +1 -0
- package/dist/bridge/a2a/mapper.d.ts.map +1 -1
- package/dist/bridge/a2a/mapper.js +2 -0
- package/dist/bridge/a2a/mapper.js.map +1 -1
- package/dist/bridge/sse/mapper.d.ts.map +1 -1
- package/dist/bridge/sse/mapper.js +1 -0
- package/dist/bridge/sse/mapper.js.map +1 -1
- package/dist/directory/types.d.ts +2 -0
- package/dist/directory/types.d.ts.map +1 -1
- package/dist/directory/types.js.map +1 -1
- package/dist/manager/resident/outbox.d.ts +4 -4
- package/dist/persona/assembler.d.ts.map +1 -1
- package/dist/persona/assembler.js +5 -2
- package/dist/persona/assembler.js.map +1 -1
- package/dist/prompt/coding-agent-doctrine.d.ts +1 -1
- package/dist/prompt/coding-agent-doctrine.d.ts.map +1 -1
- package/dist/prompt/coding-agent-doctrine.js +1 -0
- package/dist/prompt/coding-agent-doctrine.js.map +1 -1
- package/dist/public-runtime.d.ts +5 -1
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +15 -1
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-tools.d.ts +4 -0
- package/dist/public-tools.d.ts.map +1 -1
- package/dist/public-tools.js +12 -1
- package/dist/public-tools.js.map +1 -1
- package/dist/public-types.d.ts +9 -1
- package/dist/public-types.d.ts.map +1 -1
- package/dist/runtime/jobs/registry.d.ts +2 -2
- package/dist/runtime/jobs/registry.d.ts.map +1 -1
- package/dist/runtime/jobs/registry.js +6 -2
- package/dist/runtime/jobs/registry.js.map +1 -1
- package/dist/runtime/query/declined.d.ts +12 -0
- package/dist/runtime/query/declined.d.ts.map +1 -0
- package/dist/runtime/query/declined.js +12 -0
- package/dist/runtime/query/declined.js.map +1 -0
- package/dist/runtime/query/executor.d.ts +36 -40
- package/dist/runtime/query/executor.d.ts.map +1 -1
- package/dist/runtime/query/executor.js +95 -53
- package/dist/runtime/query/executor.js.map +1 -1
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +8 -0
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +13 -0
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/context.d.ts +13 -0
- package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/context.js.map +1 -1
- package/dist/runtime/query/iteration/phases/handoff.d.ts +22 -0
- package/dist/runtime/query/iteration/phases/handoff.d.ts.map +1 -0
- package/dist/runtime/query/iteration/phases/handoff.js +65 -0
- package/dist/runtime/query/iteration/phases/handoff.js.map +1 -0
- package/dist/runtime/query/iteration/phases/index.d.ts +1 -0
- package/dist/runtime/query/iteration/phases/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/index.js +1 -0
- package/dist/runtime/query/iteration/phases/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/tool-review.js +56 -3
- package/dist/runtime/query/iteration/phases/tool-review.js.map +1 -1
- package/dist/runtime/query/resume-pending.d.ts.map +1 -1
- package/dist/runtime/query/resume-pending.js +3 -2
- package/dist/runtime/query/resume-pending.js.map +1 -1
- package/dist/runtime/query/review-policy.d.ts +11 -0
- package/dist/runtime/query/review-policy.d.ts.map +1 -1
- package/dist/runtime/query/review-policy.js +36 -3
- package/dist/runtime/query/review-policy.js.map +1 -1
- package/dist/runtime/query/tooling.d.ts +3 -0
- package/dist/runtime/query/tooling.d.ts.map +1 -1
- package/dist/runtime/query/tooling.js +1 -0
- package/dist/runtime/query/tooling.js.map +1 -1
- package/dist/schedules/cron.d.ts +21 -0
- package/dist/schedules/cron.d.ts.map +1 -0
- package/dist/schedules/cron.js +167 -0
- package/dist/schedules/cron.js.map +1 -0
- package/dist/schedules/describe.d.ts +14 -0
- package/dist/schedules/describe.d.ts.map +1 -0
- package/dist/schedules/describe.js +133 -0
- package/dist/schedules/describe.js.map +1 -0
- package/dist/schedules/errors.d.ts +11 -0
- package/dist/schedules/errors.d.ts.map +1 -0
- package/dist/schedules/errors.js +15 -0
- package/dist/schedules/errors.js.map +1 -0
- package/dist/schedules/evaluate.d.ts +35 -0
- package/dist/schedules/evaluate.d.ts.map +1 -0
- package/dist/schedules/evaluate.js +158 -0
- package/dist/schedules/evaluate.js.map +1 -0
- package/dist/schedules/index.d.ts +11 -0
- package/dist/schedules/index.d.ts.map +1 -0
- package/dist/schedules/index.js +8 -0
- package/dist/schedules/index.js.map +1 -0
- package/dist/schedules/next-fire.d.ts +50 -0
- package/dist/schedules/next-fire.d.ts.map +1 -0
- package/dist/schedules/next-fire.js +250 -0
- package/dist/schedules/next-fire.js.map +1 -0
- package/dist/schedules/spec.d.ts +30 -0
- package/dist/schedules/spec.d.ts.map +1 -0
- package/dist/schedules/spec.js +169 -0
- package/dist/schedules/spec.js.map +1 -0
- package/dist/schedules/types.d.ts +144 -0
- package/dist/schedules/types.d.ts.map +1 -0
- package/dist/schedules/types.js +11 -0
- package/dist/schedules/types.js.map +1 -0
- package/dist/schedules/tz.d.ts +44 -0
- package/dist/schedules/tz.d.ts.map +1 -0
- package/dist/schedules/tz.js +141 -0
- package/dist/schedules/tz.js.map +1 -0
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +21 -0
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +51 -1
- package/dist/skills/loader.js.map +1 -1
- package/dist/tools/builtins/bash.d.ts.map +1 -1
- package/dist/tools/builtins/bash.js +18 -6
- package/dist/tools/builtins/bash.js.map +1 -1
- package/dist/tools/builtins/browser-url.d.ts +83 -0
- package/dist/tools/builtins/browser-url.d.ts.map +1 -0
- package/dist/tools/builtins/browser-url.js +240 -0
- package/dist/tools/builtins/browser-url.js.map +1 -0
- package/dist/tools/builtins/browser.d.ts +367 -0
- package/dist/tools/builtins/browser.d.ts.map +1 -0
- package/dist/tools/builtins/browser.js +704 -0
- package/dist/tools/builtins/browser.js.map +1 -0
- package/dist/tools/builtins/skill.d.ts +2 -9
- package/dist/tools/builtins/skill.d.ts.map +1 -1
- package/dist/tools/builtins/skill.js +74 -51
- package/dist/tools/builtins/skill.js.map +1 -1
- package/dist/tools/command-shell.d.ts +90 -0
- package/dist/tools/command-shell.d.ts.map +1 -0
- package/dist/tools/command-shell.js +129 -0
- package/dist/tools/command-shell.js.map +1 -0
- package/dist/tools/defineTool.d.ts +13 -0
- package/dist/tools/defineTool.d.ts.map +1 -1
- package/dist/tools/defineTool.js +30 -1
- package/dist/tools/defineTool.js.map +1 -1
- package/dist/tools/schedules/index.d.ts +5 -0
- package/dist/tools/schedules/index.d.ts.map +1 -0
- package/dist/tools/schedules/index.js +4 -0
- package/dist/tools/schedules/index.js.map +1 -0
- package/dist/tools/schedules/loop-tool.d.ts +14 -0
- package/dist/tools/schedules/loop-tool.d.ts.map +1 -0
- package/dist/tools/schedules/loop-tool.js +81 -0
- package/dist/tools/schedules/loop-tool.js.map +1 -0
- package/dist/tools/schedules/present.d.ts +16 -0
- package/dist/tools/schedules/present.d.ts.map +1 -0
- package/dist/tools/schedules/present.js +69 -0
- package/dist/tools/schedules/present.js.map +1 -0
- package/dist/tools/schedules/prompt-scan.d.ts +17 -0
- package/dist/tools/schedules/prompt-scan.d.ts.map +1 -0
- package/dist/tools/schedules/prompt-scan.js +92 -0
- package/dist/tools/schedules/prompt-scan.js.map +1 -0
- package/dist/tools/schedules/schedule-tool.d.ts +16 -0
- package/dist/tools/schedules/schedule-tool.d.ts.map +1 -0
- package/dist/tools/schedules/schedule-tool.js +327 -0
- package/dist/tools/schedules/schedule-tool.js.map +1 -0
- package/dist/tools/schedules/types.d.ts +184 -0
- package/dist/tools/schedules/types.d.ts.map +1 -0
- package/dist/tools/schedules/types.js +11 -0
- package/dist/tools/schedules/types.js.map +1 -0
- package/dist/types/authorization/index.d.ts +86 -9
- package/dist/types/authorization/index.d.ts.map +1 -1
- package/dist/types/authorization/index.js +11 -1
- package/dist/types/authorization/index.js.map +1 -1
- package/dist/types/browser/index.d.ts +280 -0
- package/dist/types/browser/index.d.ts.map +1 -0
- package/dist/types/browser/index.js +12 -0
- package/dist/types/browser/index.js.map +1 -0
- package/dist/types/hitl/index.d.ts +23 -0
- package/dist/types/hitl/index.d.ts.map +1 -1
- package/dist/types/hitl/index.js.map +1 -1
- package/dist/types/session/events.d.ts +6 -0
- package/dist/types/session/events.d.ts.map +1 -1
- package/dist/types/session/events.js.map +1 -1
- package/dist/types/session/records.d.ts +23 -0
- package/dist/types/session/records.d.ts.map +1 -1
- package/dist/types/session/records.js +9 -0
- package/dist/types/session/records.js.map +1 -1
- package/dist/types/tool/index.d.ts +108 -5
- package/dist/types/tool/index.d.ts.map +1 -1
- package/dist/types/tool/index.js.map +1 -1
- package/dist/types/tool/presentation.d.ts +7 -0
- package/dist/types/tool/presentation.d.ts.map +1 -1
- package/dist/utils/frontmatter.d.ts +35 -3
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +45 -5
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/id.d.ts +8 -0
- package/dist/utils/id.d.ts.map +1 -1
- package/dist/utils/id.js +12 -0
- package/dist/utils/id.js.map +1 -1
- package/package.json +1 -1
- package/src/authorization/command-line.ts +148 -293
- package/src/authorization/gate.ts +22 -2
- package/src/authorization/rules.ts +67 -8
- package/src/authorization/shell-lexer.ts +2349 -0
- package/src/authorization/skill-grant.ts +400 -0
- package/src/bridge/a2a/mapper.ts +2 -0
- package/src/bridge/sse/mapper.ts +1 -0
- package/src/directory/types.ts +2 -0
- package/src/persona/assembler.ts +5 -2
- package/src/prompt/coding-agent-doctrine.ts +1 -0
- package/src/public-runtime.ts +37 -0
- package/src/public-tools.ts +37 -1
- package/src/public-types.ts +57 -0
- package/src/runtime/jobs/registry.ts +19 -11
- package/src/runtime/query/declined.ts +12 -0
- package/src/runtime/query/executor.ts +116 -56
- package/src/runtime/query/index.ts +8 -0
- package/src/runtime/query/iteration/index.ts +13 -0
- package/src/runtime/query/iteration/phases/context.ts +13 -0
- package/src/runtime/query/iteration/phases/handoff.ts +74 -0
- package/src/runtime/query/iteration/phases/index.ts +1 -0
- package/src/runtime/query/iteration/phases/tool-review.ts +55 -3
- package/src/runtime/query/resume-pending.ts +3 -2
- package/src/runtime/query/review-policy.ts +57 -3
- package/src/runtime/query/tooling.ts +4 -0
- package/src/schedules/cron.ts +202 -0
- package/src/schedules/describe.ts +138 -0
- package/src/schedules/errors.ts +15 -0
- package/src/schedules/evaluate.ts +178 -0
- package/src/schedules/index.ts +18 -0
- package/src/schedules/next-fire.ts +257 -0
- package/src/schedules/spec.ts +210 -0
- package/src/schedules/types.ts +163 -0
- package/src/schedules/tz.ts +155 -0
- package/src/skills/index.ts +1 -1
- package/src/skills/loader.ts +59 -1
- package/src/tools/builtins/bash.ts +24 -6
- package/src/tools/builtins/browser-url.ts +251 -0
- package/src/tools/builtins/browser.ts +817 -0
- package/src/tools/builtins/skill.ts +92 -53
- package/src/tools/command-shell.ts +166 -0
- package/src/tools/defineTool.ts +36 -1
- package/src/tools/schedules/index.ts +4 -0
- package/src/tools/schedules/loop-tool.ts +85 -0
- package/src/tools/schedules/present.ts +86 -0
- package/src/tools/schedules/prompt-scan.ts +96 -0
- package/src/tools/schedules/schedule-tool.ts +376 -0
- package/src/tools/schedules/types.ts +197 -0
- package/src/types/authorization/index.ts +60 -2
- package/src/types/browser/index.ts +341 -0
- package/src/types/hitl/index.ts +21 -0
- package/src/types/session/events.ts +6 -0
- package/src/types/session/records.ts +10 -0
- package/src/types/tool/index.ts +109 -5
- package/src/types/tool/presentation.ts +7 -0
- package/src/utils/frontmatter.ts +81 -5
- package/src/utils/id.ts +14 -0
package/src/utils/frontmatter.ts
CHANGED
|
@@ -117,6 +117,36 @@ export type FrontmatterValue =
|
|
|
117
117
|
| { readonly kind: 'scalar'; readonly value: string }
|
|
118
118
|
| { readonly kind: 'mapping'; readonly entries: Readonly<Record<string, string>> }
|
|
119
119
|
|
|
120
|
+
/** What a caller lets {@link parseFrontmatter} accept beyond flat scalars. */
|
|
121
|
+
export interface FrontmatterOptions {
|
|
122
|
+
/**
|
|
123
|
+
* Keys that may be written as a YAML list — a block sequence (`- item`
|
|
124
|
+
* lines) or a flow sequence (`[a, b]`) — and come back as ONE scalar, the
|
|
125
|
+
* items joined with `", "`.
|
|
126
|
+
*
|
|
127
|
+
* Opt-in per key, because a list is refused everywhere else for a reason:
|
|
128
|
+
* a key the caller reads as a scalar would otherwise come back absent. A
|
|
129
|
+
* caller names a key here only when a comma-separated scalar is already
|
|
130
|
+
* a spelling it reads, so the joined value means what the list did.
|
|
131
|
+
* `allowed-tools` is the case: the Agent Skills format writes it either
|
|
132
|
+
* way.
|
|
133
|
+
*/
|
|
134
|
+
readonly lists?: readonly string[]
|
|
135
|
+
/**
|
|
136
|
+
* The keys the caller reads. When given, a top-level key it answers
|
|
137
|
+
* `false` for is skipped whole — its value and every indented line under
|
|
138
|
+
* it — and does not appear in the result.
|
|
139
|
+
*
|
|
140
|
+
* The refusals in {@link UNSUPPORTED_YAML} exist so a value the caller
|
|
141
|
+
* USES is never read wrongly. A key nobody reads cannot be read wrongly,
|
|
142
|
+
* and refusing the whole file over it made a skill written for another
|
|
143
|
+
* tool (`argument-hint: [file]`, a `hooks:` block with a list in it)
|
|
144
|
+
* unusable here for the sake of a field this kernel ignores. Absent, every
|
|
145
|
+
* key is parsed and refused exactly as before.
|
|
146
|
+
*/
|
|
147
|
+
readonly readsKey?: (key: string) => boolean
|
|
148
|
+
}
|
|
149
|
+
|
|
120
150
|
export interface ParsedFrontmatter {
|
|
121
151
|
/**
|
|
122
152
|
* Every top-level key, in the order the file declared it.
|
|
@@ -136,17 +166,26 @@ export interface ParsedFrontmatter {
|
|
|
136
166
|
readonly body: string
|
|
137
167
|
}
|
|
138
168
|
|
|
169
|
+
/** Optional behaviour for {@link parseFrontmatter}: the same as {@link FrontmatterOptions}. */
|
|
170
|
+
export type ParseFrontmatterOptions = FrontmatterOptions
|
|
171
|
+
|
|
139
172
|
/**
|
|
140
173
|
* Parse a markdown file's `---` frontmatter.
|
|
141
174
|
*
|
|
142
175
|
* @param raw The file's full contents. LF and CRLF both parse.
|
|
143
176
|
* @param source A label for error messages — a path, or a phrase naming the
|
|
144
177
|
* file. Used verbatim, so the caller controls how its own errors read.
|
|
178
|
+
* @param options See {@link FrontmatterOptions}.
|
|
145
179
|
* @throws If the frontmatter is absent, unclosed, or uses YAML this reader
|
|
146
|
-
* does not implement. It never returns a partial
|
|
147
|
-
* for a file it could not read.
|
|
180
|
+
* does not implement in a key the caller reads. It never returns a partial
|
|
181
|
+
* or empty result to stand in for a file it could not read.
|
|
148
182
|
*/
|
|
149
|
-
export function parseFrontmatter(
|
|
183
|
+
export function parseFrontmatter(
|
|
184
|
+
raw: string,
|
|
185
|
+
source: string,
|
|
186
|
+
options: FrontmatterOptions = {},
|
|
187
|
+
): ParsedFrontmatter {
|
|
188
|
+
const listKeys = new Set(options.lists ?? [])
|
|
150
189
|
const trimmed = raw.trimStart()
|
|
151
190
|
|
|
152
191
|
if (!trimmed.startsWith(FRONTMATTER_DELIMITER)) {
|
|
@@ -174,15 +213,20 @@ export function parseFrontmatter(raw: string, source: string): ParsedFrontmatter
|
|
|
174
213
|
// round trip is safe at both ends.
|
|
175
214
|
const data = new Map<string, string>()
|
|
176
215
|
const blocks = new Map<string, Map<string, string>>()
|
|
216
|
+
const lists = new Map<string, string[]>()
|
|
177
217
|
let currentKey: string | undefined
|
|
218
|
+
// The current top-level key is one the caller does not read: its value
|
|
219
|
+
// and its indented lines are skipped rather than parsed or refused.
|
|
220
|
+
let skipping = false
|
|
178
221
|
|
|
179
222
|
for (const line of frontmatterRaw.split(LINE_SPLIT)) {
|
|
180
223
|
if (!line.trim() || line.trimStart().startsWith('#')) continue
|
|
181
224
|
|
|
182
225
|
if (/^\s/.test(line)) {
|
|
183
|
-
if (!currentKey) continue
|
|
226
|
+
if (!currentKey || skipping) continue
|
|
184
227
|
|
|
185
|
-
// A block sequence item.
|
|
228
|
+
// A block sequence item. Read as a list when the caller named this
|
|
229
|
+
// key in `options.lists`; refused, not skipped, everywhere else.
|
|
186
230
|
//
|
|
187
231
|
// These lines carry no `:`, so the `continue` below used to drop them
|
|
188
232
|
// and the key — having no scalar value and no mapping entries — came
|
|
@@ -195,6 +239,18 @@ export function parseFrontmatter(raw: string, source: string): ParsedFrontmatter
|
|
|
195
239
|
// and silently did not get it is indistinguishable from one that never
|
|
196
240
|
// asked. A capability quietly not granted is the worst thing this
|
|
197
241
|
// reader can produce.
|
|
242
|
+
if (listKeys.has(currentKey) && !data.has(currentKey) && /^\s*-(\s|$)/.test(line)) {
|
|
243
|
+
const item = normalizeScalar(line.replace(/^\s*-/, ''))
|
|
244
|
+
if (item) {
|
|
245
|
+
let list = lists.get(currentKey)
|
|
246
|
+
if (!list) {
|
|
247
|
+
list = []
|
|
248
|
+
lists.set(currentKey, list)
|
|
249
|
+
}
|
|
250
|
+
list.push(item)
|
|
251
|
+
}
|
|
252
|
+
continue
|
|
253
|
+
}
|
|
198
254
|
if (/^\s*-\s/.test(line)) {
|
|
199
255
|
throw new Error(
|
|
200
256
|
`${source}: "${currentKey}" uses a block sequence (a "- " list), which this reader does not support. Write it as a single-line value instead. Refusing rather than reading "${currentKey}" as absent, which is what silently dropping the list would mean.`,
|
|
@@ -218,8 +274,25 @@ export function parseFrontmatter(raw: string, source: string): ParsedFrontmatter
|
|
|
218
274
|
const colonIdx = line.indexOf(':')
|
|
219
275
|
if (colonIdx === -1) continue
|
|
220
276
|
const key = line.slice(0, colonIdx).trim()
|
|
277
|
+
if (options.readsKey && !options.readsKey(key)) {
|
|
278
|
+
currentKey = key
|
|
279
|
+
skipping = true
|
|
280
|
+
continue
|
|
281
|
+
}
|
|
282
|
+
skipping = false
|
|
221
283
|
const value = normalizeScalar(line.slice(colonIdx + 1))
|
|
222
284
|
|
|
285
|
+
if (listKeys.has(key) && /^\[.*\]$/.test(value)) {
|
|
286
|
+
currentKey = key
|
|
287
|
+
const items = value
|
|
288
|
+
.slice(1, -1)
|
|
289
|
+
.split(',')
|
|
290
|
+
.map(normalizeScalar)
|
|
291
|
+
.filter((item) => item.length > 0)
|
|
292
|
+
// `[]` is a list the author declared empty, which is not absence.
|
|
293
|
+
data.set(key, items.join(', '))
|
|
294
|
+
continue
|
|
295
|
+
}
|
|
223
296
|
assertReadableScalar(key, value, source)
|
|
224
297
|
|
|
225
298
|
currentKey = key
|
|
@@ -230,6 +303,9 @@ export function parseFrontmatter(raw: string, source: string): ParsedFrontmatter
|
|
|
230
303
|
// that — so refusing here is what makes the illegal state unrepresentable
|
|
231
304
|
// in the returned type rather than merely undocumented. The alternative,
|
|
232
305
|
// picking a precedence, would silently drop half of what the author wrote.
|
|
306
|
+
for (const [key, items] of lists) {
|
|
307
|
+
if (!data.has(key)) data.set(key, items.join(', '))
|
|
308
|
+
}
|
|
233
309
|
for (const key of blocks.keys()) {
|
|
234
310
|
if (!data.has(key)) continue
|
|
235
311
|
throw new Error(
|
package/src/utils/id.ts
CHANGED
|
@@ -197,6 +197,20 @@ export function generateDeliverableId(): DeliverableId {
|
|
|
197
197
|
return generateId()
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
+
/**
|
|
201
|
+
* The id of a scheduled job, for a host that stores schedules (the CLI's
|
|
202
|
+
* `NAMZU_HOME/schedule/`). A plain UUIDv7 string: jobs are the host's records,
|
|
203
|
+
* not a kernel entity, so there is no branded kind for them.
|
|
204
|
+
*/
|
|
205
|
+
export function generateScheduleJobId(): string {
|
|
206
|
+
return uuidv7()
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** The id of one run of a scheduled job. See {@link generateScheduleJobId}. */
|
|
210
|
+
export function generateScheduleRunId(): string {
|
|
211
|
+
return uuidv7()
|
|
212
|
+
}
|
|
213
|
+
|
|
200
214
|
/** Entity kinds are supplied by a typed field or storage collection. */
|
|
201
215
|
export interface EntityIdByKind {
|
|
202
216
|
turn: TurnId
|