thoth-agents 0.1.1 → 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 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 = {
@@ -669,7 +670,7 @@ var DEFAULT_MODELS = {
669
670
  };
670
671
  var DEFAULT_TIMEOUT_MS = 2 * 60 * 1e3;
671
672
  var MAX_POLL_TIME_MS = 5 * 60 * 1e3;
672
- var DEFAULT_THOTH_COMMAND = ["pnpm", "dlx", "thoth-mem@latest"];
673
+ var DEFAULT_THOTH_COMMAND = ["npx", "-y", "thoth-mem"];
673
674
 
674
675
  // src/config/loader.ts
675
676
  import * as fs from "fs";
@@ -2512,14 +2513,19 @@ function renderCodexSkillLayout(input) {
2512
2513
  }
2513
2514
 
2514
2515
  // src/harness/adapters/codex.ts
2515
- function readRootPackageVersion(startDir) {
2516
- const packageJsonPath = findRootPackageJsonPath([startDir, process.cwd()]);
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(projectRoot) {
2525
+ function createCodexPluginPackageManifest(context) {
2520
2526
  return {
2521
2527
  name: "thoth-agents",
2522
- version: readRootPackageVersion(projectRoot),
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.projectRoot),
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 = fileURLToPath(new URL(".", import.meta.url));
3835
- return findPackageRoot(moduleDir) ?? fileURLToPath(new URL("../..", import.meta.url));
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;
@@ -51,6 +51,7 @@ export interface CapabilityGapDiagnostic extends HarnessDiagnostic {
51
51
  }
52
52
  export interface HarnessRenderContext {
53
53
  projectRoot: string;
54
+ packageRoot?: string;
54
55
  options?: HarnessRenderOptions;
55
56
  }
56
57
  export interface HarnessRenderResult {
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ var DEFAULT_MODELS = {
26
26
  var POLL_INTERVAL_BACKGROUND_MS = 2e3;
27
27
  var DEFAULT_TIMEOUT_MS = 2 * 60 * 1e3;
28
28
  var MAX_POLL_TIME_MS = 5 * 60 * 1e3;
29
- var DEFAULT_THOTH_COMMAND = ["pnpm", "dlx", "thoth-mem@latest"];
29
+ var DEFAULT_THOTH_COMMAND = ["npx", "-y", "thoth-mem"];
30
30
 
31
31
  // src/config/loader.ts
32
32
  import * as fs from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thoth-agents",
3
- "version": "0.1.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
+ }