@theokit/sdk 4.35.0 → 4.36.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.36.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a439c00: `discoverSubagents` and `loadSubagentDefinition` now accept a `settingSources` option, so a caller can decide where subagent definitions are read from instead of always reading the project directory; the parsed `AgentDefinition` type is re-exported from `@theokit/sdk/subagents-loader` so consumers can name the value they receive.
8
+
3
9
  ## 4.35.0
4
10
 
5
11
  ### Minor Changes
@@ -2,15 +2,30 @@
2
2
 
3
3
  var chunkRZQ6E5YZ_cjs = require('./chunk-RZQ6E5YZ.cjs');
4
4
  require('./chunk-LALRCFSN.cjs');
5
- require('./chunk-A44COQJJ.cjs');
5
+ var chunkA44COQJJ_cjs = require('./chunk-A44COQJJ.cjs');
6
6
  require('./chunk-BEURCLDV.cjs');
7
7
 
8
8
  // src/subagents-loader.ts
9
- async function discoverSubagents(cwd) {
10
- return chunkRZQ6E5YZ_cjs.loadSubagents(cwd, true, void 0);
9
+ var FONTES_ACEITAS = ["project"];
10
+ function resolverFontes(options) {
11
+ const declaradas = options?.settingSources;
12
+ if (declaradas === void 0) return FONTES_ACEITAS;
13
+ for (const fonte of declaradas) {
14
+ if (!FONTES_ACEITAS.includes(fonte)) {
15
+ throw new chunkA44COQJJ_cjs.ConfigurationError(
16
+ `Unknown subagent setting source "${String(fonte)}" (accepted: ${FONTES_ACEITAS.join(", ")})`,
17
+ { code: "subagent_unknown_setting_source" }
18
+ );
19
+ }
20
+ }
21
+ return declaradas;
11
22
  }
12
- async function loadSubagentDefinition(name, cwd) {
13
- return (await discoverSubagents(cwd))[name];
23
+ async function discoverSubagents(cwd, options) {
24
+ const fontes = resolverFontes(options);
25
+ return chunkRZQ6E5YZ_cjs.loadSubagents(cwd, fontes.includes("project"), void 0);
26
+ }
27
+ async function loadSubagentDefinition(name, cwd, options) {
28
+ return (await discoverSubagents(cwd, options))[name];
14
29
  }
15
30
 
16
31
  exports.discoverSubagents = discoverSubagents;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/subagents-loader.ts"],"names":["loadSubagents"],"mappings":";;;;;;;;AA4BA,eAAsB,kBAAkB,GAAA,EAAuD;AAC7F,EAAA,OAAOA,+BAAA,CAAc,GAAA,EAAK,IAAA,EAAM,MAAS,CAAA;AAC3C;AAQA,eAAsB,sBAAA,CACpB,MACA,GAAA,EACsC;AACtC,EAAA,OAAA,CAAQ,MAAM,iBAAA,CAAkB,GAAG,CAAA,EAAG,IAAI,CAAA;AAC5C","file":"subagents-loader.cjs","sourcesContent":["/**\n * M81 — `.theokit/agents` discovery, exposed so a consumer can read the on-disk subagent\n * definitions with one import instead of hand-rolling a second parser.\n *\n * ## Why this file exists\n *\n * `src/skills.ts` already exposed `discoverSkills` for the sibling domain. Subagents had the same\n * loader — `internal/runtime/skills/subagents-loader.ts` — with no public door. A consumer behind\n * the layer boundary (the agent-builder never imports `@theokit/sdk*` directly) could not reach it,\n * so re-implementing was the only legal option. It re-implemented, and then wrote a test whose only\n * job was to watch the two parsers for drift. That test is the cleanest possible evidence that the\n * duplication should not exist.\n *\n * ## What crosses is the PARSED config\n *\n * The return is `AgentDefinition` — already interpreted — never the `.md` text or the frontmatter\n * shape. Exporting the file format would freeze an internal detail as public API; exporting the\n * parsed value leaves the format free to change.\n */\n\nimport { loadSubagents } from \"./internal/runtime/skills/subagents-loader.js\";\nimport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * Discover the subagents defined under `<cwd>/.theokit/agents/*.md`.\n *\n * An absent directory yields `{}` — a project without subagents is the common case, not an error.\n */\nexport async function discoverSubagents(cwd: string): Promise<Record<string, AgentDefinition>> {\n return loadSubagents(cwd, true, undefined);\n}\n\n/**\n * Load ONE subagent definition by name, or `undefined` when it is not defined on disk.\n *\n * A thin selector over {@link discoverSubagents} rather than a second reader: one parser is the\n * whole point of this module.\n */\nexport async function loadSubagentDefinition(\n name: string,\n cwd: string,\n): Promise<AgentDefinition | undefined> {\n return (await discoverSubagents(cwd))[name];\n}\n"]}
