@task0/cli 0.2.0 → 0.2.1
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/LICENSE +21 -0
- package/dist/main.js +18 -6
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ying Cai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/main.js
CHANGED
|
@@ -901,6 +901,9 @@ var init_task_state2 = __esm({
|
|
|
901
901
|
});
|
|
902
902
|
|
|
903
903
|
// src/main.ts
|
|
904
|
+
import { readFileSync } from "fs";
|
|
905
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
906
|
+
import path24 from "path";
|
|
904
907
|
import { Command as Command22 } from "commander";
|
|
905
908
|
|
|
906
909
|
// src/commands/source.ts
|
|
@@ -1141,11 +1144,11 @@ async function request(method, pathname, body) {
|
|
|
1141
1144
|
return parsed;
|
|
1142
1145
|
}
|
|
1143
1146
|
var api = {
|
|
1144
|
-
get: (
|
|
1145
|
-
post: (
|
|
1146
|
-
put: (
|
|
1147
|
-
patch: (
|
|
1148
|
-
del: (
|
|
1147
|
+
get: (path25) => request("GET", path25),
|
|
1148
|
+
post: (path25, body) => request("POST", path25, body ?? {}),
|
|
1149
|
+
put: (path25, body) => request("PUT", path25, body ?? {}),
|
|
1150
|
+
patch: (path25, body) => request("PATCH", path25, body ?? {}),
|
|
1151
|
+
del: (path25) => request("DELETE", path25)
|
|
1149
1152
|
};
|
|
1150
1153
|
|
|
1151
1154
|
// src/commands/task/triage.ts
|
|
@@ -4747,7 +4750,16 @@ function captureTopLevel(err, options) {
|
|
|
4747
4750
|
}
|
|
4748
4751
|
|
|
4749
4752
|
// src/main.ts
|
|
4750
|
-
var TASK0_VERSION =
|
|
4753
|
+
var TASK0_VERSION = readVersion();
|
|
4754
|
+
function readVersion() {
|
|
4755
|
+
try {
|
|
4756
|
+
const here = path24.dirname(fileURLToPath2(import.meta.url));
|
|
4757
|
+
const pkg = JSON.parse(readFileSync(path24.resolve(here, "..", "package.json"), "utf-8"));
|
|
4758
|
+
return pkg.version ?? "unknown";
|
|
4759
|
+
} catch {
|
|
4760
|
+
return "unknown";
|
|
4761
|
+
}
|
|
4762
|
+
}
|
|
4751
4763
|
var program = new Command22().name("task0").description("Task-centric control layer for agent workflow").version(TASK0_VERSION);
|
|
4752
4764
|
program.addCommand(source);
|
|
4753
4765
|
program.addCommand(project);
|