@onetaskgraph/sdk 0.2.46 → 0.2.48

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 (2) hide show
  1. package/README.md +11 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -34,3 +34,14 @@ to the binary on standard input, and `vars` outrank them as `--var NAME=VALUE`.
34
34
  Run `bun run --cwd sdks/typescript generate` after changing the binary contract. The gate's
35
35
  `./scripts/nx.sh run sdk-typescript:generate-check` target builds the binary and then fails
36
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.46",
4
+ "version": "0.2.48",
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.46"
31
+ "@onetaskgraph/cli": "0.2.48"
32
32
  },
33
33
  "devDependencies": {
34
34
  "ajv": "8.17.1",