1
+ {"version":3,"sources":["../src/subagents-loader.ts"],"names":["ConfigurationError","loadSubagents"],"mappings":";;;;;;;;AAuCA,IAAM,cAAA,GAA4C,CAAC,SAAS,CAAA;AAgB5D,SAAS,eAAe,OAAA,EAA0E;AAChG,EAAA,MAAM,aAAa,OAAA,EAAS,cAAA;AAC5B,EAAA,IAAI,UAAA,KAAe,QAAW,OAAO,cAAA;AACrC,EAAA,KAAA,MAAW,SAAS,UAAA,EAAY;AAC9B,IAAA,IAAI,CAAC,cAAA,CAAe,QAAA,CAAS,KAAK,CAAA,EAAG;AACnC,MAAA,MAAM,IAAIA,oCAAA;AAAA,QACR,CAAA,iCAAA,EAAoC,OAAO,KAAK,CAAC,gBAAgB,cAAA,CAAe,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,CAAA;AAAA,QAC1F,EAAE,MAAM,iCAAA;AAAkC,OAC5C;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,UAAA;AACT;AAOA,eAAsB,iBAAA,CACpB,KACA,OAAA,EAC0C;AAC1C,EAAA,MAAM,MAAA,GAAS,eAAe,OAAO,CAAA;AACrC,EAAA,OAAOC,gCAAc,GAAA,EAAK,MAAA,CAAO,QAAA,CAAS,SAAS,GAAG,MAAS,CAAA;AACjE;AAQA,eAAsB,sBAAA,CACpB,IAAA,EACA,GAAA,EACA,OAAA,EACsC;AACtC,EAAA,OAAA,CAAQ,MAAM,iBAAA,CAAkB,GAAA,EAAK,OAAO,GAAG,IAAI,CAAA;AACrD","file":"subagents-loader.cjs","sourcesContent":["/**\n * M81 — `.theokit/agents` discovery, exposed so a consumer can read the on-disk subagent\n * definitions with one import instead of hand-rolling a second parser.\n *\n * ## Why this file exists\n *\n * `src/skills.ts` already exposed `discoverSkills` for the sibling domain. Subagents had the same\n * loader — `internal/runtime/skills/subagents-loader.ts` — with no public door. A consumer behind\n * the layer boundary (the agent-builder never imports `@theokit/sdk*` directly) could not reach it,\n * so re-implementing was the only legal option. It re-implemented, and then wrote a test whose only\n * job was to watch the two parsers for drift. That test is the cleanest possible evidence that the\n * duplication should not exist.\n *\n * ## What crosses is the PARSED config\n *\n * The return is `AgentDefinition` — already interpreted — never the `.md` text or the frontmatter\n * shape. Exporting the file format would freeze an internal detail as public API; exporting the\n * parsed value leaves the format free to change.\n */\n\nimport { ConfigurationError } from \"./errors.js\";\nimport { loadSubagents } from \"./internal/runtime/skills/subagents-loader.js\";\nimport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * The parsed subagent definition this module hands back.\n *\n * Re-exported here — beside the loader that produces it — so a consumer can NAME the value it\n * receives without reaching into `types/agent`, which no subpath publishes. A layer above may then\n * alias it (`AgentDefinition as SubagentDefinition`) to sidestep a name it has already spent.\n */\nexport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * Where subagent definitions may be read from. A closed union rather than a boolean: a third\n * source can join it without breaking the signature, and the call site reads as what it means.\n */\nexport type SubagentSource = \"project\";\n\nconst FONTES_ACEITAS: readonly SubagentSource[] = [\"project\"];\n\n/** Options for {@link discoverSubagents} / {@link loadSubagentDefinition}. */\nexport interface DiscoverSubagentsOptions {\n /**\n * Which sources to read. Defaults to `[\"project\"]` — `<cwd>/.theokit/agents/*.md`.\n *\n * An empty list reads NOTHING: the directory is never opened, so a caller that has not yet\n * established trust in `cwd` can decline the read rather than filter its result.\n */\n readonly settingSources?: readonly SubagentSource[];\n}\n\n// Validated at the boundary (error-handling.md § 2): the union is erased at runtime, so a JS\n// caller — or a value crossing a serialization hop — can still carry a source nobody honors.\n// Dropping it silently would read as \"no subagents found\", which is the same shape as success.\nfunction resolverFontes(options: DiscoverSubagentsOptions | undefined): readonly SubagentSource[] {\n const declaradas = options?.settingSources;\n if (declaradas === undefined) return FONTES_ACEITAS;\n for (const fonte of declaradas) {\n if (!FONTES_ACEITAS.includes(fonte)) {\n throw new ConfigurationError(\n `Unknown subagent setting source \"${String(fonte)}\" (accepted: ${FONTES_ACEITAS.join(\", \")})`,\n { code: \"subagent_unknown_setting_source\" },\n );\n }\n }\n return declaradas;\n}\n\n/**\n * Discover the subagents defined under `<cwd>/.theokit/agents/*.md`.\n *\n * An absent directory yields `{}` — a project without subagents is the common case, not an error.\n */\nexport async function discoverSubagents(\n cwd: string,\n options?: DiscoverSubagentsOptions,\n): Promise<Record<string, AgentDefinition>> {\n const fontes = resolverFontes(options);\n return loadSubagents(cwd, fontes.includes(\"project\"), undefined);\n}\n\n/**\n * Load ONE subagent definition by name, or `undefined` when it is not defined on disk.\n *\n * A thin selector over {@link discoverSubagents} rather than a second reader: one parser is the\n * whole point of this module.\n */\nexport async function loadSubagentDefinition(\n name: string,\n cwd: string,\n options?: DiscoverSubagentsOptions,\n): Promise<AgentDefinition | undefined> {\n return (await discoverSubagents(cwd, options))[name];\n}\n"]}
@@ -22,18 +22,33 @@ import 'zod';
22
22
  * parsed value leaves the format free to change.
