thoth-agents 0.1.2 → 0.1.4
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 -21
- package/dist/cli/index.js +17 -8
- package/dist/harness/adapters/codex.d.ts +1 -0
- package/dist/harness/types.d.ts +1 -0
- package/package.json +18 -16
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
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/cli/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import { pathToFileURL } from "url";
|
|
|
6
6
|
// src/harness/adapters/codex.ts
|
|
7
7
|
import { existsSync as existsSync5, readFileSync as readFileSync4 } from "fs";
|
|
8
8
|
import { dirname as dirname2, resolve } from "path";
|
|
9
|
+
import { fileURLToPath } from "url";
|
|
9
10
|
|
|
10
11
|
// src/agents/prompt-dialects.ts
|
|
11
12
|
var OPENCODE_CAPABILITIES = {
|
|
@@ -2512,14 +2513,19 @@ function renderCodexSkillLayout(input) {
|
|
|
2512
2513
|
}
|
|
2513
2514
|
|
|
2514
2515
|
// src/harness/adapters/codex.ts
|
|
2515
|
-
function readRootPackageVersion(
|
|
2516
|
-
const packageJsonPath = findRootPackageJsonPath([
|
|
2516
|
+
function readRootPackageVersion(context) {
|
|
2517
|
+
const packageJsonPath = findRootPackageJsonPath([
|
|
2518
|
+
...hasCodexPackageRoot(context) ? [context.packageRoot] : [],
|
|
2519
|
+
context.projectRoot,
|
|
2520
|
+
process.cwd(),
|
|
2521
|
+
fileURLToPath(new URL(".", import.meta.url))
|
|
2522
|
+
]);
|
|
2517
2523
|
return readPackageJsonVersion(packageJsonPath);
|
|
2518
2524
|
}
|
|
2519
|
-
function createCodexPluginPackageManifest(
|
|
2525
|
+
function createCodexPluginPackageManifest(context) {
|
|
2520
2526
|
return {
|
|
2521
2527
|
name: "thoth-agents",
|
|
2522
|
-
version: readRootPackageVersion(
|
|
2528
|
+
version: readRootPackageVersion(context),
|
|
2523
2529
|
description: "Delegate-first OpenCode plugin with seven agents, thoth-mem persistence, and bundled SDD skills."
|
|
2524
2530
|
};
|
|
2525
2531
|
}
|
|
@@ -2726,6 +2732,9 @@ function codexSurfaceHasField(surfaceId, field) {
|
|
|
2726
2732
|
function hasCodexConfig(context) {
|
|
2727
2733
|
return "config" in context;
|
|
2728
2734
|
}
|
|
2735
|
+
function hasCodexPackageRoot(context) {
|
|
2736
|
+
return "packageRoot" in context && typeof context.packageRoot === "string" && context.packageRoot.length > 0;
|
|
2737
|
+
}
|
|
2729
2738
|
function renderAgentArtifacts({ config }) {
|
|
2730
2739
|
const artifacts = [];
|
|
2731
2740
|
const diagnostics = [];
|
|
@@ -2850,7 +2859,7 @@ var codexAdapter = {
|
|
|
2850
2859
|
outputModes: skillOutputModes
|
|
2851
2860
|
});
|
|
2852
2861
|
const pluginPackage = renderCodexPluginPackage({
|
|
2853
|
-
manifest: createCodexPluginPackageManifest(context
|
|
2862
|
+
manifest: createCodexPluginPackageManifest(context),
|
|
2854
2863
|
assets: [
|
|
2855
2864
|
{
|
|
2856
2865
|
surfaceId: "plugin-skills-directory",
|
|
@@ -3629,7 +3638,7 @@ import {
|
|
|
3629
3638
|
statSync as statSync4
|
|
3630
3639
|
} from "fs";
|
|
3631
3640
|
import { dirname as dirname5, join as join8, parse } from "path";
|
|
3632
|
-
import { fileURLToPath } from "url";
|
|
3641
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
3633
3642
|
|
|
3634
3643
|
// src/cli/skill-manifest.ts
|
|
3635
3644
|
import { createHash as createHash3 } from "crypto";
|
|
@@ -3831,8 +3840,8 @@ function resolvePackageRoot(packageRoot) {
|
|
|
3831
3840
|
if (packageRoot) {
|
|
3832
3841
|
return packageRoot;
|
|
3833
3842
|
}
|
|
3834
|
-
const moduleDir =
|
|
3835
|
-
return findPackageRoot(moduleDir) ??
|
|
3843
|
+
const moduleDir = fileURLToPath2(new URL(".", import.meta.url));
|
|
3844
|
+
return findPackageRoot(moduleDir) ?? fileURLToPath2(new URL("../..", import.meta.url));
|
|
3836
3845
|
}
|
|
3837
3846
|
function installCustomSkillFiles(skill, packageRoot) {
|
|
3838
3847
|
const sourcePath = join8(packageRoot, skill.sourcePath);
|
|
@@ -2,6 +2,7 @@ import { type PluginConfig } from '../../config';
|
|
|
2
2
|
import type { HarnessAdapter, HarnessCapabilities, HarnessRenderContext } from '../types';
|
|
3
3
|
export interface CodexRenderContext extends HarnessRenderContext {
|
|
4
4
|
config?: PluginConfig;
|
|
5
|
+
packageRoot?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const CODEX_CAPABILITIES: HarnessCapabilities;
|
|
7
8
|
export declare function renderCodexRootInstructions(config?: PluginConfig): string;
|
package/dist/harness/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "thoth-agents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Delegate-first OpenCode plugin with seven agents, thoth-mem persistence, and bundled SDD skills.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"license": "MIT",
|
|
12
|
+
"packageManager": "pnpm@11.2.2",
|
|
12
13
|
"engines": {
|
|
13
14
|
"node": ">=22.13"
|
|
14
15
|
},
|
|
@@ -39,6 +40,21 @@
|
|
|
39
40
|
"README.md",
|
|
40
41
|
"LICENSE"
|
|
41
42
|
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup && tsc --emitDeclarationOnly && pnpm run generate-schema",
|
|
45
|
+
"generate-schema": "tsx scripts/generate-schema.ts",
|
|
46
|
+
"typecheck": "tsc --noEmit",
|
|
47
|
+
"test": "vitest run",
|
|
48
|
+
"lint": "biome lint .",
|
|
49
|
+
"format": "biome format . --write",
|
|
50
|
+
"check": "biome check --write .",
|
|
51
|
+
"check:ci": "biome check .",
|
|
52
|
+
"dev": "pnpm run build && opencode",
|
|
53
|
+
"prepublishOnly": "pnpm run build",
|
|
54
|
+
"release:patch": "npm version patch && git push --follow-tags",
|
|
55
|
+
"release:minor": "npm version minor && git push --follow-tags",
|
|
56
|
+
"release:major": "npm version major && git push --follow-tags"
|
|
57
|
+
},
|
|
42
58
|
"dependencies": {
|
|
43
59
|
"@ast-grep/cli": "^0.40.0",
|
|
44
60
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
@@ -63,19 +79,5 @@
|
|
|
63
79
|
"hono": "4.12.19",
|
|
64
80
|
"postcss": "8.5.14",
|
|
65
81
|
"tsx": "4.22.2"
|
|
66
|
-
},
|
|
67
|
-
"scripts": {
|
|
68
|
-
"build": "tsup && tsc --emitDeclarationOnly && pnpm run generate-schema",
|
|
69
|
-
"generate-schema": "tsx scripts/generate-schema.ts",
|
|
70
|
-
"typecheck": "tsc --noEmit",
|
|
71
|
-
"test": "vitest run",
|
|
72
|
-
"lint": "biome lint .",
|
|
73
|
-
"format": "biome format . --write",
|
|
74
|
-
"check": "biome check --write .",
|
|
75
|
-
"check:ci": "biome check .",
|
|
76
|
-
"dev": "pnpm run build && opencode",
|
|
77
|
-
"release:patch": "npm version patch && git push --follow-tags && npm publish",
|
|
78
|
-
"release:minor": "npm version minor && git push --follow-tags && npm publish",
|
|
79
|
-
"release:major": "npm version major && git push --follow-tags && npm publish"
|
|
80
82
|
}
|
|
81
|
-
}
|
|
83
|
+
}
|