@dsh-agentic-roleplay/core 0.10.1 → 0.11.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/icon.svg +13 -0
- package/lib/{authoring-tools-C6Hzy8jU.js → authoring-tools--6V1pIIL.js} +424 -31
- package/lib/authoring.js +6 -6
- package/lib/{child-C8r8AFpm.js → child-C9nPIy9j.js} +7 -3
- package/lib/client.js +2340 -872
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +1 -1
- package/lib/doctor.js +2 -2
- package/lib/helper.js +8 -1
- package/lib/{hooks-BuQ61nvQ.js → hooks-DORky4KT.js} +213 -205
- package/lib/images.js +1 -1
- package/lib/index.js +456 -61
- package/lib/{lorebook-author-tools-B6_Jj8oe.js → lorebook-author-tools-BrVde1N-.js} +4 -4
- package/lib/lorebook-authoring.js +4 -4
- package/lib/orchestration.js +65 -15
- package/lib/{pack-jail-OZSgU85i.js → pack-jail-Bk82pX9t.js} +20 -9
- package/lib/{packs-B88bxt8E.js → packs-ELfh8yh1.js} +2 -2
- package/lib/{presenter-agent-D-WNs626.js → presenter-agent-UKbKYXMO.js} +3 -3
- package/lib/{preset-DNuqvMan.js → preset-D9Sfc8sf.js} +4 -4
- package/lib/{preset-author-tools-CDwavcTb.js → preset-author-tools-B3pFL1-e.js} +5 -5
- package/lib/preset-authoring.js +5 -5
- package/lib/{presets-9_MNxwaw.js → presets-BRt4Xsy4.js} +52 -10
- package/lib/{reflection-BvM0w1R4.js → reflection-CHiHsY4Y.js} +8 -6
- package/lib/{turn-guard-Ygdww1Wt.js → turn-guard-B53qOWEU.js} +11 -11
- package/package.json +35 -32
- package/prompts/en/checks/decide-opening.md +7 -1
- package/prompts/en/roleplay/record-keeper.md +2 -1
- package/prompts/zh/checks/decide-opening.md +7 -1
- package/prompts/zh/roleplay/record-keeper.md +2 -1
package/lib/authoring.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as readSource, A as editsSince, C as worldFieldChanges, D as loadCardEvidence, E as loadWorldParts, J as UPDATE_FOLDER, O as CHECK_COMMANDS, Q as entitiesByPiece, S as pictureChange, T as readWorldInfo, Z as cardTools, _ as runChecks, a as importHooks, b as diffText, g as CHECKS,
|
|
2
|
-
import { t as guardAuthoringTurns } from "./turn-guard-
|
|
3
|
-
import { C as readWorldEditor, L as presetTools, M as deleteTriggerDocument, N as readTriggerDocuments, P as writeTriggerDocument, U as finishUpdate, W as pendingUpdate, _ as editWorldPlots, a as deleteWorldPackFile, c as createAuthoredEntity, d as replaceAuthoredEntity, i as checkWorldPack, l as deleteAuthoredEntity, o as listWorldPacks, r as registerPackJail, s as AUTHORED_ENTITY_KINDS, u as readAuthoredEntityDocument, v as editWorldRelation, z as translateTools } from "./pack-jail-
|
|
4
|
-
import { $ as IMPORT_FOLDER, At as InvalidEditProblems, Ft as parseRelationEdit, G as deleteWorldPrompt, J as writeWorldPrompt, K as listWorldPrompts, W as PROSE_PROMPTS, dt as parseAuthoringCommand, nt as PICTURE_FILE, q as readWorldPrompt } from "./presets-
|
|
1
|
+
import { $ as readSource, A as editsSince, C as worldFieldChanges, D as loadCardEvidence, E as loadWorldParts, J as UPDATE_FOLDER, O as CHECK_COMMANDS, Q as entitiesByPiece, S as pictureChange, T as readWorldInfo, Z as cardTools, _ as runChecks, a as importHooks, b as diffText, g as CHECKS, h as presentReport, i as contextOf, l as isReviewing, ln as authoredWorldOf, m as checkImported, n as limitAuthoringAgents, nt as parseWorldInfoEdit, o as importTools, v as addressChanges, vt as checkWorld, w as editWorldInfo, x as matchPieces, y as cardChanges } from "./authoring-tools--6V1pIIL.js";
|
|
2
|
+
import { t as guardAuthoringTurns } from "./turn-guard-B53qOWEU.js";
|
|
3
|
+
import { C as readWorldEditor, L as presetTools, M as deleteTriggerDocument, N as readTriggerDocuments, P as writeTriggerDocument, U as finishUpdate, W as pendingUpdate, _ as editWorldPlots, a as deleteWorldPackFile, c as createAuthoredEntity, d as replaceAuthoredEntity, i as checkWorldPack, l as deleteAuthoredEntity, o as listWorldPacks, r as registerPackJail, s as AUTHORED_ENTITY_KINDS, u as readAuthoredEntityDocument, v as editWorldRelation, z as translateTools } from "./pack-jail-Bk82pX9t.js";
|
|
4
|
+
import { $ as IMPORT_FOLDER, At as InvalidEditProblems, Ft as parseRelationEdit, G as deleteWorldPrompt, J as writeWorldPrompt, K as listWorldPrompts, W as PROSE_PROMPTS, dt as parseAuthoringCommand, nt as PICTURE_FILE, q as readWorldPrompt } from "./presets-BRt4Xsy4.js";
|
|
5
5
|
import { i as translator, r as languageOf } from "./text-CzqhC8sT.js";
|
|
6
|
-
import {
|
|
7
|
-
import { g as SURFACE_NAMES, m as PACK_LIMITS, p as PACK_ACTIONS } from "./packs-
|
|
6
|
+
import { G as formatIssue, R as parsePlotsFile, nt as shippedPromptsDirectory } from "./hooks-DORky4KT.js";
|
|
7
|
+
import { g as SURFACE_NAMES, m as PACK_LIMITS, p as PACK_ACTIONS } from "./packs-ELfh8yh1.js";
|
|
8
8
|
import "./access-CXtaZNbx.js";
|
|
9
9
|
import { join, relative } from "node:path";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
@@ -195,6 +195,10 @@ const MAX_RUN_PROMPT = 24e3;
|
|
|
195
195
|
* minutes, a game master's turn never ended), so what the stop decided is not waited on past this.
|
|
196
196
|
*/
|
|
197
197
|
const STOP_GRACE_MS = 15e3;
|
|
198
|
+
/** The share of its output cap each recovery after the first leaves the game master: a call that runs on is cut sooner, so the next try has to be shorter. */
|
|
199
|
+
const RECOVERY_SHRINK = .5;
|
|
200
|
+
/** The least output a recovery leaves the game master. */
|
|
201
|
+
const RECOVERY_FLOOR = 2048;
|
|
198
202
|
// src/shared/sampling.ts
|
|
199
203
|
/** The controls beyond temperature, which apply to the game master and the characters (the helpers that must be exact are never asked more freely). */
|
|
200
204
|
const SHARED_SAMPLING = [
|
|
@@ -376,7 +380,7 @@ const isUnfinishedCall = (error) => error instanceof Error && /parse tool call a
|
|
|
376
380
|
async function runChild(task) {
|
|
377
381
|
for (let attempt = 1;; attempt += 1) {
|
|
378
382
|
const began = Date.now();
|
|
379
|
-
const turnAtStart = currentTurn(task.parent);
|
|
383
|
+
const turnAtStart = task.turn ?? currentTurn(task.parent);
|
|
380
384
|
const stats = {
|
|
381
385
|
calls: 0,
|
|
382
386
|
record: []
|
|
@@ -787,6 +791,6 @@ async function execute(task, stats) {
|
|
|
787
791
|
}
|
|
788
792
|
return submitted.value;
|
|
789
793
|
}
|
|
790
|
-
export { tokensOf$1 as
|
|
794
|
+
export { cutOff as C, tokensOf$1 as E, currentTurn as S, estimateAnswer as T, estimateTokens as _, childTrace as a, addTokens as b, namedModel as c, parseSampling as d, sharedSamplingOf as f, blockText as g, requestsOf as h, childSamplingOf as i, runChild as l, RECOVERY_SHRINK as m, childModel as n, helpers as o, RECOVERY_FLOOR as p, childSampling as r, isUnfinishedCall as s, ChildTimeoutError as t, SAMPLING_RANGES as u, tokensOf as v, finishOf as w, totalTokens as x, NO_TOKENS as y };
|
|
791
795
|
|
|
792
|
-
//# sourceMappingURL=child-
|
|
796
|
+
//# sourceMappingURL=child-C9nPIy9j.js.map
|