@graview/tools 0.1.47 → 0.1.49
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 +31 -0
- package/dist/agent/tools.d.ts +5 -2
- package/dist/agent/tools.d.ts.map +1 -1
- package/dist/agent/tools.js +63 -16
- package/dist/agent/tools.js.map +1 -1
- package/dist/ai.d.ts +1 -1
- package/dist/ai.d.ts.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +87 -1
- package/dist/cli.js.map +1 -1
- package/dist/conversation.js +2 -2
- package/dist/conversation.js.map +1 -1
- package/dist/decide.d.ts +1 -1
- package/dist/decide.d.ts.map +1 -1
- package/dist/decide.js +2 -2
- package/dist/decide.js.map +1 -1
- package/dist/derive.d.ts.map +1 -1
- package/dist/derive.js +8 -1
- package/dist/derive.js.map +1 -1
- package/dist/dev-ai.d.ts +2 -1
- package/dist/dev-ai.d.ts.map +1 -1
- package/dist/dev-ai.js +8 -6
- package/dist/dev-ai.js.map +1 -1
- package/dist/draft.d.ts +3 -1
- package/dist/draft.d.ts.map +1 -1
- package/dist/draft.js +9 -8
- package/dist/draft.js.map +1 -1
- package/dist/fast.d.ts +44 -0
- package/dist/fast.d.ts.map +1 -0
- package/dist/fast.js +2 -0
- package/dist/fast.js.map +1 -0
- package/dist/figure.js +1 -1
- package/dist/figure.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/inline-ai.d.ts.map +1 -1
- package/dist/inline-ai.js +1 -1
- package/dist/inline-ai.js.map +1 -1
- package/dist/intelligence.d.ts +32 -2
- package/dist/intelligence.d.ts.map +1 -1
- package/dist/intelligence.js +3 -3
- package/dist/intelligence.js.map +1 -1
- package/dist/keep.d.ts.map +1 -1
- package/dist/keep.js +8 -3
- package/dist/keep.js.map +1 -1
- package/dist/local.d.ts +1 -1
- package/dist/local.d.ts.map +1 -1
- package/dist/local.js +23 -18
- package/dist/local.js.map +1 -1
- package/dist/loop.d.ts +1 -1
- package/dist/loop.d.ts.map +1 -1
- package/dist/loop.js.map +1 -1
- package/dist/providers/jev.d.ts +1 -36
- package/dist/providers/jev.d.ts.map +1 -1
- package/dist/providers/jev.js.map +1 -1
- package/dist/questions.js +2 -2
- package/dist/questions.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/seat-model.js +3 -3
- package/dist/seat-model.js.map +1 -1
- package/dist/suggest.d.ts +8 -8
- package/dist/suggest.d.ts.map +1 -1
- package/dist/suggest.js +2 -2
- package/dist/suggest.js.map +1 -1
- package/dist/tidy/asking.d.ts +51 -0
- package/dist/tidy/asking.d.ts.map +1 -0
- package/dist/tidy/asking.js +86 -0
- package/dist/tidy/asking.js.map +1 -0
- package/dist/tidy/away.d.ts +24 -0
- package/dist/tidy/away.d.ts.map +1 -0
- package/dist/tidy/away.js +24 -0
- package/dist/tidy/away.js.map +1 -0
- package/dist/tidy/blocking.d.ts +82 -0
- package/dist/tidy/blocking.d.ts.map +1 -0
- package/dist/tidy/blocking.js +260 -0
- package/dist/tidy/blocking.js.map +1 -0
- package/dist/tidy/dream.d.ts +117 -0
- package/dist/tidy/dream.d.ts.map +1 -0
- package/dist/tidy/dream.js +178 -0
- package/dist/tidy/dream.js.map +1 -0
- package/dist/tidy/judges.d.ts +109 -0
- package/dist/tidy/judges.d.ts.map +1 -0
- package/dist/tidy/judges.js +282 -0
- package/dist/tidy/judges.js.map +1 -0
- package/dist/tidy/judging.d.ts +51 -0
- package/dist/tidy/judging.d.ts.map +1 -0
- package/dist/tidy/judging.js +243 -0
- package/dist/tidy/judging.js.map +1 -0
- package/dist/tidy/policy.d.ts +18 -0
- package/dist/tidy/policy.d.ts.map +1 -0
- package/dist/tidy/policy.js +29 -0
- package/dist/tidy/policy.js.map +1 -0
- package/dist/tidy/system-one.d.ts +40 -0
- package/dist/tidy/system-one.d.ts.map +1 -0
- package/dist/tidy/system-one.js +49 -0
- package/dist/tidy/system-one.js.map +1 -0
- package/dist/tidy.d.ts +8 -0
- package/dist/tidy.d.ts.map +1 -0
- package/dist/tidy.js +23 -0
- package/dist/tidy.js.map +1 -0
- package/package.json +7 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** How much a change would undo: a merge, an archive, a link made, a choice filled in. */
|
|
2
|
+
export type Severity = "merge" | "archive" | "link" | "categorize";
|
|
3
|
+
/** At least `act` sure: may be made unasked (where the host allows). At least `ask`: suggested. Below: dropped. */
|
|
4
|
+
export interface Band {
|
|
5
|
+
readonly act: number;
|
|
6
|
+
readonly ask: number;
|
|
7
|
+
}
|
|
8
|
+
/** The bands a dream uses unless the host says others. */
|
|
9
|
+
export declare const BANDS: Readonly<Record<Severity, Band>>;
|
|
10
|
+
/** What becomes of one judgment: made, put to a person, or let go. */
|
|
11
|
+
export type Route = "act" | "ask" | "drop";
|
|
12
|
+
/**
|
|
13
|
+
* Where a confidence goes for a change of this severity. A split choice —
|
|
14
|
+
* two options nearly as likely — is never made unasked, however sure its
|
|
15
|
+
* top option.
|
|
16
|
+
*/
|
|
17
|
+
export declare function routeOf(confidence: number, severity: Severity, bands?: Partial<Record<Severity, Partial<Band>>>, split?: boolean): Route;
|
|
18
|
+
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/tidy/policy.ts"],"names":[],"mappings":"AAWA,0FAA0F;AAC1F,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,CAAC;AAEnE,mHAAmH;AACnH,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,0DAA0D;AAC1D,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAKlD,CAAC;AAEF,sEAAsE;AACtE,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,KAAK,UAAQ,GAAG,KAAK,CAI1I"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHAT A CONFIDENCE BECOMES, BY HOW MUCH THE CHANGE WOULD UNDO. The model
|
|
3
|
+
* says how sure; code says what that is enough for. Above a severity's
|
|
4
|
+
* `act`, the change may be made unasked — and only if the host let the
|
|
5
|
+
* actor apply that sure a change (`applyAtLeast`); between `ask` and
|
|
6
|
+
* `act`, a person is asked (a suggestion); below `ask`, it is dropped, and
|
|
7
|
+
* nobody is bothered. A merge folds two records into one, so it is held
|
|
8
|
+
* to more than setting a record aside, which is held to more than a link
|
|
9
|
+
* or a filled-in choice, which a person undoes with a press.
|
|
10
|
+
*/
|
|
11
|
+
/** The bands a dream uses unless the host says others. */
|
|
12
|
+
export const BANDS = {
|
|
13
|
+
merge: { act: 0.9, ask: 0.5 },
|
|
14
|
+
archive: { act: 0.85, ask: 0.55 },
|
|
15
|
+
link: { act: 0.8, ask: 0.45 },
|
|
16
|
+
categorize: { act: 0.8, ask: 0.45 },
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Where a confidence goes for a change of this severity. A split choice —
|
|
20
|
+
* two options nearly as likely — is never made unasked, however sure its
|
|
21
|
+
* top option.
|
|
22
|
+
*/
|
|
23
|
+
export function routeOf(confidence, severity, bands = {}, split = false) {
|
|
24
|
+
const band = { ...BANDS[severity], ...(bands[severity] ?? {}) };
|
|
25
|
+
if (confidence >= band.act && !split)
|
|
26
|
+
return "act";
|
|
27
|
+
return confidence >= band.ask ? "ask" : "drop";
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/tidy/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAWH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,KAAK,GAAqC;IACrD,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;IAC7B,OAAO,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE;IACjC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE;IAC7B,UAAU,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE;CACpC,CAAC;AAKF;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,UAAkB,EAAE,QAAkB,EAAE,QAAkD,EAAE,EAAE,KAAK,GAAG,KAAK;IACjI,MAAM,IAAI,GAAG,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;IAChE,IAAI,UAAU,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACnD,OAAO,UAAU,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { SearchRanker } from "@graview/core";
|
|
2
|
+
import type { AiPrice, HostAi } from "../ai.js";
|
|
3
|
+
import type { Answer, Decide } from "../fast.js";
|
|
4
|
+
/** A typed answer: a Choice, a Noul or a Score, with its probabilities. */
|
|
5
|
+
export type SystemOneAnswer = Answer;
|
|
6
|
+
/** One state and a map of typed questions in; typed answers and the call's usage out. */
|
|
7
|
+
export type SystemOneDecide = Decide;
|
|
8
|
+
/** The model a dream asks: its name, as lineage says it, its decide, and its price when the host knows it. */
|
|
9
|
+
export interface DreamModel {
|
|
10
|
+
/** "jev-latest": what the lineage and the report name. */
|
|
11
|
+
readonly model: string;
|
|
12
|
+
readonly decide: SystemOneDecide;
|
|
13
|
+
readonly price?: AiPrice;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The model a dream asks, from what the host lent: `model` when given, else
|
|
17
|
+
* the host's Fast slot, else its `decide` under its name. Nothing when the
|
|
18
|
+
* host said AI is off or lent no System One model: the dream then stands on
|
|
19
|
+
* its judges alone.
|
|
20
|
+
*/
|
|
21
|
+
export declare function systemOneOf(model: DreamModel | undefined, ai: HostAi | undefined): DreamModel | undefined;
|
|
22
|
+
/** The host's ranker for near records, when it lent one and AI is on. */
|
|
23
|
+
export declare const nearOf: (ai: HostAi | undefined) => SearchRanker | undefined;
|
|
24
|
+
/** The model as a basis names it: "Jev" for any Jev, else its own name. */
|
|
25
|
+
export declare const modelWord: (model: string) => string;
|
|
26
|
+
/** How sure a Noul is that its statement holds: its probability. */
|
|
27
|
+
export declare function noulOf(answer: SystemOneAnswer | undefined): number | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* A Score as 0 to 1: its expected level over the levels it was asked on,
|
|
30
|
+
* "the same thing" at the top. From its probabilities when it sent them,
|
|
31
|
+
* else from the score itself.
|
|
32
|
+
*/
|
|
33
|
+
export declare function scoreOf(answer: SystemOneAnswer | undefined, levels: number): number | undefined;
|
|
34
|
+
/** A Choice: what was chosen, how sure (its probability), and its margin over the next. */
|
|
35
|
+
export declare function choiceOf(answer: SystemOneAnswer | undefined): {
|
|
36
|
+
readonly choice: string;
|
|
37
|
+
readonly confidence: number;
|
|
38
|
+
readonly margin: number;
|
|
39
|
+
} | undefined;
|
|
40
|
+
//# sourceMappingURL=system-one.d.ts.map
|
|
@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AQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAM3J"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The model a dream asks, from what the host lent: `model` when given, else
|
|
3
|
+
* the host's Fast slot, else its `decide` under its name. Nothing when the
|
|
4
|
+
* host said AI is off or lent no System One model: the dream then stands on
|
|
5
|
+
* its judges alone.
|
|
6
|
+
*/
|
|
7
|
+
export function systemOneOf(model, ai) {
|
|
8
|
+
if (model)
|
|
9
|
+
return model;
|
|
10
|
+
if (!ai || ai.off === true)
|
|
11
|
+
return undefined;
|
|
12
|
+
if (ai.fast)
|
|
13
|
+
return { model: ai.fast.model, decide: ai.fast.decide, ...(ai.fast.price ? { price: ai.fast.price } : {}) };
|
|
14
|
+
if (ai.decide)
|
|
15
|
+
return { model: ai.name ?? "model", decide: ai.decide };
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
/** The host's ranker for near records, when it lent one and AI is on. */
|
|
19
|
+
export const nearOf = (ai) => (ai && ai.off !== true ? ai.near : undefined);
|
|
20
|
+
/** The model as a basis names it: "Jev" for any Jev, else its own name. */
|
|
21
|
+
export const modelWord = (model) => (/^jev\b/i.test(model) ? "Jev" : model);
|
|
22
|
+
const round = (value) => Math.round(Math.max(0, Math.min(1, value)) * 100) / 100;
|
|
23
|
+
/** How sure a Noul is that its statement holds: its probability. */
|
|
24
|
+
export function noulOf(answer) {
|
|
25
|
+
return answer?.type === "noul" && Number.isFinite(answer.noul) ? round(answer.noul) : undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A Score as 0 to 1: its expected level over the levels it was asked on,
|
|
29
|
+
* "the same thing" at the top. From its probabilities when it sent them,
|
|
30
|
+
* else from the score itself.
|
|
31
|
+
*/
|
|
32
|
+
export function scoreOf(answer, levels) {
|
|
33
|
+
if (answer?.type !== "score" || levels < 2)
|
|
34
|
+
return undefined;
|
|
35
|
+
const entries = Object.entries(answer.probabilities ?? {}).map(([level, p]) => [Number(level), p]).filter(([level, p]) => Number.isInteger(level) && Number.isFinite(p));
|
|
36
|
+
const total = entries.reduce((sum, [, p]) => sum + p, 0);
|
|
37
|
+
const expected = total > 0 ? entries.reduce((sum, [level, p]) => sum + level * p, 0) / total : answer.score;
|
|
38
|
+
return Number.isFinite(expected) ? round(expected / (levels - 1)) : undefined;
|
|
39
|
+
}
|
|
40
|
+
/** A Choice: what was chosen, how sure (its probability), and its margin over the next. */
|
|
41
|
+
export function choiceOf(answer) {
|
|
42
|
+
if (answer?.type !== "choice")
|
|
43
|
+
return undefined;
|
|
44
|
+
const probabilities = answer.probabilities ?? {};
|
|
45
|
+
const top = probabilities[answer.choice] ?? answer.confidence ?? 0;
|
|
46
|
+
const others = Object.entries(probabilities).filter(([option, p]) => option !== answer.choice && Number.isFinite(p)).map(([, p]) => p);
|
|
47
|
+
return { choice: answer.choice, confidence: round(top), margin: round(top - Math.max(0, ...others)) };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=system-one.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-one.js","sourceRoot":"","sources":["../../src/tidy/system-one.ts"],"names":[],"mappings":"AA0BA;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAA6B,EAAE,EAAsB;IAC/E,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC;IACxB,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,EAAE,CAAC,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,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IAAI,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;IACnE,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACvI,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC;AACxG,CAAC"}
|
package/dist/tidy.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { archive, categorize, duplicates, links, missingLinks, JUDGES, type Candidate, type Judge, type JudgeContext } from "./tidy/judges.js";
|
|
2
|
+
export { dream, touchedIn, TIDYING_ACTOR, type DreamOptions, type DreamOutcome, type DreamReport } from "./tidy/dream.js";
|
|
3
|
+
export { BANDS, routeOf, type Band, type Route, type Severity } from "./tidy/policy.js";
|
|
4
|
+
export { memoryDreamCache, type DreamAnswers, type DreamBudget, type DreamCache, type DreamUsage } from "./tidy/asking.js";
|
|
5
|
+
export { NONE_FITS, NONE_OF_THESE, QUESTION_SET } from "./tidy/judging.js";
|
|
6
|
+
export { systemOneOf, type DreamModel, type SystemOneAnswer, type SystemOneDecide } from "./tidy/system-one.js";
|
|
7
|
+
export { whileAway, type AwaySince, type WhileAway } from "./tidy/away.js";
|
|
8
|
+
//# sourceMappingURL=tidy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tidy.d.ts","sourceRoot":"","sources":["../src/tidy.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,SAAS,EAAE,KAAK,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/I,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1H,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,KAAK,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3H,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAChH,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/tidy.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* `@graview/tools/tidy` — WHAT THE APP'S OWN ACTOR SUGGESTS, AND RUNNING IT.
|
|
3
|
+
*
|
|
4
|
+
* The framework kept the actor to what people said (`@graview/core/tidying`)
|
|
5
|
+
* but never decided what to suggest. Here code finds what is worth asking
|
|
6
|
+
* about (blocking), a System One model the host lends judges it — the same
|
|
7
|
+
* thing twice, which record a relation means, finished, which option fits
|
|
8
|
+
* — and code routes each answer by how much the change would undo: made
|
|
9
|
+
* where the host lets it, suggested, or let go. The deterministic judges —
|
|
10
|
+
* duplicates by a shared name or key, links a record's own text names,
|
|
11
|
+
* finished records long unchanged — are the floor without a model. A
|
|
12
|
+
* host's schedule, an alarm or `graview dream` calls `dream`; `whileAway`
|
|
13
|
+
* says what it did since a person last looked. Its own entry, and on no
|
|
14
|
+
* page's first load: nothing a page draws needs it until the tray says so.
|
|
15
|
+
*/
|
|
16
|
+
export { archive, categorize, duplicates, links, missingLinks, JUDGES } from "./tidy/judges.js";
|
|
17
|
+
export { dream, touchedIn, TIDYING_ACTOR } from "./tidy/dream.js";
|
|
18
|
+
export { BANDS, routeOf } from "./tidy/policy.js";
|
|
19
|
+
export { memoryDreamCache } from "./tidy/asking.js";
|
|
20
|
+
export { NONE_FITS, NONE_OF_THESE, QUESTION_SET } from "./tidy/judging.js";
|
|
21
|
+
export { systemOneOf } from "./tidy/system-one.js";
|
|
22
|
+
export { whileAway } from "./tidy/away.js";
|
|
23
|
+
//# sourceMappingURL=tidy.js.map
|
package/dist/tidy.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tidy.js","sourceRoot":"","sources":["../src/tidy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAiD,MAAM,kBAAkB,CAAC;AAC/I,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAA0D,MAAM,iBAAiB,CAAC;AAC1H,OAAO,EAAE,KAAK,EAAE,OAAO,EAAwC,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAyE,MAAM,kBAAkB,CAAC;AAC3H,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAA+D,MAAM,sBAAsB,CAAC;AAChH,OAAO,EAAE,SAAS,EAAkC,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graview/tools",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -52,11 +52,15 @@
|
|
|
52
52
|
"./inline-ai": {
|
|
53
53
|
"types": "./dist/inline-ai.d.ts",
|
|
54
54
|
"default": "./dist/inline-ai.js"
|
|
55
|
+
},
|
|
56
|
+
"./tidy": {
|
|
57
|
+
"types": "./dist/tidy.d.ts",
|
|
58
|
+
"default": "./dist/tidy.js"
|
|
55
59
|
}
|
|
56
60
|
},
|
|
57
61
|
"dependencies": {
|
|
58
|
-
"@graview/
|
|
59
|
-
"@graview/
|
|
62
|
+
"@graview/core": "0.1.49",
|
|
63
|
+
"@graview/ship": "0.1.49"
|
|
60
64
|
},
|
|
61
65
|
"devDependencies": {
|
|
62
66
|
"@modelcontextprotocol/sdk": "^1.32.0",
|