@dxos/plugin-daily-summary 0.8.4-main.9be5663bfe → 0.8.4-main.fcfe5033a5
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/types/src/blueprints/functions/generate.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/containers/DailySummarySettings/DailySummarySettings.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -26
- package/src/blueprints/functions/generate.test.ts +7 -7
- package/src/blueprints/functions/generate.ts +10 -4
- package/src/capabilities/react-surface.tsx +1 -2
- package/src/containers/DailySummarySettings/DailySummarySettings.tsx +1 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-daily-summary",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.fcfe5033a5",
|
|
4
4
|
"description": "Daily activity summary plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@effect/ai": "0.33.2",
|
|
35
35
|
"effect": "3.20.0",
|
|
36
|
-
"@dxos/ai": "0.8.4-main.
|
|
37
|
-
"@dxos/app-
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/client-protocol": "0.8.4-main.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/echo": "0.8.4-main.
|
|
44
|
-
"@dxos/functions": "0.8.4-main.
|
|
45
|
-
"@dxos/functions-runtime": "0.8.4-main.
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/util": "0.8.4-main.
|
|
56
|
-
"@dxos/
|
|
36
|
+
"@dxos/ai": "0.8.4-main.fcfe5033a5",
|
|
37
|
+
"@dxos/app-toolkit": "0.8.4-main.fcfe5033a5",
|
|
38
|
+
"@dxos/blueprints": "0.8.4-main.fcfe5033a5",
|
|
39
|
+
"@dxos/app-framework": "0.8.4-main.fcfe5033a5",
|
|
40
|
+
"@dxos/assistant": "0.8.4-main.fcfe5033a5",
|
|
41
|
+
"@dxos/client-protocol": "0.8.4-main.fcfe5033a5",
|
|
42
|
+
"@dxos/client": "0.8.4-main.fcfe5033a5",
|
|
43
|
+
"@dxos/echo": "0.8.4-main.fcfe5033a5",
|
|
44
|
+
"@dxos/functions": "0.8.4-main.fcfe5033a5",
|
|
45
|
+
"@dxos/functions-runtime": "0.8.4-main.fcfe5033a5",
|
|
46
|
+
"@dxos/effect": "0.8.4-main.fcfe5033a5",
|
|
47
|
+
"@dxos/invariant": "0.8.4-main.fcfe5033a5",
|
|
48
|
+
"@dxos/keys": "0.8.4-main.fcfe5033a5",
|
|
49
|
+
"@dxos/plugin-graph": "0.8.4-main.fcfe5033a5",
|
|
50
|
+
"@dxos/plugin-space": "0.8.4-main.fcfe5033a5",
|
|
51
|
+
"@dxos/operation": "0.8.4-main.fcfe5033a5",
|
|
52
|
+
"@dxos/react-client": "0.8.4-main.fcfe5033a5",
|
|
53
|
+
"@dxos/schema": "0.8.4-main.fcfe5033a5",
|
|
54
|
+
"@dxos/react-ui-form": "0.8.4-main.fcfe5033a5",
|
|
55
|
+
"@dxos/util": "0.8.4-main.fcfe5033a5",
|
|
56
|
+
"@dxos/types": "0.8.4-main.fcfe5033a5"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@storybook/react-vite": "^10.2.12",
|
|
@@ -62,15 +62,15 @@
|
|
|
62
62
|
"react": "~19.2.3",
|
|
63
63
|
"react-dom": "~19.2.3",
|
|
64
64
|
"vite": "^7.1.11",
|
|
65
|
-
"@dxos/echo-db": "0.8.4-main.
|
|
66
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
67
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
65
|
+
"@dxos/echo-db": "0.8.4-main.fcfe5033a5",
|
|
66
|
+
"@dxos/react-ui": "0.8.4-main.fcfe5033a5",
|
|
67
|
+
"@dxos/storybook-utils": "0.8.4-main.fcfe5033a5"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"effect": "3.20.0",
|
|
71
71
|
"react": "~19.2.3",
|
|
72
72
|
"react-dom": "~19.2.3",
|
|
73
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
73
|
+
"@dxos/react-ui": "0.8.4-main.fcfe5033a5"
|
|
74
74
|
},
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
@@ -11,8 +11,8 @@ import { Blueprint } from '@dxos/blueprints';
|
|
|
11
11
|
import { SpaceProperties } from '@dxos/client-protocol';
|
|
12
12
|
import { Collection, DXN, Database, Obj, Query, Ref, Type } from '@dxos/echo';
|
|
13
13
|
import { TestHelpers } from '@dxos/effect/testing';
|
|
14
|
-
import { FunctionInvocationService } from '@dxos/functions';
|
|
15
14
|
import { ObjectId } from '@dxos/keys';
|
|
15
|
+
import { Operation } from '@dxos/operation';
|
|
16
16
|
import { Text } from '@dxos/schema';
|
|
17
17
|
import { HasSubject } from '@dxos/types';
|
|
18
18
|
|
|
@@ -49,7 +49,7 @@ describe('GenerateSummary', () => {
|
|
|
49
49
|
'creates a Markdown document with summary content',
|
|
50
50
|
Effect.fnUntraced(
|
|
51
51
|
function* (_) {
|
|
52
|
-
const result = yield*
|
|
52
|
+
const result = yield* Operation.invoke(GenerateSummary, {
|
|
53
53
|
lookbackHours: 24,
|
|
54
54
|
});
|
|
55
55
|
|
|
@@ -73,7 +73,7 @@ describe('GenerateSummary', () => {
|
|
|
73
73
|
'creates a "Summaries" collection if none exists',
|
|
74
74
|
Effect.fnUntraced(
|
|
75
75
|
function* (_) {
|
|
76
|
-
yield*
|
|
76
|
+
yield* Operation.invoke(GenerateSummary, {});
|
|
77
77
|
|
|
78
78
|
const collections = yield* Database.runQuery(Query.type(Collection.Collection, { name: 'Summaries' }));
|
|
79
79
|
expect(collections.length).toBe(1);
|
|
@@ -89,8 +89,8 @@ describe('GenerateSummary', () => {
|
|
|
89
89
|
'reuses existing "Summaries" collection on subsequent calls',
|
|
90
90
|
Effect.fnUntraced(
|
|
91
91
|
function* (_) {
|
|
92
|
-
yield*
|
|
93
|
-
yield*
|
|
92
|
+
yield* Operation.invoke(GenerateSummary, {});
|
|
93
|
+
yield* Operation.invoke(GenerateSummary, {});
|
|
94
94
|
|
|
95
95
|
const collections = yield* Database.runQuery(Query.type(Collection.Collection, { name: 'Summaries' }));
|
|
96
96
|
expect(collections.length).toBe(1);
|
|
@@ -107,7 +107,7 @@ describe('GenerateSummary', () => {
|
|
|
107
107
|
Effect.fnUntraced(
|
|
108
108
|
function* (_) {
|
|
109
109
|
const previousSummary = 'Yesterday was productive. 10 objects edited.';
|
|
110
|
-
const result = yield*
|
|
110
|
+
const result = yield* Operation.invoke(GenerateSummary, {
|
|
111
111
|
previousSummary,
|
|
112
112
|
lookbackHours: 24,
|
|
113
113
|
});
|
|
@@ -127,7 +127,7 @@ describe('GenerateSummary', () => {
|
|
|
127
127
|
'names document with today date',
|
|
128
128
|
Effect.fnUntraced(
|
|
129
129
|
function* (_) {
|
|
130
|
-
const result = yield*
|
|
130
|
+
const result = yield* Operation.invoke(GenerateSummary, {});
|
|
131
131
|
const today = new Date().toISOString().slice(0, 10);
|
|
132
132
|
expect(result.date).toBe(today);
|
|
133
133
|
|
|
@@ -10,8 +10,8 @@ import * as Schema from 'effect/Schema';
|
|
|
10
10
|
|
|
11
11
|
import { AiService, ToolExecutionService, ToolResolverService } from '@dxos/ai';
|
|
12
12
|
import { Collection, Database, Filter, Obj, Query, Ref, Type } from '@dxos/echo';
|
|
13
|
-
import {
|
|
14
|
-
import { Operation } from '@dxos/operation';
|
|
13
|
+
import { Trace } from '@dxos/functions';
|
|
14
|
+
import { Operation, OperationRegistry } from '@dxos/operation';
|
|
15
15
|
import { Text } from '@dxos/schema';
|
|
16
16
|
import { CollectionModel } from '@dxos/schema';
|
|
17
17
|
import { trim } from '@dxos/util';
|
|
@@ -109,8 +109,14 @@ export default GenerateSummary.pipe(
|
|
|
109
109
|
AiService.model('@anthropic/claude-haiku-4-5'),
|
|
110
110
|
ToolResolverService.layerEmpty,
|
|
111
111
|
ToolExecutionService.layerEmpty,
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
Database.notAvailable,
|
|
113
|
+
Layer.succeed(Operation.Service, {
|
|
114
|
+
invoke: () => Effect.die('Not available.'),
|
|
115
|
+
schedule: () => Effect.die('Not available.'),
|
|
116
|
+
invokePromise: async () => ({ error: new Error('Not available.') }),
|
|
117
|
+
} as any),
|
|
118
|
+
Layer.succeed(OperationRegistry.Service, { resolve: () => Effect.succeed(undefined) } as any),
|
|
119
|
+
Trace.writerLayerNoop,
|
|
114
120
|
),
|
|
115
121
|
),
|
|
116
122
|
),
|
|
@@ -17,8 +17,7 @@ export default Capability.makeModule(() =>
|
|
|
17
17
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
18
18
|
Surface.create({
|
|
19
19
|
id: 'space-settings-daily-summary',
|
|
20
|
-
|
|
21
|
-
filter: AppSurface.literalSection(`${meta.id}.space-settings-daily-summary`),
|
|
20
|
+
filter: AppSurface.literal(AppSurface.Article, `${meta.id}.space-settings-daily-summary`),
|
|
22
21
|
component: () => {
|
|
23
22
|
const space = useActiveSpace();
|
|
24
23
|
if (!space) {
|
|
@@ -43,10 +43,7 @@ export const DailySummarySettings = ({ space }: DailySummarySettingsProps) => {
|
|
|
43
43
|
}
|
|
44
44
|
const trigger = Trigger.make({
|
|
45
45
|
enabled: true,
|
|
46
|
-
spec:
|
|
47
|
-
kind: 'timer',
|
|
48
|
-
cron: '0 21 * * *',
|
|
49
|
-
},
|
|
46
|
+
spec: Trigger.specTimer('0 21 * * *'),
|
|
50
47
|
function: Ref.make(Operation.serialize(GenerateSummary)),
|
|
51
48
|
});
|
|
52
49
|
space.db.add(trigger);
|