@onetaskgraph/sdk 0.2.45 → 0.2.47
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/README.md +16 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,6 +26,22 @@ schemas generated from `onetaskgraph schema` before returning it. Query response
|
|
|
26
26
|
their `plan` and typed `errors`; exit code 4 therefore resolves to the validated partial
|
|
27
27
|
response instead of discarding the successful sources.
|
|
28
28
|
|
|
29
|
+
Every invocation also passes `--no-interactive`, so no call ever waits on a prompt: a
|
|
30
|
+
template variable nothing answers takes its default, and a required one left unanswered is
|
|
31
|
+
refused with exit 2. `templateRender(file, { searchPath, answers, vars })` hands `answers`
|
|
32
|
+
to the binary on standard input, and `vars` outrank them as `--var NAME=VALUE`.
|
|
33
|
+
|
|
29
34
|
Run `bun run --cwd sdks/typescript generate` after changing the binary contract. The gate's
|
|
30
35
|
`./scripts/nx.sh run sdk-typescript:generate-check` target builds the binary and then fails
|
|
31
36
|
naming any generated file that would change.
|
|
37
|
+
|
|
38
|
+
`taskCreate(source, project, title, { template, answers })` and `documentCreate(...)` create
|
|
39
|
+
an item from a template file — or from `templateLoader` (the path of a loader document naming
|
|
40
|
+
what to render), or from a plain `body` or `bodyFile` — and answer as `taskShow` and
|
|
41
|
+
`documentShow` do; a rendered item records its `onetaskgraph.template` provenance, whose shape
|
|
42
|
+
is the `TemplateProvenance` type. `taskRender(id, ...)` and `documentRender(id, ...)`
|
|
43
|
+
regenerate one in place from its stored answers, with `answers`, `vars` and `unset` laid over
|
|
44
|
+
them; `taskAnswers(id)` and `documentAnswers(id)` answer with the stored `TemplateAnswers`.
|
|
45
|
+
`templateVariables` and `templateRender` take `{ templateLoader }` in place of a file. A
|
|
46
|
+
`body` and `answers` are never passed together — both would go to the binary's one standard
|
|
47
|
+
input — so the call is refused instead.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onetaskgraph/sdk",
|
|
3
3
|
"//": "llmlint: ignore-file[projects_stay_in_one_js_workspace] This package IS the JS workspace's one member; what the rule reads as a second is the optionalDependency below, which is the published launcher an end user installs beside the SDK and resolves from the registry at their own install. `workspace:*` names nothing there, and npm/cli is not a workspace member for the reason its own manifest records. scripts/set-version.sh writes this number and `--check` refuses any other, under distribution-check. JSON has no comment to scope this to the one line.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.47",
|
|
5
5
|
"description": "The TypeScript SDK for onetaskgraph, generated from the binary's own JSON Schema bundle.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"generate:check": "bun scripts/generate.ts --check"
|
|
29
29
|
},
|
|
30
30
|
"optionalDependencies": {
|
|
31
|
-
"@onetaskgraph/cli": "0.2.
|
|
31
|
+
"@onetaskgraph/cli": "0.2.47"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"ajv": "8.17.1",
|