23
23
  */
24
24
 
25
+ /**
26
+ * Where subagent definitions may be read from. A closed union rather than a boolean: a third
27
+ * source can join it without breaking the signature, and the call site reads as what it means.
28
+ */
29
+ type SubagentSource = "project";
30
+ /** Options for {@link discoverSubagents} / {@link loadSubagentDefinition}. */
31
+ interface DiscoverSubagentsOptions {
32
+ /**
33
+ * Which sources to read. Defaults to `["project"]` — `<cwd>/.theokit/agents/*.md`.
34
+ *
35
+ * An empty list reads NOTHING: the directory is never opened, so a caller that has not yet
36
+ * established trust in `cwd` can decline the read rather than filter its result.
37
+ */
38
+ readonly settingSources?: readonly SubagentSource[];
39
+ }
25
40
  /**
26
41
  * Discover the subagents defined under `<cwd>/.theokit/agents/*.md`.
27
42
  *
28
43
  * An absent directory yields `{}` — a project without subagents is the common case, not an error.
29
44
  */
30
- declare function discoverSubagents(cwd: string): Promise<Record<string, AgentDefinition>>;
45
+ declare function discoverSubagents(cwd: string, options?: DiscoverSubagentsOptions): Promise<Record<string, AgentDefinition>>;
31
46
  /**
32
47
  * Load ONE subagent definition by name, or `undefined` when it is not defined on disk.
33
48
  *
34
49
  * A thin selector over {@link discoverSubagents} rather than a second reader: one parser is the
35
50
  * whole point of this module.
36
51
  */
