@fuzzle/opencode-accountant 0.5.2-next.1 → 0.5.4-next.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/agent/accountant.md +9 -9
- package/dist/index.js +18 -0
- package/package.json +1 -1
package/agent/accountant.md
CHANGED
|
@@ -3,13 +3,13 @@ description: Specialized agent for hledger accounting tasks and transaction mana
|
|
|
3
3
|
prompt: You are an accounting specialist with expertise in hledger and double-entry bookkeeping. Your role is to help maintain accurate financial records following the user's conventions.
|
|
4
4
|
mode: subagent
|
|
5
5
|
temperature: 0.1
|
|
6
|
-
|
|
6
|
+
maxSteps: 8
|
|
7
7
|
tools:
|
|
8
8
|
bash: true
|
|
9
9
|
edit: true
|
|
10
10
|
write: true
|
|
11
11
|
# MCP tools available: import-pipeline, fetch-currency-prices
|
|
12
|
-
|
|
12
|
+
permissions:
|
|
13
13
|
bash: allow
|
|
14
14
|
edit: allow
|
|
15
15
|
glob: allow
|
|
@@ -151,13 +151,13 @@ The following are MCP tools available to you. Always call these tools directly -
|
|
|
151
151
|
|
|
152
152
|
**Arguments:**
|
|
153
153
|
|
|
154
|
-
| Argument | Type | Default | Description
|
|
155
|
-
| ---------------- | ------- | ------- |
|
|
156
|
-
| `provider` | string | - | Logger metadata (does not filter CSV selection — use classify step for that)
|
|
157
|
-
| `currency` | string | - | Logger metadata (does not filter CSV selection — use classify step for that)
|
|
158
|
-
| `skipClassify` | boolean | `false` | Skip classification step
|
|
159
|
-
| `closingBalance` | string | - | Manual closing balance for reconciliation
|
|
160
|
-
| `account` | string | - | Manual account override (auto-detected from rules)
|
|
154
|
+
| Argument | Type | Default | Description |
|
|
155
|
+
| ---------------- | ------- | ------- | ---------------------------------------------------------------------------- |
|
|
156
|
+
| `provider` | string | - | Logger metadata (does not filter CSV selection — use classify step for that) |
|
|
157
|
+
| `currency` | string | - | Logger metadata (does not filter CSV selection — use classify step for that) |
|
|
158
|
+
| `skipClassify` | boolean | `false` | Skip classification step |
|
|
159
|
+
| `closingBalance` | string | - | Manual closing balance for reconciliation |
|
|
160
|
+
| `account` | string | - | Manual account override (auto-detected from rules) |
|
|
161
161
|
|
|
162
162
|
**Behavior:**
|
|
163
163
|
|
package/dist/index.js
CHANGED
|
@@ -2677,6 +2677,12 @@ var init_js_yaml = __esm(() => {
|
|
|
2677
2677
|
|
|
2678
2678
|
// src/utils/agentLoader.ts
|
|
2679
2679
|
import * as fs from "fs";
|
|
2680
|
+
function validateAgentFields(data, filePath) {
|
|
2681
|
+
const unknownFields = Object.keys(data).filter((key) => !VALID_AGENT_FIELDS.has(key));
|
|
2682
|
+
if (unknownFields.length > 0) {
|
|
2683
|
+
console.warn(`Warning: Unknown fields in ${filePath} frontmatter: ${unknownFields.join(", ")}. ` + `Valid fields are: ${Array.from(VALID_AGENT_FIELDS).join(", ")}`);
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2680
2686
|
function loadAgent(filePath) {
|
|
2681
2687
|
if (!fs.existsSync(filePath)) {
|
|
2682
2688
|
return null;
|
|
@@ -2691,6 +2697,7 @@ function loadAgent(filePath) {
|
|
|
2691
2697
|
throw new Error(`Invalid frontmatter in ${filePath}: must be an object with a "description" string`);
|
|
2692
2698
|
}
|
|
2693
2699
|
const data = raw;
|
|
2700
|
+
validateAgentFields(data, filePath);
|
|
2694
2701
|
const { description, ...optional } = data;
|
|
2695
2702
|
return {
|
|
2696
2703
|
description,
|
|
@@ -2698,8 +2705,19 @@ function loadAgent(filePath) {
|
|
|
2698
2705
|
...Object.fromEntries(Object.entries(optional).filter(([, v]) => v !== undefined))
|
|
2699
2706
|
};
|
|
2700
2707
|
}
|
|
2708
|
+
var VALID_AGENT_FIELDS;
|
|
2701
2709
|
var init_agentLoader = __esm(() => {
|
|
2702
2710
|
init_js_yaml();
|
|
2711
|
+
VALID_AGENT_FIELDS = new Set([
|
|
2712
|
+
"description",
|
|
2713
|
+
"mode",
|
|
2714
|
+
"model",
|
|
2715
|
+
"temperature",
|
|
2716
|
+
"maxSteps",
|
|
2717
|
+
"disable",
|
|
2718
|
+
"tools",
|
|
2719
|
+
"permissions"
|
|
2720
|
+
]);
|
|
2703
2721
|
});
|
|
2704
2722
|
|
|
2705
2723
|
// node_modules/papaparse/papaparse.js
|
package/package.json
CHANGED