pi-roundtable-drawing 0.7.5 → 0.7.7
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/package.json +2 -2
- package/src/magic.ts +11 -3
- package/src/plugin.ts +2 -2
- package/src/tools/magic-tools.ts +4 -2
- package/src/tools/relationship-map-tool.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.7.6] - 2026-10-03
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- `permissive` also accepts an empty node id, a sigil intention with no letters or only blanks, and an unknown sacred-geometry color.
|
|
13
|
+
|
|
8
14
|
## [0.7.5] - 2026-10-03
|
|
9
15
|
|
|
10
16
|
### Added
|
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ export default {
|
|
|
84
84
|
| `minTier` | `"owner" \| "admin" \| "member"` | `member` | The lowest tier that may use the tools. The operator's `toolTiers` setting still wins |
|
|
85
85
|
| `cardPresentation` | `CardPresentation` | package captions | Trusted operator-local headings, reversal suffixes and result text |
|
|
86
86
|
| `mapLimits` | `{ title?, text? }` | 80 and 60 | Longest relationship-map title, and node id, node label or edge label, in characters, for a host whose callers already draw longer text; each is a whole number of at least 1 (anything else stops the start), and the renderer's size limit still applies |
|
|
87
|
-
| `permissive` | `boolean` | `false` | Accept what a looser host's callers already send: a card exclusion that is not a card of the deck is ignored, spread positions may share a cell,
|
|
87
|
+
| `permissive` | `boolean` | `false` | Accept what a looser host's callers already send: a card exclusion that is not a card of the deck is ignored, spread positions may share a cell, a relationship map may repeat or leave empty a node id and may draw an edge from a node to itself, a sigil may have an intention with no letters or only blanks, and a sacred-geometry color that canvas cannot parse is ignored. By default each is refused with a message the model can correct |
|
|
88
88
|
|
|
89
89
|
The plugin is named `drawing`.
|
|
90
90
|
`cardPresentation.heading(draw, turn)` returns `{ title, subtitle }`; `draw` holds the selected `deck`, `count`, and optional `question`, and `turn` carries the host-bound speaker/channel.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-roundtable-drawing",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Relationship maps, magic circles, sigils, sacred geometry, and card spreads drawn locally for pi-roundtable",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@biomejs/biome": "2.5.15",
|
|
50
50
|
"@types/bun": "1.4.2",
|
|
51
|
-
"pi-roundtable": "0.7.
|
|
51
|
+
"pi-roundtable": "0.7.7",
|
|
52
52
|
"typescript": "7.0.2"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/src/magic.ts
CHANGED
|
@@ -257,6 +257,8 @@ export interface SigilOptions {
|
|
|
257
257
|
complexity: "simple" | "elaborate";
|
|
258
258
|
style: "traditional" | "modern";
|
|
259
259
|
background: Background;
|
|
260
|
+
/** Draw what a looser caller sends: an intention with no letters, a blank one, or an unknown color. */
|
|
261
|
+
permissive?: boolean;
|
|
260
262
|
}
|
|
261
263
|
|
|
262
264
|
const SIGIL_SIZE = 512;
|
|
@@ -283,9 +285,13 @@ function planetaryRadius(char: string): number {
|
|
|
283
285
|
}
|
|
284
286
|
|
|
285
287
|
export function renderSigil(options: SigilOptions): Uint8Array {
|
|
286
|
-
if (options.intention.trim() === "")
|
|
288
|
+
if (options.intention.trim() === "" && !options.permissive)
|
|
287
289
|
throw new DrawingError("The intention is empty. Give a short phrase.");
|
|
288
|
-
if (
|
|
290
|
+
if (
|
|
291
|
+
options.method !== "geometric" &&
|
|
292
|
+
letters(options.intention).length === 0 &&
|
|
293
|
+
!options.permissive
|
|
294
|
+
)
|
|
289
295
|
throw new DrawingError(
|
|
290
296
|
`The ${options.method} method draws from letters, and the intention has none. Write it in words, or use the geometric method.`,
|
|
291
297
|
);
|
|
@@ -403,6 +409,8 @@ export interface GeometryOptions {
|
|
|
403
409
|
/** CSS colors cycled per layer; the palette's line color when empty. */
|
|
404
410
|
colors: readonly string[];
|
|
405
411
|
background: Background;
|
|
412
|
+
/** Ignore a color canvas cannot parse, as it would, instead of refusing it. */
|
|
413
|
+
permissive?: boolean;
|
|
406
414
|
}
|
|
407
415
|
|
|
408
416
|
const GEOMETRY_SIZE = 1024;
|
|
@@ -433,7 +441,7 @@ export function renderSacredGeometry(options: GeometryOptions): Uint8Array {
|
|
|
433
441
|
`At most ${MAX_LAYERS} colors are used, one for each layer. Give fewer.`,
|
|
434
442
|
);
|
|
435
443
|
for (const color of options.colors)
|
|
436
|
-
if (!isCssColor(color))
|
|
444
|
+
if (!options.permissive && !isCssColor(color))
|
|
437
445
|
throw new DrawingError(
|
|
438
446
|
`${JSON.stringify(color)} is not a CSS color. Use a name such as gold or a code such as #c0a060.`,
|
|
439
447
|
);
|
package/src/plugin.ts
CHANGED
|
@@ -103,8 +103,8 @@ export function drawing(options: DrawingOptions = {}) {
|
|
|
103
103
|
options.permissive,
|
|
104
104
|
),
|
|
105
105
|
magicCircleTool(env),
|
|
106
|
-
sigilTool(env),
|
|
107
|
-
sacredGeometryTool(env),
|
|
106
|
+
sigilTool(env, options.permissive),
|
|
107
|
+
sacredGeometryTool(env, options.permissive),
|
|
108
108
|
...(decks.length > 0
|
|
109
109
|
? [
|
|
110
110
|
drawCardsTool(
|
package/src/tools/magic-tools.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function magicCircleTool(env: ImageToolEnv) {
|
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
export function sigilTool(env: ImageToolEnv) {
|
|
68
|
+
export function sigilTool(env: ImageToolEnv, permissive = false) {
|
|
69
69
|
return imageTool(
|
|
70
70
|
{
|
|
71
71
|
name: "sigil_generate",
|
|
@@ -86,6 +86,7 @@ export function sigilTool(env: ImageToolEnv) {
|
|
|
86
86
|
complexity: args.complexity ?? "elaborate",
|
|
87
87
|
style: args.style ?? "traditional",
|
|
88
88
|
background: args.background ?? "dark",
|
|
89
|
+
permissive,
|
|
89
90
|
}),
|
|
90
91
|
text: "The sigil is attached to your reply as {file}.",
|
|
91
92
|
}),
|
|
@@ -94,7 +95,7 @@ export function sigilTool(env: ImageToolEnv) {
|
|
|
94
95
|
);
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
export function sacredGeometryTool(env: ImageToolEnv) {
|
|
98
|
+
export function sacredGeometryTool(env: ImageToolEnv, permissive = false) {
|
|
98
99
|
return imageTool(
|
|
99
100
|
{
|
|
100
101
|
name: "sacred_geometry_generate",
|
|
@@ -131,6 +132,7 @@ export function sacredGeometryTool(env: ImageToolEnv) {
|
|
|
131
132
|
rotation: args.rotation ?? 0,
|
|
132
133
|
colors: args.colors ?? [],
|
|
133
134
|
background: args.background ?? "dark",
|
|
135
|
+
permissive,
|
|
134
136
|
}),
|
|
135
137
|
text: "The sacred geometry is attached to your reply as {file}.",
|
|
136
138
|
}),
|