37
- declare function loadSubagentDefinition(name: string, cwd: string): Promise<AgentDefinition | undefined>;
52
+ declare function loadSubagentDefinition(name: string, cwd: string, options?: DiscoverSubagentsOptions): Promise<AgentDefinition | undefined>;
38
53
 
39
- export { discoverSubagents, loadSubagentDefinition };
54
+ export { AgentDefinition, type DiscoverSubagentsOptions, type SubagentSource, discoverSubagents, loadSubagentDefinition };
@@ -22,18 +22,33 @@ import 'zod';
22
22
  * parsed value leaves the format free to change.
23
23
  */
24
24
 
25
+ /**
26
+ * Where subagent definitions may be read from. A closed union rather than a boolean: a third
27
+ * source can join it without breaking the signature, and the call site reads as what it means.
28
+ */
29
+ type SubagentSource = "project";
30
+ /** Options for {@link discoverSubagents} / {@link loadSubagentDefinition}. */
31
+ interface DiscoverSubagentsOptions {
32
+ /**
33
+ * Which sources to read. Defaults to `["project"]` — `<cwd>/.theokit/agents/*.md`.
34
+ *
35
+ * An empty list reads NOTHING: the directory is never opened, so a caller that has not yet
36
+ * established trust in `cwd` can decline the read rather than filter its result.
37
+ */
38
+ readonly settingSources?: readonly SubagentSource[];
39
+ }
25
40
  /**
26
41
  * Discover the subagents defined under `<cwd>/.theokit/agents/*.md`.
27
42
  *
28
43
  * An absent directory yields `{}` — a project without subagents is the common case, not an error.
29
44
  */
30
- declare function discoverSubagents(cwd: string): Promise<Record<string, AgentDefinition>>;
45
+ declare function discoverSubagents(cwd: string, options?: DiscoverSubagentsOptions): Promise<Record<string, AgentDefinition>>;
31
46
  /**
32
47
  * Load ONE subagent definition by name, or `undefined` when it is not defined on disk.
33
48
  *
34
49
  * A thin selector over {@link discoverSubagents} rather than a second reader: one parser is the
35
50
  * whole point of this module.
36
51
  */
37
- declare function loadSubagentDefinition(name: string, cwd: string): Promise<AgentDefinition | undefined>;
52
+ declare function loadSubagentDefinition(name: string, cwd: string, options?: DiscoverSubagentsOptions): Promise<AgentDefinition | undefined>;
38
53
 
39
- export { discoverSubagents, loadSubagentDefinition };
54
+ export { AgentDefinition, type DiscoverSubagentsOptions, type SubagentSource, discoverSubagents, loadSubagentDefinition };
@@ -1,14 +1,29 @@
1
1
  import { loadSubagents } from './chunk-BNIFFFH3.js';
2
2
  import './chunk-FKCC2MED.js';
3
- import './chunk-WLKFWQSJ.js';
3
+ import { ConfigurationError } from './chunk-WLKFWQSJ.js';
4
4
  import './chunk-JTFYYKDT.js';
5
5
 
6
6
  // src/subagents-loader.ts
