@dsh-enhanced/assistant-dreaming 0.0.0-stage → 0.1.68

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/lib/trigger.js ADDED
@@ -0,0 +1,155 @@
1
+ import { createHmac } from 'node:crypto';
2
+ /**
3
+ * Deterministic dreaming trigger. Randomness is an auditable HMAC draw keyed
4
+ * by an owner seed and a stable occurrence identity, so the same inputs always
5
+ * produce the same decision in tests and after restart. The module never calls
6
+ * Math.random and never schedules anything itself.
7
+ */
8
+ export const MILLION = 1_000_000;
9
+ const MINUTES_PER_DAY = 1_440;
10
+ /**
11
+ * Returns the auditable draw for one slot. Determinism makes the decision
12
+ * replayable; the digest alone is persisted, never the seed.
13
+ */
14
+ export function evaluateDraw(input) {
15
+ if (!Number.isSafeInteger(input.occurrence) || input.occurrence < 0) {
16
+ throw new Error('dream trigger: occurrence must be a non-negative safe integer');
17
+ }
18
+ if (!Number.isInteger(input.probabilityPpm) || input.probabilityPpm < 0 || input.probabilityPpm > MILLION) {
19
+ throw new Error('dream trigger: probabilityPpm must be an integer in 0..1_000_000');
20
+ }
21
+ const drawDigest = createHmac('sha256', input.seedDigest)
22
+ .update(`assistant-dreaming/v1\0${input.lane}\0${input.occurrence}`)
23
+ .digest('hex');
24
+ const value = Number.parseInt(drawDigest.slice(0, 8), 16) % MILLION;
25
+ return { drawDigest, value, selected: value < input.probabilityPpm };
26
+ }
27
+ /**
28
+ * Local-day key in UTC minutes. The scheduler uses this for per-day caps; a
29
+ * timezone-aware activeHours check happens separately.
30
+ */
31
+ export function localDayKey(now, timezone) {
32
+ const formatter = new Intl.DateTimeFormat('en-CA', {
33
+ timeZone: timezone, year: 'numeric', month: '2-digit', day: '2-digit',
34
+ });
35
+ const parts = formatter.formatToParts(new Date(now));
36
+ const year = parts.find(part => part.type === 'year')?.value;
37
+ const month = parts.find(part => part.type === 'month')?.value;
38
+ const day = parts.find(part => part.type === 'day')?.value;
39
+ if (!year || !month || !day)
40
+ throw new Error('dream trigger: cannot resolve local day');
41
+ return `${year}-${month}-${day}`;
42
+ }
43
+ function localMinutes(now, timezone) {
44
+ const formatter = new Intl.DateTimeFormat('en-GB', {
45
+ timeZone: timezone, hour: '2-digit', minute: '2-digit', hour12: false,
46
+ });
47
+ const parts = formatter.formatToParts(new Date(now));
48
+ const hour = Number(parts.find(part => part.type === 'hour')?.value);
49
+ const minute = Number(parts.find(part => part.type === 'minute')?.value);
50
+ if (!Number.isInteger(hour) || !Number.isInteger(minute))
51
+ throw new Error('dream trigger: cannot resolve local time');
52
+ return hour * 60 + minute;
53
+ }
54
+ export function isWithinActiveHours(now, activeHours) {
55
+ if (activeHours === null)
56
+ return true;
57
+ const minute = localMinutes(now, activeHours.timezone);
58
+ return minute >= activeHours.startMinute && minute < activeHours.endMinute;
59
+ }
60
+ /**
61
+ * Conservative idle gate based on the latest trusted activity timestamp. The
62
+ * caller supplies activity measured through Host projections (never model
63
+ * prose); a missing marker means "not idle" so the first run fails closed.
64
+ */
65
+ export function isIdle(now, latestActivityAt, idleMinMs) {
66
+ if (latestActivityAt === null || !Number.isFinite(latestActivityAt))
67
+ return false;
68
+ return now - latestActivityAt >= idleMinMs;
69
+ }
70
+ /**
71
+ * Pure decision combining every gate in fail-closed order: active window,
72
+ * idle window, daily cap, deterministic draw. No side effects.
73
+ */
74
+ export function decideTrigger(input) {
75
+ const timezone = input.activeHours?.timezone ?? 'UTC';
76
+ const dayKey = localDayKey(input.now, timezone);
77
+ if (!isWithinActiveHours(input.now, input.activeHours)) {
78
+ return { fire: false, reason: 'outside-active-hours', dayKey };
79
+ }
80
+ if (!isIdle(input.now, input.latestActivityAt, input.idleMinMs)) {
81
+ return { fire: false, reason: 'not-idle', dayKey };
82
+ }
83
+ if (input.dreamsToday >= input.maxDreamsPerDay) {
84
+ return { fire: false, reason: 'daily-cap', dayKey };
85
+ }
86
+ const draw = evaluateDraw({
87
+ seedDigest: input.seedDigest, lane: input.lane, occurrence: input.occurrence,
88
+ probabilityPpm: input.probabilityPpm,
89
+ });
90
+ if (!draw.selected)
91
+ return { fire: false, reason: 'draw-not-selected', dayKey };
92
+ return { fire: true, drawDigest: draw.drawDigest, drawValue: draw.value, dayKey };
93
+ }
94
+ /** Current slot occurrence derived from the base interval since epoch. */
95
+ export function slotOccurrence(now, baseIntervalMs) {
96
+ if (!Number.isSafeInteger(now) || now < 0 || baseIntervalMs <= 0) {
97
+ throw new Error('dream trigger: invalid slot input');
98
+ }
99
+ return Math.floor(now / baseIntervalMs);
100
+ }
101
+ /**
102
+ * Per-subject lottery tickets ("无事找事"): every recallable thing — a task,
103
+ * a goal, a skill, or a previously recorded idea — holds one ticket with a
104
+ * stable ticket value. Each wake slot rolls one bounded random number from the
105
+ * HMAC seed; a subject whose ticket value lands inside the rolling window is
106
+ * recalled for focused thought. This is code-driven (the draw and match run
107
+ * without any model call) — the model is invoked only after a hit.
108
+ *
109
+ * Values live in a widened range rather than [0,1) so a configurable window
110
+ * can be made wider without touching the deterministic draw.
111
+ */
112
+ export const TICKET_MODULUS = 1_000_000;
113
+ /** Default rolling window around the draw value in each direction. */
114
+ export const DEFAULT_TICKET_WINDOW = 5_000;
115
+ /** One subject's stable ticket. The seed is only used as HMAC material. */
116
+ export function assignTicket(input) {
117
+ const digest = createHmac('sha256', input.seedDigest)
118
+ .update(`assistant-dreaming/ticket/v1\0${input.lane}\0${input.subject.kind}\0${input.subject.key}`)
119
+ .digest('hex');
120
+ const value = Number.parseInt(digest.slice(0, 8), 16) % TICKET_MODULUS;
121
+ return { subject: input.subject, value, digest };
122
+ }
123
+ /** The wake's single rolling number, derived deterministically from the seed. */
124
+ export function rollLottery(input) {
125
+ if (!Number.isSafeInteger(input.occurrence) || input.occurrence < 0) {
126
+ throw new Error('dream trigger: lottery occurrence must be a non-negative safe integer');
127
+ }
128
+ const drawDigest = createHmac('sha256', input.seedDigest)
129
+ .update(`assistant-dreaming/lottery/v1\0${input.lane}\0${input.occurrence}`)
130
+ .digest('hex');
131
+ const value = Number.parseInt(drawDigest.slice(0, 8), 16) % TICKET_MODULUS;
132
+ return { drawDigest, value };
133
+ }
134
+ /**
135
+ * Returns the tickets whose value is within `window` of the draw on the
136
+ * circular modulus. Deterministic and side-effect free; an empty result means
137
+ * nothing is recalled this slot, which is the normal "no thought" outcome.
138
+ */
139
+ export function matchTickets(input) {
140
+ const window = input.window ?? DEFAULT_TICKET_WINDOW;
141
+ if (!Number.isSafeInteger(window) || window < 0)
142
+ throw new Error('dream trigger: ticket window must be a non-negative integer');
143
+ const hits = [];
144
+ for (const ticket of input.tickets) {
145
+ const direct = Math.abs(ticket.value - input.draw.value);
146
+ const circular = TICKET_MODULUS - direct;
147
+ const distance = Math.min(direct, circular);
148
+ if (distance <= window) {
149
+ hits.push({ subject: ticket.subject, ticketDigest: ticket.digest, ticketValue: ticket.value, distance });
150
+ }
151
+ }
152
+ return hits.sort((a, b) => a.distance - b.distance || a.subject.key.localeCompare(b.subject.key));
153
+ }
154
+ export { MINUTES_PER_DAY };
155
+ //# sourceMappingURL=trigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trigger.js","sourceRoot":"","sources":["../src/trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAGxC;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAA;AAChC,MAAM,eAAe,GAAG,KAAK,CAAA;AAkB7B;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAgB;IAC3C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAA;IAClF,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,KAAK,CAAC,cAAc,GAAG,CAAC,IAAI,K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C,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QAC3C,IAAI,QAAQ,IAAI,MAAM,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAA;QAC1G,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;AACnG,CAAC;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const version = "0.1.68";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAA"}
package/lib/version.js ADDED
@@ -0,0 +1,2 @@
1
+ export const version = '0.1.68';
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,98 @@
1
1
  {
2
2
  "name": "@dsh-enhanced/assistant-dreaming",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.68",
4
+ "description": "A DeepSeek Harness plugin for Assistant Dreaming.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./lib/index.js",
8
+ "types": "./lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/index.d.ts",
12
+ "default": "./lib/index.js"
13
+ },
14
+ "./cordis.patch.yml": "./cordis.patch.yml",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "lib",
19
+ "cordis.patch.yml",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "engines": {
24
+ "node": "^22.19.0 || >=24.0.0"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/22-ai-00/dsh-enhanced.git",
32
+ "directory": "plugins/assistant-dreaming"
33
+ },
34
+ "keywords": [
35
+ "deepseek",
36
+ "deepseek-harness",
37
+ "dsh-plugin"
38
+ ],
39
+ "dsh": {
40
+ "bundle": {
41
+ "patch": "./cordis.patch.yml"
42
+ }
43
+ },
44
+ "peerDependencies": {
45
+ "@deepseek-ai/cordis": "^4.0.1",
46
+ "@deepseek-ai/dsh-agent": ">=0.2.1-rc.2 <0.3.0",
47
+ "@deepseek-ai/dsh-llm": ">=0.2.1-rc.2 <0.3.0",
48
+ "@deepseek-ai/dsh-session": ">=0.2.1-rc.2 <0.3.0",
49
+ "@deepseek-ai/dsh-tools": ">=0.2.1-rc.2 <0.3.0"
50
+ },
51
+ "peerDependenciesMeta": {
52
+ "@deepseek-ai/cordis": {
53
+ "optional": true
54
+ },
55
+ "@deepseek-ai/dsh-agent": {
56
+ "optional": true
57
+ },
58
+ "@deepseek-ai/dsh-llm": {
59
+ "optional": true
60
+ },
61
+ "@deepseek-ai/dsh-session": {
62
+ "optional": true
63
+ },
64
+ "@deepseek-ai/dsh-tools": {
65
+ "optional": true
66
+ }
67
+ },
68
+ "devDependencies": {
69
+ "@deepseek-ai/cordis": "4.0.5",
70
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-rc.2",
71
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
72
+ "@types/node": "22.20.0",
73
+ "typescript": "6.0.3",
74
+ "vitest": "4.1.8",
75
+ "@deepseek-ai/schemastery": "3.18.5",
76
+ "@deepseek-ai/dsh-agent": "0.2.1-rc.2",
77
+ "@deepseek-ai/dsh-agent-loop": "0.2.1-rc.2",
78
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
79
+ "@deepseek-ai/dsh-session": "0.2.1-rc.2",
80
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-rc.2",
81
+ "@dsh-enhanced/assistant-policy": "0.1.68"
82
+ },
83
+ "dependencies": {
84
+ "@deepseek-ai/schemastery": "3.18.5",
85
+ "@dsh-enhanced/assistant-delivery": "0.1.68",
86
+ "@dsh-enhanced/assistant-automations": "0.1.68",
87
+ "@dsh-enhanced/assistant-evaluation": "0.1.68",
88
+ "@dsh-enhanced/assistant-goals": "0.1.68",
89
+ "@dsh-enhanced/task-acceptance-contract": "0.1.68",
90
+ "@dsh-enhanced/assistant-policy": "0.1.68",
91
+ "@dsh-enhanced/assistant-skills": "0.1.68"
92
+ },
93
+ "scripts": {
94
+ "build": "tsc -p tsconfig.build.json",
95
+ "test": "vitest run",
96
+ "typecheck": "tsc -p tsconfig.json --noEmit"
97
+ }
6
98
  }