@forwardimpact/libharness 0.1.13 → 0.1.14

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/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # libharness
2
+
3
+ Shared test harness and mock infrastructure.
4
+
5
+ ## Getting Started
6
+
7
+ ```js
8
+ import { createFixture } from '@forwardimpact/libharness/fixture';
9
+ import { createMock } from '@forwardimpact/libharness/mock';
10
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardimpact/libharness",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Shared test harness and mock infrastructure for the Forward Impact monorepo",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -34,31 +34,16 @@ export function createMockResourceIndex(options = {}) {
34
34
  /**
35
35
  * Sets up default test resources
36
36
  * @param {object} setupOptions - Setup options
37
- * @param {string[]} [setupOptions.tools] - Tool names for agent
37
+ * @param {string[]} [setupOptions.tools] - Tool names to seed
38
38
  * @param {string} [setupOptions.conversationId] - Conversation ID
39
- * @param {string} [setupOptions.agentId] - Agent ID
40
39
  */
41
40
  setupDefaults(setupOptions = {}) {
42
- const {
43
- tools = [],
44
- conversationId = "test-conversation",
45
- agentId = "test-agent",
46
- } = setupOptions;
41
+ const { tools = [], conversationId = "test-conversation" } = setupOptions;
47
42
 
48
43
  resources.set(
49
44
  conversationId,
50
45
  common.Conversation.fromObject({
51
46
  id: { name: conversationId },
52
- agent_id: `common.Agent.${agentId}`,
53
- }),
54
- );
55
-
56
- resources.set(
57
- `common.Agent.${agentId}`,
58
- common.Agent.fromObject({
59
- id: { name: agentId, tokens: 50 },
60
- tools,
61
- content: "You are a test agent.",
62
47
  }),
63
48
  );
64
49
 
@@ -102,7 +87,7 @@ export function createMockResourceIndex(options = {}) {
102
87
  },
103
88
  };
104
89
 
105
- if (options.tools || options.conversationId || options.agentId) {
90
+ if (options.tools || options.conversationId) {
106
91
  index.setupDefaults(options);
107
92
  }
108
93