7
- async function discoverSubagents(cwd) {
8
- return loadSubagents(cwd, true, void 0);
7
+ var FONTES_ACEITAS = ["project"];
8
+ function resolverFontes(options) {
9
+ const declaradas = options?.settingSources;
10
+ if (declaradas === void 0) return FONTES_ACEITAS;
11
+ for (const fonte of declaradas) {
12
+ if (!FONTES_ACEITAS.includes(fonte)) {
13
+ throw new ConfigurationError(
14
+ `Unknown subagent setting source "${String(fonte)}" (accepted: ${FONTES_ACEITAS.join(", ")})`,
15
+ { code: "subagent_unknown_setting_source" }
16
+ );
17
+ }
18
+ }
19
+ return declaradas;
9
20
  }
10
- async function loadSubagentDefinition(name, cwd) {
11
- return (await discoverSubagents(cwd))[name];
21
+ async function discoverSubagents(cwd, options) {
22
+ const fontes = resolverFontes(options);
23
+ return loadSubagents(cwd, fontes.includes("project"), void 0);
24
+ }
25
+ async function loadSubagentDefinition(name, cwd, options) {
26
+ return (await discoverSubagents(cwd, options))[name];
12
27
  }
13
28
 
14
29
  export { discoverSubagents, loadSubagentDefinition };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/subagents-loader.ts"],"names":[],"mappings":";;;;;;AA4BA,eAAsB,kBAAkB,GAAA,EAAuD;AAC7F,EAAA,OAAO,aAAA,CAAc,GAAA,EAAK,IAAA,EAAM,MAAS,CAAA;AAC3C;AAQA,eAAsB,sBAAA,CACpB,MACA,GAAA,EACsC;AACtC,EAAA,OAAA,CAAQ,MAAM,iBAAA,CAAkB,GAAG,CAAA,EAAG,IAAI,CAAA;AAC5C","file":"subagents-loader.js","sourcesContent":["/**\n * M81 — `.theokit/agents` discovery, exposed so a consumer can read the on-disk subagent\n * definitions with one import instead of hand-rolling a second parser.\n *\n * ## Why this file exists\n *\n * `src/skills.ts` already exposed `discoverSkills` for the sibling domain. Subagents had the same\n * loader — `internal/runtime/skills/subagents-loader.ts` — with no public door. A consumer behind\n * the layer boundary (the agent-builder never imports `@theokit/sdk*` directly) could not reach it,\n * so re-implementing was the only legal option. It re-implemented, and then wrote a test whose only\n * job was to watch the two parsers for drift. That test is the cleanest possible evidence that the\n * duplication should not exist.\n *\n * ## What crosses is the PARSED config\n *\n * The return is `AgentDefinition` — already interpreted — never the `.md` text or the frontmatter\n * shape. Exporting the file format would freeze an internal detail as public API; exporting the\n * parsed value leaves the format free to change.\n */\n\nimport { loadSubagents } from \"./internal/runtime/skills/subagents-loader.js\";\nimport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * Discover the subagents defined under `<cwd>/.theokit/agents/*.md`.\n *\n * An absent directory yields `{}` — a project without subagents is the common case, not an error.\n */\nexport async function discoverSubagents(cwd: string): Promise<Record<string, AgentDefinition>> {\n return loadSubagents(cwd, true, undefined);\n}\n\n/**\n * Load ONE subagent definition by name, or `undefined` when it is not defined on disk.\n *\n * A thin selector over {@link discoverSubagents} rather than a second reader: one parser is the\n * whole point of this module.\n */\nexport async function loadSubagentDefinition(\n name: string,\n cwd: string,\n): Promise<AgentDefinition | undefined> {\n return (await discoverSubagents(cwd))[name];\n}\n"]}
