@multiplayer-app/agent 0.1.0 → 0.1.2
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/dist/git-sync.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-sync.d.ts","sourceRoot":"","sources":["../src/git-sync.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAI7C,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"git-sync.d.ts","sourceRoot":"","sources":["../src/git-sync.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAI7C,eAAO,MAAM,mBAAmB,QAAkG,CAAA;AAWlI,qBAAa,OAAO;IAKN,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAQ;IAC/B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAmB;IACvC,OAAO,CAAC,IAAI,CAAsC;gBAErB,MAAM,EAAE,aAAa;IAiBlD,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,OAAO,CAAC,GAAG;IAIX,6FAA6F;IAC7F,OAAO,CAAC,SAAS;IAMjB;;;;OAIG;IACH,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IA0B3B,8GAA8G;IAC9G,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAcrD"}
|
package/dist/git-sync.js
CHANGED
|
@@ -14,7 +14,7 @@ const fs_1 = require("fs");
|
|
|
14
14
|
const path_1 = __importDefault(require("path"));
|
|
15
15
|
const util_1 = require("util");
|
|
16
16
|
const execFileAsync = (0, util_1.promisify)(child_process_1.execFile);
|
|
17
|
-
exports.WORKSPACE_GITIGNORE = ['data/attachments/', 'node_modules/', '.venv/', '*.
|
|
17
|
+
exports.WORKSPACE_GITIGNORE = ['data/attachments/', 'node_modules/', '.venv/', '*.sqlite', '*.sqlite-journal', ''].join('\n');
|
|
18
18
|
async function pathExists(target) {
|
|
19
19
|
try {
|
|
20
20
|
await fs_1.promises.access(target);
|
package/dist/git-sync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-sync.js","sourceRoot":"","sources":["../src/git-sync.ts"],"names":[],"mappings":";;;;;;AAAA,wFAAwF;AACxF,uFAAuF;AACvF,2FAA2F;AAC3F,yFAAyF;AACzF,uDAAuD;AACvD,iDAAwC;AACxC,2BAAmC;AACnC,gDAAuB;AACvB,+BAAgC;AAGhC,MAAM,aAAa,GAAG,IAAA,gBAAS,EAAC,wBAAQ,CAAC,CAAA;AAE5B,QAAA,mBAAmB,GAAG,CAAC,mBAAmB,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"git-sync.js","sourceRoot":"","sources":["../src/git-sync.ts"],"names":[],"mappings":";;;;;;AAAA,wFAAwF;AACxF,uFAAuF;AACvF,2FAA2F;AAC3F,yFAAyF;AACzF,uDAAuD;AACvD,iDAAwC;AACxC,2BAAmC;AACnC,gDAAuB;AACvB,+BAAgC;AAGhC,MAAM,aAAa,GAAG,IAAA,gBAAS,EAAC,wBAAQ,CAAC,CAAA;AAE5B,QAAA,mBAAmB,GAAG,CAAC,mBAAmB,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAElI,KAAK,UAAU,UAAU,CAAC,MAAc;IACtC,IAAI,CAAC;QACH,MAAM,aAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QACvB,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAED,MAAa,OAAO;IAKlB,YAA6B,MAAqB;QAArB,WAAM,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ACtE,OAAO,GAAG,CAAA;QACZ,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAnFD,0BAmFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/research/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAA;AAEV,wBAAgB,yBAAyB,CAAC,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,aAAa,CAAC;IAAC,YAAY,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/research/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAA;AAEV,wBAAgB,yBAAyB,CAAC,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,aAAa,CAAC;IAAC,YAAY,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CA8BjI"}
|
package/dist/research/prompt.js
CHANGED
|
@@ -21,13 +21,16 @@ Method — plan, size, confirm, narrow, download, analyze, report:
|
|
|
21
21
|
1. Plan. Restate the question as concrete, checkable criteria (which document types, which clauses or values, which time range). Write the plan to ${exports.RESEARCH_OUTPUT_FILES.notes} and tell the user in two or three sentences.
|
|
22
22
|
2. Size. Use count_filings and summarize_filings (grouped by state, filingType, typeOfInsurance, submittedMonth) to see how big the population is before reading anything.
|
|
23
23
|
3. Confirm. If the population is large (more than ~300 filings or ~1,000 documents) or the question is ambiguous, call ask_user with the counts and the choice to make. Stop and wait for the answer.
|
|
24
|
+
3b. Codebook checkpoint (classification questions: "how do carriers treat X", "sort into categories", "which variants exist"). Discover the categories on a sample first — read 15–30 documents, write the candidate categories with one quoted example each to research/codebook.md and publish it — then call ask_user to have the codebook approved or revised before extracting over the whole population. Never classify thousands of documents against categories the user has not seen.
|
|
24
25
|
4. Narrow. Use search_documents (KEYWORD with exact phrases first, SEMANTIC/HYBRID for concepts like "water shut-off valve requirement") to find the documents that matter. Pass saveText=true so the extracted text lands in data/text/ for grep.
|
|
25
26
|
5. Download only what search cannot answer: download_attachment extracts PDF text locally. Note documents with no text (scanned) — they go in the findings as "not readable".
|
|
26
|
-
6. Analyze locally. Use run_command with rg/grep, python3 (pandas,
|
|
27
|
+
6. Analyze locally. Use run_command with rg/grep, jq, python3 (pandas, sqlite3, openpyxl for Excel rate pages) and the files under data/. Keep intermediate tables in data/*.csv. Never paste whole documents into the conversation; read_text only the lines around a match. Normalize values before comparing (a credit on the water peril is not a credit on total premium; 30 vs 45 days must be read as numbers, not matched as text).
|
|
28
|
+
6b. Lineage. Which edition is in force is not a field: the latest submitted edition per form number and company within the scope is the best available answer, and findings must say when a result rests on that assumption.
|
|
27
29
|
7. Report. Write:
|
|
28
30
|
- ${exports.RESEARCH_OUTPUT_FILES.findings}: the answer first, then method, population size, coverage (documents read vs unreadable), caveats.
|
|
29
31
|
- ${exports.RESEARCH_OUTPUT_FILES.results}: one row per filing or document with the facts you extracted (tracking number, state, company, date, the extracted value(s), source document, page/line hint).
|
|
30
32
|
- ${exports.RESEARCH_OUTPUT_FILES.evidence}: for every fact, the quoted span and where it came from ({trackingNumber, attachmentKey or path, line, quote}).
|
|
33
|
+
- Ambiguous cases go in a "needs human review" section with the competing readings, never silently into a category.
|
|
31
34
|
Then call publish_results with those paths so they appear in the session, and finish with a short summary message.
|
|
32
35
|
|
|
33
36
|
Working rules:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/research/prompt.ts"],"names":[],"mappings":";;;AAUA,
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/research/prompt.ts"],"names":[],"mappings":";;;AAUA,8DA8BC;AAvCD,mCAAuC;AAE1B,QAAA,qBAAqB,GAAG;IACnC,QAAQ,EAAE,sBAAsB;IAChC,OAAO,EAAE,sBAAsB;IAC/B,QAAQ,EAAE,wBAAwB;IAClC,KAAK,EAAE,mBAAmB;CAClB,CAAA;AAEV,SAAgB,yBAAyB,CAAC,OAA+E;IACvH,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,kCAAkC,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,CAAA;IAC3H,OAAO;;;EAGP,IAAA,qBAAa,EAAC,OAAO,CAAC,KAAK,CAAC;EAC5B,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,yEAAyE,CAAC,CAAC,CAAC,iDAAiD;;;qJAGD,6BAAqB,CAAC,KAAK;;;;;;;;;OASzK,6BAAqB,CAAC,QAAQ;OAC9B,6BAAqB,CAAC,OAAO;OAC7B,6BAAqB,CAAC,QAAQ;;;;;;IAMjC,MAAM;;;2CAGiC,6BAAqB,CAAC,KAAK,2EAA2E,CAAA;AACjJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplayer-app/agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Agent that runs inside a session VM — one-shot coding tasks or long-lived research sessions driven over the gateway socket; local file/exec tools, FilingRamp research tools, MCP over env-var config",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -27,6 +27,15 @@
|
|
|
27
27
|
"access": "public",
|
|
28
28
|
"registry": "https://registry.npmjs.org/"
|
|
29
29
|
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc --build --force",
|
|
32
|
+
"clean": "rm -rf ./dist tsconfig.tsbuildinfo",
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
34
|
+
"lint": "eslint src/**/*.ts --config ../../eslint.config.js",
|
|
35
|
+
"test": "tsc --build --force && node --test 'dist/**/*.test.js'",
|
|
36
|
+
"prepublishOnly": "pnpm run build",
|
|
37
|
+
"postversion": "node scripts/sync-base-image-version.mjs && git commit -m \"agent v$npm_package_version\" -- package.json ../sandbox/src/base-images/agent/Dockerfile ../../scripts/setup-vm-images.sh && git tag \"agent-v$npm_package_version\" && git push && git push --tags"
|
|
38
|
+
},
|
|
30
39
|
"dependencies": {
|
|
31
40
|
"@ai-sdk/anthropic": "3.0.42",
|
|
32
41
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
@@ -38,13 +47,5 @@
|
|
|
38
47
|
"devDependencies": {
|
|
39
48
|
"@types/node": "^25.8.0",
|
|
40
49
|
"typescript": "^6.0.3"
|
|
41
|
-
},
|
|
42
|
-
"scripts": {
|
|
43
|
-
"build": "tsc --build --force",
|
|
44
|
-
"clean": "rm -rf ./dist tsconfig.tsbuildinfo",
|
|
45
|
-
"typecheck": "tsc --noEmit",
|
|
46
|
-
"lint": "eslint src/**/*.ts --config ../../eslint.config.js",
|
|
47
|
-
"test": "tsc --build --force && node --test 'dist/**/*.test.js'",
|
|
48
|
-
"postversion": "node scripts/sync-base-image-version.mjs && git commit -m \"agent v$npm_package_version\" -- package.json ../sandbox/src/base-images/agent/Dockerfile ../../scripts/setup-vm-images.sh && git tag \"agent-v$npm_package_version\" && git push && git push --tags"
|
|
49
50
|
}
|
|
50
|
-
}
|
|
51
|
+
}
|