1
+ {"version":3,"sources":["../src/subagents-loader.ts"],"names":[],"mappings":";;;;;;AAuCA,IAAM,cAAA,GAA4C,CAAC,SAAS,CAAA;AAgB5D,SAAS,eAAe,OAAA,EAA0E;AAChG,EAAA,MAAM,aAAa,OAAA,EAAS,cAAA;AAC5B,EAAA,IAAI,UAAA,KAAe,QAAW,OAAO,cAAA;AACrC,EAAA,KAAA,MAAW,SAAS,UAAA,EAAY;AAC9B,IAAA,IAAI,CAAC,cAAA,CAAe,QAAA,CAAS,KAAK,CAAA,EAAG;AACnC,MAAA,MAAM,IAAI,kBAAA;AAAA,QACR,CAAA,iCAAA,EAAoC,OAAO,KAAK,CAAC,gBAAgB,cAAA,CAAe,IAAA,CAAK,IAAI,CAAC,CAAA,CAAA,CAAA;AAAA,QAC1F,EAAE,MAAM,iCAAA;AAAkC,OAC5C;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,UAAA;AACT;AAOA,eAAsB,iBAAA,CACpB,KACA,OAAA,EAC0C;AAC1C,EAAA,MAAM,MAAA,GAAS,eAAe,OAAO,CAAA;AACrC,EAAA,OAAO,cAAc,GAAA,EAAK,MAAA,CAAO,QAAA,CAAS,SAAS,GAAG,MAAS,CAAA;AACjE;AAQA,eAAsB,sBAAA,CACpB,IAAA,EACA,GAAA,EACA,OAAA,EACsC;AACtC,EAAA,OAAA,CAAQ,MAAM,iBAAA,CAAkB,GAAA,EAAK,OAAO,GAAG,IAAI,CAAA;AACrD","file":"subagents-loader.js","sourcesContent":["/**\n * M81 — `.theokit/agents` discovery, exposed so a consumer can read the on-disk subagent\n * definitions with one import instead of hand-rolling a second parser.\n *\n * ## Why this file exists\n *\n * `src/skills.ts` already exposed `discoverSkills` for the sibling domain. Subagents had the same\n * loader — `internal/runtime/skills/subagents-loader.ts` — with no public door. A consumer behind\n * the layer boundary (the agent-builder never imports `@theokit/sdk*` directly) could not reach it,\n * so re-implementing was the only legal option. It re-implemented, and then wrote a test whose only\n * job was to watch the two parsers for drift. That test is the cleanest possible evidence that the\n * duplication should not exist.\n *\n * ## What crosses is the PARSED config\n *\n * The return is `AgentDefinition` — already interpreted — never the `.md` text or the frontmatter\n * shape. Exporting the file format would freeze an internal detail as public API; exporting the\n * parsed value leaves the format free to change.\n */\n\nimport { ConfigurationError } from \"./errors.js\";\nimport { loadSubagents } from \"./internal/runtime/skills/subagents-loader.js\";\nimport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * The parsed subagent definition this module hands back.\n *\n * Re-exported here — beside the loader that produces it — so a consumer can NAME the value it\n * receives without reaching into `types/agent`, which no subpath publishes. A layer above may then\n * alias it (`AgentDefinition as SubagentDefinition`) to sidestep a name it has already spent.\n */\nexport type { AgentDefinition } from \"./types/agent.js\";\n\n/**\n * Where subagent definitions may be read from. A closed union rather than a boolean: a third\n * source can join it without breaking the signature, and the call site reads as what it means.\n */\nexport type SubagentSource = \"project\";\n\nconst FONTES_ACEITAS: readonly SubagentSource[] = [\"project\"];\n\n/** Options for {@link discoverSubagents} / {@link loadSubagentDefinition}. */\nexport interface DiscoverSubagentsOptions {\n /**\n * Which sources to read. Defaults to `[\"project\"]` — `<cwd>/.theokit/agents/*.md`.\n *\n * An empty list reads NOTHING: the directory is never opened, so a caller that has not yet\n * established trust in `cwd` can decline the read rather than filter its result.\n */\n readonly settingSources?: readonly SubagentSource[];\n}\n\n// Validated at the boundary (error-handling.md § 2): the union is erased at runtime, so a JS\n// caller — or a value crossing a serialization hop — can still carry a source nobody honors.\n// Dropping it silently would read as \"no subagents found\", which is the same shape as success.\nfunction resolverFontes(options: DiscoverSubagentsOptions | undefined): readonly SubagentSource[] {\n const declaradas = options?.settingSources;\n if (declaradas === undefined) return FONTES_ACEITAS;\n for (const fonte of declaradas) {\n if (!FONTES_ACEITAS.includes(fonte)) {\n throw new ConfigurationError(\n `Unknown subagent setting source \"${String(fonte)}\" (accepted: ${FONTES_ACEITAS.join(\", \")})`,\n { code: \"subagent_unknown_setting_source\" },\n );\n }\n }\n return declaradas;\n}\n\n/**\n * Discover the subagents defined under `<cwd>/.theokit/agents/*.md`.\n *\n * An absent directory yields `{}` — a project without subagents is the common case, not an error.\n */\nexport async function discoverSubagents(\n cwd: string,\n options?: DiscoverSubagentsOptions,\n): Promise<Record<string, AgentDefinition>> {\n const fontes = resolverFontes(options);\n return loadSubagents(cwd, fontes.includes(\"project\"), undefined);\n}\n\n/**\n * Load ONE subagent definition by name, or `undefined` when it is not defined on disk.\n *\n * A thin selector over {@link discoverSubagents} rather than a second reader: one parser is the\n * whole point of this module.\n */\nexport async function loadSubagentDefinition(\n name: string,\n cwd: string,\n options?: DiscoverSubagentsOptions,\n): Promise<AgentDefinition | undefined> {\n return (await discoverSubagents(cwd, options))[name];\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theokit/sdk",
3
- "version": "4.35.0",
3
+ "version": "4.36.0",
4
4
  "description": "TypeScript SDK for the Theo agent harness — same surface, local or cloud.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/usetheodev/theokit-sdk#readme",
@@ -329,17 +329,6 @@
329
329
  "**/agent.js",
330
330
  "**/agent.cjs"
331
331
  ],
332
- "scripts": {
333
- "build": "tsup && cp src/internal/providers/provider-catalog.json dist/provider-catalog.json && node scripts/copy-docs.mjs",
334
- "test": "vitest run --no-file-parallelism",
335
- "test:watch": "vitest",
336
- "eval": "vitest run --no-file-parallelism tests/eval/suites",
337
- "test:contract": "vitest run --no-file-parallelism tests/theokit-consumer-contract.test.ts",
338
- "prepublishOnly": "pnpm build && pnpm test:contract",
339
- "typecheck": "tsc --noEmit",
340
- "clean": "rm -rf dist",
341
- "docs:json": "typedoc --options typedoc.json"
342
- },
343
332
  "peerDependencies": {
344
333
  "@lancedb/lancedb": "^0.30.0",
345
334
  "@types/ws": ">=8.0.0",
@@ -407,5 +396,15 @@
407
396
  "typedoc": "^0.28.19",
408
397
  "ws": "^8.18.0",
409
398
  "zod": "^4.0.0"
399
+ },
400
+ "scripts": {
401
+ "build": "tsup && cp src/internal/providers/provider-catalog.json dist/provider-catalog.json && node scripts/copy-docs.mjs",
402
+ "test": "vitest run --no-file-parallelism",
403
+ "test:watch": "vitest",
404
+ "eval": "vitest run --no-file-parallelism tests/eval/suites",
405
+ "test:contract": "vitest run --no-file-parallelism tests/theokit-consumer-contract.test.ts",
406
+ "typecheck": "tsc --noEmit",
407
+ "clean": "rm -rf dist",
408
+ "docs:json": "typedoc --options typedoc.json"
410
409
  }
411
- }
410
+ }