@dxos/plugin-daily-summary 0.8.3
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/LICENSE +8 -0
- package/dist/lib/browser/DailySummarySettings-RF6P6R5M.mjs +63 -0
- package/dist/lib/browser/DailySummarySettings-RF6P6R5M.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-RHJEYETQ.mjs +39 -0
- package/dist/lib/browser/app-graph-builder-RHJEYETQ.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-XOEDPUVU.mjs +53 -0
- package/dist/lib/browser/blueprint-definition-XOEDPUVU.mjs.map +7 -0
- package/dist/lib/browser/chunk-2TNDFGQB.mjs +21 -0
- package/dist/lib/browser/chunk-2TNDFGQB.mjs.map +7 -0
- package/dist/lib/browser/chunk-UYXGTD3T.mjs +40 -0
- package/dist/lib/browser/chunk-UYXGTD3T.mjs.map +7 -0
- package/dist/lib/browser/generate-FSSCIHAO.mjs +172 -0
- package/dist/lib/browser/generate-FSSCIHAO.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +48 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/browser/react-surface-WCGJVZCQ.mjs +36 -0
- package/dist/lib/browser/react-surface-WCGJVZCQ.mjs.map +7 -0
- package/dist/types/src/DailySummaryPlugin.d.ts +3 -0
- package/dist/types/src/DailySummaryPlugin.d.ts.map +1 -0
- package/dist/types/src/blueprints/daily-summary-blueprint.d.ts +7 -0
- package/dist/types/src/blueprints/daily-summary-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/definitions.d.ts +18 -0
- package/dist/types/src/blueprints/functions/definitions.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/generate.d.ts +18 -0
- package/dist/types/src/blueprints/functions/generate.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/generate.test.d.ts +2 -0
- package/dist/types/src/blueprints/functions/generate.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/functions/index.d.ts +4 -0
- package/dist/types/src/blueprints/functions/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +3 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/containers/DailySummarySettings/DailySummarySettings.d.ts +7 -0
- package/dist/types/src/containers/DailySummarySettings/DailySummarySettings.d.ts.map +1 -0
- package/dist/types/src/containers/DailySummarySettings/index.d.ts +3 -0
- package/dist/types/src/containers/DailySummarySettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +3 -0
- package/dist/types/src/meta.d.ts.map +1 -0
- package/dist/types/src/meta.test.d.ts +2 -0
- package/dist/types/src/meta.test.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +11 -0
- package/dist/types/src/translations.d.ts.map +1 -0
- package/dist/types/src/translations.test.d.ts +2 -0
- package/dist/types/src/translations.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +71 -0
- package/src/DailySummaryPlugin.tsx +18 -0
- package/src/blueprints/daily-summary-blueprint.ts +37 -0
- package/src/blueprints/functions/definitions.ts +43 -0
- package/src/blueprints/functions/generate.test.ts +143 -0
- package/src/blueprints/functions/generate.ts +182 -0
- package/src/blueprints/functions/index.ts +9 -0
- package/src/blueprints/index.ts +6 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +37 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/index.ts +7 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +33 -0
- package/src/containers/DailySummarySettings/DailySummarySettings.tsx +68 -0
- package/src/containers/DailySummarySettings/index.ts +7 -0
- package/src/containers/index.ts +7 -0
- package/src/index.ts +6 -0
- package/src/meta.test.ts +21 -0
- package/src/meta.ts +19 -0
- package/src/translations.test.ts +20 -0
- package/src/translations.ts +20 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
Copyright (c) 2022 DXOS
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GenerateSummary
|
|
3
|
+
} from "./chunk-UYXGTD3T.mjs";
|
|
4
|
+
import {
|
|
5
|
+
meta
|
|
6
|
+
} from "./chunk-2TNDFGQB.mjs";
|
|
7
|
+
|
|
8
|
+
// src/containers/DailySummarySettings/DailySummarySettings.tsx
|
|
9
|
+
import React, { useCallback, useMemo } from "react";
|
|
10
|
+
import { Filter, Ref } from "@dxos/echo";
|
|
11
|
+
import { Trigger } from "@dxos/functions";
|
|
12
|
+
import { Operation } from "@dxos/operation";
|
|
13
|
+
import { useQuery } from "@dxos/react-client/echo";
|
|
14
|
+
import { IconButton, useTranslation } from "@dxos/react-ui";
|
|
15
|
+
var DailySummarySettings = ({ space }) => {
|
|
16
|
+
const { t } = useTranslation(meta.id);
|
|
17
|
+
const triggers = useQuery(space.db, Filter.type(Trigger.Trigger));
|
|
18
|
+
const existingTrigger = useMemo(() => triggers.find((trigger) => {
|
|
19
|
+
if (trigger.spec?.kind !== "timer") {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
const target = trigger.function?.target;
|
|
23
|
+
return target != null && "key" in target && target.key === GenerateSummary.meta.key;
|
|
24
|
+
}), [
|
|
25
|
+
triggers
|
|
26
|
+
]);
|
|
27
|
+
const handleCreateTrigger = useCallback(() => {
|
|
28
|
+
if (existingTrigger) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const trigger = Trigger.make({
|
|
32
|
+
enabled: true,
|
|
33
|
+
spec: {
|
|
34
|
+
kind: "timer",
|
|
35
|
+
cron: "0 21 * * *"
|
|
36
|
+
},
|
|
37
|
+
function: Ref.make(Operation.serialize(GenerateSummary))
|
|
38
|
+
});
|
|
39
|
+
space.db.add(trigger);
|
|
40
|
+
}, [
|
|
41
|
+
space,
|
|
42
|
+
existingTrigger
|
|
43
|
+
]);
|
|
44
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
45
|
+
className: "flex flex-col gap-4 p-4"
|
|
46
|
+
}, /* @__PURE__ */ React.createElement("h2", {
|
|
47
|
+
className: "text-lg font-medium"
|
|
48
|
+
}, t("plugin name")), /* @__PURE__ */ React.createElement("p", {
|
|
49
|
+
className: "text-sm text-description"
|
|
50
|
+
}, t("create trigger description")), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(IconButton, {
|
|
51
|
+
icon: existingTrigger ? "ph--check--regular" : "ph--plus--regular",
|
|
52
|
+
label: t("create trigger label"),
|
|
53
|
+
onClick: handleCreateTrigger,
|
|
54
|
+
disabled: !!existingTrigger
|
|
55
|
+
})));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// src/containers/DailySummarySettings/index.ts
|
|
59
|
+
var DailySummarySettings_default = DailySummarySettings;
|
|
60
|
+
export {
|
|
61
|
+
DailySummarySettings_default as default
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=DailySummarySettings-RF6P6R5M.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/DailySummarySettings/DailySummarySettings.tsx", "../../../src/containers/DailySummarySettings/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport React, { useCallback, useMemo } from 'react';\n\nimport type { Space } from '@dxos/client/echo';\nimport { Filter, Ref } from '@dxos/echo';\nimport { Trigger } from '@dxos/functions';\nimport { Operation } from '@dxos/operation';\nimport { useQuery } from '@dxos/react-client/echo';\nimport { IconButton, useTranslation } from '@dxos/react-ui';\n\nimport { GenerateSummary } from '../../blueprints/functions/definitions';\nimport { meta } from '../../meta';\n\nexport type DailySummarySettingsProps = {\n space: Space;\n};\n\nexport const DailySummarySettings = ({ space }: DailySummarySettingsProps) => {\n const { t } = useTranslation(meta.id);\n\n const triggers = useQuery(space.db, Filter.type(Trigger.Trigger));\n const existingTrigger = useMemo(\n () =>\n triggers.find((trigger) => {\n if (trigger.spec?.kind !== 'timer') {\n return false;\n }\n const target = trigger.function?.target;\n return (\n target != null && 'key' in target && (target as Record<string, unknown>).key === GenerateSummary.meta.key\n );\n }),\n [triggers],\n );\n\n const handleCreateTrigger = useCallback(() => {\n if (existingTrigger) {\n return;\n }\n const trigger = Trigger.make({\n enabled: true,\n spec: {\n kind: 'timer',\n cron: '0 21 * * *',\n },\n function: Ref.make(Operation.serialize(GenerateSummary)),\n });\n space.db.add(trigger);\n }, [space, existingTrigger]);\n\n return (\n <div className='flex flex-col gap-4 p-4'>\n <h2 className='text-lg font-medium'>{t('plugin name')}</h2>\n <p className='text-sm text-description'>{t('create trigger description')}</p>\n <div>\n <IconButton\n icon={existingTrigger ? 'ph--check--regular' : 'ph--plus--regular'}\n label={t('create trigger label')}\n onClick={handleCreateTrigger}\n disabled={!!existingTrigger}\n />\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { DailySummarySettings } from './DailySummarySettings';\n\nexport default DailySummarySettings;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,OAAOA,SAASC,aAAaC,eAAe;AAG5C,SAASC,QAAQC,WAAW;AAC5B,SAASC,eAAe;AACxB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,YAAYC,sBAAsB;AASpC,IAAMC,uBAAuB,CAAC,EAAEC,MAAK,MAA6B;AACvE,QAAM,EAAEC,EAAC,IAAKC,eAAeC,KAAKC,EAAE;AAEpC,QAAMC,WAAWC,SAASN,MAAMO,IAAIC,OAAOC,KAAKC,QAAQA,OAAO,CAAA;AAC/D,QAAMC,kBAAkBC,QACtB,MACEP,SAASQ,KAAK,CAACC,YAAAA;AACb,QAAIA,QAAQC,MAAMC,SAAS,SAAS;AAClC,aAAO;IACT;AACA,UAAMC,SAASH,QAAQI,UAAUD;AACjC,WACEA,UAAU,QAAQ,SAASA,UAAWA,OAAmCE,QAAQC,gBAAgBjB,KAAKgB;EAE1G,CAAA,GACF;IAACd;GAAS;AAGZ,QAAMgB,sBAAsBC,YAAY,MAAA;AACtC,QAAIX,iBAAiB;AACnB;IACF;AACA,UAAMG,UAAUJ,QAAQa,KAAK;MAC3BC,SAAS;MACTT,MAAM;QACJC,MAAM;QACNS,MAAM;MACR;MACAP,UAAUQ,IAAIH,KAAKI,UAAUC,UAAUR,eAAAA,CAAAA;IACzC,CAAA;AACApB,UAAMO,GAAGsB,IAAIf,OAAAA;EACf,GAAG;IAACd;IAAOW;GAAgB;AAE3B,SACE,sBAAA,cAACmB,OAAAA;IAAIC,WAAU;KACb,sBAAA,cAACC,MAAAA;IAAGD,WAAU;KAAuB9B,EAAE,aAAA,CAAA,GACvC,sBAAA,cAACgC,KAAAA;IAAEF,WAAU;KAA4B9B,EAAE,4BAAA,CAAA,GAC3C,sBAAA,cAAC6B,OAAAA,MACC,sBAAA,cAACI,YAAAA;IACCC,MAAMxB,kBAAkB,uBAAuB;IAC/CyB,OAAOnC,EAAE,sBAAA;IACToC,SAAShB;IACTiB,UAAU,CAAC,CAAC3B;;AAKtB;;;AC7DA,IAAA,+BAAe4B;",
|
|
6
|
+
"names": ["React", "useCallback", "useMemo", "Filter", "Ref", "Trigger", "Operation", "useQuery", "IconButton", "useTranslation", "DailySummarySettings", "space", "t", "useTranslation", "meta", "id", "triggers", "useQuery", "db", "Filter", "type", "Trigger", "existingTrigger", "useMemo", "find", "trigger", "spec", "kind", "target", "function", "key", "GenerateSummary", "handleCreateTrigger", "useCallback", "make", "enabled", "cron", "Ref", "Operation", "serialize", "add", "div", "className", "h2", "p", "IconButton", "icon", "label", "onClick", "disabled", "DailySummarySettings"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-2TNDFGQB.mjs";
|
|
4
|
+
|
|
5
|
+
// src/capabilities/app-graph-builder/app-graph-builder.ts
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import { Capability } from "@dxos/app-framework";
|
|
8
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
9
|
+
import { GraphBuilder, NodeMatcher } from "@dxos/plugin-graph";
|
|
10
|
+
import { meta as spaceMeta } from "@dxos/plugin-space";
|
|
11
|
+
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
12
|
+
const extensions = yield* Effect.all([
|
|
13
|
+
GraphBuilder.createExtension({
|
|
14
|
+
id: `${meta.id}.space-settings-daily-summary`,
|
|
15
|
+
match: NodeMatcher.whenNodeType(`${spaceMeta.id}.settings`),
|
|
16
|
+
connector: (node) => Effect.succeed([
|
|
17
|
+
{
|
|
18
|
+
id: `${meta.id}.daily-summary`,
|
|
19
|
+
type: `${meta.id}.space-settings-daily-summary`,
|
|
20
|
+
data: `${meta.id}.space-settings-daily-summary`,
|
|
21
|
+
properties: {
|
|
22
|
+
label: [
|
|
23
|
+
"plugin name",
|
|
24
|
+
{
|
|
25
|
+
ns: meta.id
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
icon: "ph--calendar-check--regular"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
])
|
|
32
|
+
})
|
|
33
|
+
]);
|
|
34
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
35
|
+
}));
|
|
36
|
+
export {
|
|
37
|
+
app_graph_builder_default as default
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=app-graph-builder-RHJEYETQ.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';\nimport { meta as spaceMeta } from '@dxos/plugin-space';\n\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* Effect.all([\n GraphBuilder.createExtension({\n id: `${meta.id}.space-settings-daily-summary`,\n match: NodeMatcher.whenNodeType(`${spaceMeta.id}.settings`),\n connector: (node) =>\n Effect.succeed([\n {\n id: `${meta.id}.daily-summary`,\n type: `${meta.id}.space-settings-daily-summary`,\n data: `${meta.id}.space-settings-daily-summary`,\n properties: {\n label: ['plugin name', { ns: meta.id }],\n icon: 'ph--calendar-check--regular',\n },\n },\n ]),\n }),\n ]);\n\n return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAChC,SAASC,cAAcC,mBAAmB;AAC1C,SAASC,QAAQC,iBAAiB;AAIlC,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAcC,WAAI;IACnCC,aAAaC,gBAAgB;MAC3BC,IAAI,GAAGC,KAAKD,EAAE;MACdE,OAAOC,YAAYC,aAAa,GAAGC,UAAUL,EAAE,WAAW;MAC1DM,WAAW,CAACC,SACHC,eAAQ;QACb;UACER,IAAI,GAAGC,KAAKD,EAAE;UACdS,MAAM,GAAGR,KAAKD,EAAE;UAChBU,MAAM,GAAGT,KAAKD,EAAE;UAChBW,YAAY;YACVC,OAAO;cAAC;cAAe;gBAAEC,IAAIZ,KAAKD;cAAG;;YACrCc,MAAM;UACR;QACF;OACD;IACL,CAAA;GACD;AAED,SAAOrB,WAAWsB,YAAYC,gBAAgBC,iBAAiBrB,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capability", "AppCapabilities", "GraphBuilder", "NodeMatcher", "meta", "spaceMeta", "Capability", "makeModule", "fnUntraced", "extensions", "all", "GraphBuilder", "createExtension", "id", "meta", "match", "NodeMatcher", "whenNodeType", "spaceMeta", "connector", "node", "succeed", "type", "data", "properties", "label", "ns", "icon", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GenerateSummary
|
|
3
|
+
} from "./chunk-UYXGTD3T.mjs";
|
|
4
|
+
|
|
5
|
+
// src/capabilities/blueprint-definition/blueprint-definition.ts
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import { Capability } from "@dxos/app-framework";
|
|
8
|
+
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
9
|
+
|
|
10
|
+
// src/blueprints/daily-summary-blueprint.ts
|
|
11
|
+
import { Blueprint, Template } from "@dxos/blueprints";
|
|
12
|
+
import { trim } from "@dxos/util";
|
|
13
|
+
|
|
14
|
+
// src/blueprints/functions/index.ts
|
|
15
|
+
import { OperationHandlerSet } from "@dxos/operation";
|
|
16
|
+
var DailySummaryHandlers = OperationHandlerSet.lazy(() => import("./generate-FSSCIHAO.mjs"));
|
|
17
|
+
|
|
18
|
+
// src/blueprints/daily-summary-blueprint.ts
|
|
19
|
+
var BLUEPRINT_KEY = "org.dxos.blueprint.daily-summary";
|
|
20
|
+
var make = () => Blueprint.make({
|
|
21
|
+
key: BLUEPRINT_KEY,
|
|
22
|
+
name: "Daily Summary",
|
|
23
|
+
tools: Blueprint.toolDefinitions({
|
|
24
|
+
operations: [
|
|
25
|
+
GenerateSummary
|
|
26
|
+
]
|
|
27
|
+
}),
|
|
28
|
+
instructions: Template.make({
|
|
29
|
+
source: trim`
|
|
30
|
+
{{! Daily Summary }}
|
|
31
|
+
|
|
32
|
+
You generate concise daily activity summaries as Markdown documents.
|
|
33
|
+
When asked to summarize, use the generate tool to query recent objects and produce a summary.
|
|
34
|
+
The tool creates a Markdown document in a "Summaries" collection.
|
|
35
|
+
If a summary for today already exists, it updates the existing document.
|
|
36
|
+
`
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
var blueprint = {
|
|
40
|
+
key: BLUEPRINT_KEY,
|
|
41
|
+
make
|
|
42
|
+
};
|
|
43
|
+
var daily_summary_blueprint_default = blueprint;
|
|
44
|
+
|
|
45
|
+
// src/capabilities/blueprint-definition/blueprint-definition.ts
|
|
46
|
+
var blueprintDefinition = Capability.makeModule(() => Effect.succeed([
|
|
47
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, daily_summary_blueprint_default)
|
|
48
|
+
]));
|
|
49
|
+
var blueprint_definition_default = blueprintDefinition;
|
|
50
|
+
export {
|
|
51
|
+
blueprint_definition_default as default
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=blueprint-definition-XOEDPUVU.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/blueprint-definition/blueprint-definition.ts", "../../../src/blueprints/daily-summary-blueprint.ts", "../../../src/blueprints/functions/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n\nimport { DailySummaryBlueprint } from '../../blueprints';\n\nconst blueprintDefinition = Capability.makeModule<\n [],\n Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]\n>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, DailySummaryBlueprint)]));\n\nexport default blueprintDefinition;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type AppCapabilities } from '@dxos/app-toolkit';\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { trim } from '@dxos/util';\n\nimport { DailySummaryHandlers, GenerateSummary } from './functions';\n\nexport const BLUEPRINT_KEY = 'org.dxos.blueprint.daily-summary';\n\nexport { DailySummaryHandlers };\n\nconst make = () =>\n Blueprint.make({\n key: BLUEPRINT_KEY,\n name: 'Daily Summary',\n tools: Blueprint.toolDefinitions({ operations: [GenerateSummary] }),\n instructions: Template.make({\n source: trim`\n {{! Daily Summary }}\n\n You generate concise daily activity summaries as Markdown documents.\n When asked to summarize, use the generate tool to query recent objects and produce a summary.\n The tool creates a Markdown document in a \"Summaries\" collection.\n If a summary for today already exists, it updates the existing document.\n `,\n }),\n });\n\nconst blueprint: AppCapabilities.BlueprintDefinition = {\n key: BLUEPRINT_KEY,\n make,\n};\n\nexport default blueprint;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/operation';\n\nexport * from './definitions';\n\nexport const DailySummaryHandlers = OperationHandlerSet.lazy(() => import('./generate'));\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;;;ACFhC,SAASC,WAAWC,gBAAgB;AACpC,SAASC,YAAY;;;ACFrB,SAASC,2BAA2B;AAI7B,IAAMC,uBAAuBC,oBAAoBC,KAAK,MAAM,OAAO,yBAAA,CAAA;;;ADEnE,IAAMC,gBAAgB;AAI7B,IAAMC,OAAO,MACXC,UAAUD,KAAK;EACbE,KAAKC;EACLC,MAAM;EACNC,OAAOJ,UAAUK,gBAAgB;IAAEC,YAAY;MAACC;;EAAiB,CAAA;EACjEC,cAAcC,SAASV,KAAK;IAC1BW,QAAQC;;;;;;;;EAQV,CAAA;AACF,CAAA;AAEF,IAAMC,YAAiD;EACrDX,KAAKC;EACLH;AACF;AAEA,IAAA,kCAAea;;;ADzBf,IAAMC,sBAAsBC,WAAWC,WAGrC,MAAaC,eAAQ;EAACF,WAAWG,YAAYC,gBAAgBC,qBAAqBC,+BAAAA;CAAuB,CAAA;AAE3G,IAAA,+BAAeP;",
|
|
6
|
+
"names": ["Effect", "Capability", "AppCapabilities", "Blueprint", "Template", "trim", "OperationHandlerSet", "DailySummaryHandlers", "OperationHandlerSet", "lazy", "BLUEPRINT_KEY", "make", "Blueprint", "key", "BLUEPRINT_KEY", "name", "tools", "toolDefinitions", "operations", "GenerateSummary", "instructions", "Template", "source", "trim", "blueprint", "blueprintDefinition", "Capability", "makeModule", "succeed", "contributes", "AppCapabilities", "BlueprintDefinition", "DailySummaryBlueprint"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: "org.dxos.plugin.daily-summary",
|
|
5
|
+
name: "Daily Summary",
|
|
6
|
+
description: trim`
|
|
7
|
+
Generates a daily summary of your activity by querying objects edited in the last day
|
|
8
|
+
and feeding them to an AI agent. Runs on a configurable schedule (default 9 PM).
|
|
9
|
+
`,
|
|
10
|
+
icon: "ph--calendar-check--regular",
|
|
11
|
+
iconHue: "sky",
|
|
12
|
+
tags: [
|
|
13
|
+
"labs"
|
|
14
|
+
],
|
|
15
|
+
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-daily-summary"
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
meta
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-2TNDFGQB.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.daily-summary',\n name: 'Daily Summary',\n description: trim`\n Generates a daily summary of your activity by querying objects edited in the last day\n and feeding them to an AI agent. Runs on a configurable schedule (default 9 PM).\n `,\n icon: 'ph--calendar-check--regular',\n iconHue: 'sky',\n tags: ['labs'],\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-daily-summary',\n};\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,MAAM;IAAC;;EACPC,QAAQ;AACV;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "tags", "source"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// src/blueprints/functions/definitions.ts
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import { AiService } from "@dxos/ai";
|
|
4
|
+
import { Database } from "@dxos/echo";
|
|
5
|
+
import { Operation } from "@dxos/operation";
|
|
6
|
+
var GenerateSummary = Operation.make({
|
|
7
|
+
meta: {
|
|
8
|
+
key: "org.dxos.function.daily-summary.generate",
|
|
9
|
+
name: "Generate Daily Summary",
|
|
10
|
+
description: "Queries objects modified in the last day and generates an AI-summarized markdown document."
|
|
11
|
+
},
|
|
12
|
+
input: Schema.Struct({
|
|
13
|
+
previousSummary: Schema.optional(Schema.String).annotations({
|
|
14
|
+
description: "The previous day summary text for context continuity."
|
|
15
|
+
}),
|
|
16
|
+
lookbackHours: Schema.optional(Schema.Number).annotations({
|
|
17
|
+
description: "Number of hours to look back for modified objects. Defaults to 24."
|
|
18
|
+
})
|
|
19
|
+
}),
|
|
20
|
+
output: Schema.Struct({
|
|
21
|
+
id: Schema.String.annotations({
|
|
22
|
+
description: "DXN of the created or updated markdown document."
|
|
23
|
+
}),
|
|
24
|
+
objectCount: Schema.Number.annotations({
|
|
25
|
+
description: "Number of objects included in the summary."
|
|
26
|
+
}),
|
|
27
|
+
date: Schema.String.annotations({
|
|
28
|
+
description: 'Date label for the summary (e.g., "March 20").'
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
services: [
|
|
32
|
+
Database.Service,
|
|
33
|
+
AiService.AiService
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
GenerateSummary
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=chunk-UYXGTD3T.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/functions/definitions.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { AiService } from '@dxos/ai';\nimport { Database } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\n\n/**\n * Generates a daily summary of recently modified objects using AI.\n * Queries the database for objects updated within a time window,\n * sends them to an LLM for summarization, and creates/updates\n * a Markdown document in a \"Summaries\" collection.\n */\nexport const GenerateSummary = Operation.make({\n meta: {\n key: 'org.dxos.function.daily-summary.generate',\n name: 'Generate Daily Summary',\n description: 'Queries objects modified in the last day and generates an AI-summarized markdown document.',\n },\n input: Schema.Struct({\n previousSummary: Schema.optional(Schema.String).annotations({\n description: 'The previous day summary text for context continuity.',\n }),\n lookbackHours: Schema.optional(Schema.Number).annotations({\n description: 'Number of hours to look back for modified objects. Defaults to 24.',\n }),\n }),\n output: Schema.Struct({\n id: Schema.String.annotations({\n description: 'DXN of the created or updated markdown document.',\n }),\n objectCount: Schema.Number.annotations({\n description: 'Number of objects included in the summary.',\n }),\n date: Schema.String.annotations({\n description: 'Date label for the summary (e.g., \"March 20\").',\n }),\n }),\n services: [Database.Service, AiService.AiService],\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAQnB,IAAMC,kBAAkBC,UAAUC,KAAK;EAC5CC,MAAM;IACJC,KAAK;IACLC,MAAM;IACNC,aAAa;EACf;EACAC,OAAcC,cAAO;IACnBC,iBAAwBC,gBAAgBC,aAAM,EAAEC,YAAY;MAC1DN,aAAa;IACf,CAAA;IACAO,eAAsBH,gBAAgBI,aAAM,EAAEF,YAAY;MACxDN,aAAa;IACf,CAAA;EACF,CAAA;EACAS,QAAeP,cAAO;IACpBQ,IAAWL,cAAOC,YAAY;MAC5BN,aAAa;IACf,CAAA;IACAW,aAAoBH,cAAOF,YAAY;MACrCN,aAAa;IACf,CAAA;IACAY,MAAaP,cAAOC,YAAY;MAC9BN,aAAa;IACf,CAAA;EACF,CAAA;EACAa,UAAU;IAACC,SAASC;IAASC,UAAUA;;AACzC,CAAA;",
|
|
6
|
+
"names": ["Schema", "AiService", "Database", "Operation", "GenerateSummary", "Operation", "make", "meta", "key", "name", "description", "input", "Struct", "previousSummary", "optional", "String", "annotations", "lookbackHours", "Number", "output", "id", "objectCount", "date", "services", "Database", "Service", "AiService"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GenerateSummary
|
|
3
|
+
} from "./chunk-UYXGTD3T.mjs";
|
|
4
|
+
|
|
5
|
+
// src/blueprints/functions/generate.ts
|
|
6
|
+
import * as LanguageModel from "@effect/ai/LanguageModel";
|
|
7
|
+
import * as Prompt from "@effect/ai/Prompt";
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
import * as Layer from "effect/Layer";
|
|
10
|
+
import * as Schema from "effect/Schema";
|
|
11
|
+
import { AiService, ToolExecutionService, ToolResolverService } from "@dxos/ai";
|
|
12
|
+
import { Collection, Database, Filter, Obj, Query, Ref, Type } from "@dxos/echo";
|
|
13
|
+
import { FunctionInvocationService, TracingService } from "@dxos/functions";
|
|
14
|
+
import { Operation } from "@dxos/operation";
|
|
15
|
+
import { Text } from "@dxos/schema";
|
|
16
|
+
import { CollectionModel } from "@dxos/schema";
|
|
17
|
+
import { trim } from "@dxos/util";
|
|
18
|
+
var DEFAULT_LOOKBACK_HOURS = 24;
|
|
19
|
+
var SUMMARIES_COLLECTION_NAME = "Summaries";
|
|
20
|
+
var SUMMARY_TITLE_PREFIX = "Daily Summary \u2014";
|
|
21
|
+
var SUMMARY_STRUCTURE = trim`
|
|
22
|
+
Given a list of recently modified objects,
|
|
23
|
+
generate a concise daily summary in markdown,
|
|
24
|
+
try to pull insights from the changes and the context of the changes.
|
|
25
|
+
Focus on the meaningful changes and try to avoid changes in the system objects.
|
|
26
|
+
|
|
27
|
+
Follow this exact structure:
|
|
28
|
+
|
|
29
|
+
## Highlights
|
|
30
|
+
Bullet points capturing the most significant changes or accomplishments.
|
|
31
|
+
|
|
32
|
+
## TODOs
|
|
33
|
+
List of TODOs that is inferred from the changes and the content of the changes.
|
|
34
|
+
Make it short, do not force it, only strong call to action data should be included.
|
|
35
|
+
Use - [ ] syntax for the TODOs.
|
|
36
|
+
|
|
37
|
+
Rules:
|
|
38
|
+
- Do NOT include the heading "Daily Summary" — the document already has a title.
|
|
39
|
+
- Be concise. Each bullet should be one sentence.
|
|
40
|
+
- If a previous summary is provided, note what changed since then.
|
|
41
|
+
- Try to pull actionable points from the changes and the context of the changes.
|
|
42
|
+
- Output raw markdown only, no wrapping code fences.
|
|
43
|
+
`;
|
|
44
|
+
var MarkdownDocument = Schema.Struct({
|
|
45
|
+
name: Schema.optional(Schema.String),
|
|
46
|
+
content: Ref.Ref(Text.Text)
|
|
47
|
+
}).pipe(Type.object({
|
|
48
|
+
typename: "org.dxos.type.document",
|
|
49
|
+
version: "0.1.0"
|
|
50
|
+
}));
|
|
51
|
+
var makeMarkdownDoc = ({ name, content }) => {
|
|
52
|
+
const doc = Obj.make(MarkdownDocument, {
|
|
53
|
+
name,
|
|
54
|
+
content: Ref.make(Text.make(content))
|
|
55
|
+
});
|
|
56
|
+
Obj.setParent(doc.content.target, doc);
|
|
57
|
+
return doc;
|
|
58
|
+
};
|
|
59
|
+
var generate_default = GenerateSummary.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ previousSummary, lookbackHours }) {
|
|
60
|
+
const hours = lookbackHours ?? DEFAULT_LOOKBACK_HOURS;
|
|
61
|
+
const cutoff = Date.now() - hours * 60 * 60 * 1e3;
|
|
62
|
+
const now = /* @__PURE__ */ new Date();
|
|
63
|
+
const dateLabel = now.toLocaleDateString("en-US", {
|
|
64
|
+
month: "long",
|
|
65
|
+
day: "numeric"
|
|
66
|
+
});
|
|
67
|
+
const docName = `${SUMMARY_TITLE_PREFIX} ${dateLabel}`;
|
|
68
|
+
const recentObjects = yield* Database.runQuery(Filter.updated({
|
|
69
|
+
after: cutoff
|
|
70
|
+
}));
|
|
71
|
+
const objectDescriptions = recentObjects.map((obj) => {
|
|
72
|
+
return JSON.stringify(Obj.toJSON(obj));
|
|
73
|
+
});
|
|
74
|
+
const content = yield* summarizeWithAi({
|
|
75
|
+
dateLabel,
|
|
76
|
+
objectDescriptions,
|
|
77
|
+
previousSummary,
|
|
78
|
+
hours
|
|
79
|
+
});
|
|
80
|
+
const existingDoc = yield* findExistingDaySummary(docName);
|
|
81
|
+
let doc;
|
|
82
|
+
if (existingDoc) {
|
|
83
|
+
yield* updateDocContent(existingDoc, content);
|
|
84
|
+
doc = existingDoc;
|
|
85
|
+
} else {
|
|
86
|
+
doc = makeMarkdownDoc({
|
|
87
|
+
name: docName,
|
|
88
|
+
content
|
|
89
|
+
});
|
|
90
|
+
const summariesCollection = yield* findOrCreateSummariesCollection();
|
|
91
|
+
yield* CollectionModel.add({
|
|
92
|
+
object: doc,
|
|
93
|
+
target: summariesCollection
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
id: Obj.getDXN(doc).toString(),
|
|
98
|
+
objectCount: recentObjects.length,
|
|
99
|
+
date: dateLabel
|
|
100
|
+
};
|
|
101
|
+
}, Effect.provide(Layer.mergeAll(AiService.model("@anthropic/claude-haiku-4-5"), ToolResolverService.layerEmpty, ToolExecutionService.layerEmpty, TracingService.layerNoop, FunctionInvocationService.layerNotAvailable)))));
|
|
102
|
+
var summarizeWithAi = Effect.fn(function* ({ dateLabel, objectDescriptions, previousSummary, hours }) {
|
|
103
|
+
const userContent = [
|
|
104
|
+
`Date: ${dateLabel}`,
|
|
105
|
+
`Time window: last ${hours} hours`,
|
|
106
|
+
`Total objects modified: ${objectDescriptions.length}`,
|
|
107
|
+
"",
|
|
108
|
+
"Modified objects:",
|
|
109
|
+
...objectDescriptions,
|
|
110
|
+
...previousSummary ? [
|
|
111
|
+
"",
|
|
112
|
+
"Previous summary for context:",
|
|
113
|
+
previousSummary
|
|
114
|
+
] : []
|
|
115
|
+
].join("\n");
|
|
116
|
+
const { text } = yield* LanguageModel.generateText({
|
|
117
|
+
prompt: Prompt.fromMessages([
|
|
118
|
+
Prompt.systemMessage({
|
|
119
|
+
content: SUMMARY_STRUCTURE
|
|
120
|
+
}),
|
|
121
|
+
Prompt.userMessage({
|
|
122
|
+
content: [
|
|
123
|
+
Prompt.makePart("text", {
|
|
124
|
+
text: userContent
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
})
|
|
128
|
+
])
|
|
129
|
+
});
|
|
130
|
+
return text;
|
|
131
|
+
});
|
|
132
|
+
var findExistingDaySummary = Effect.fn(function* (docName) {
|
|
133
|
+
const docs = yield* Database.runQuery(Query.type(MarkdownDocument, {
|
|
134
|
+
name: docName
|
|
135
|
+
}));
|
|
136
|
+
return docs.length > 0 ? docs[0] : null;
|
|
137
|
+
});
|
|
138
|
+
var updateDocContent = Effect.fn(function* (doc, newContent) {
|
|
139
|
+
const textRef = doc.content;
|
|
140
|
+
if (Ref.isRef(textRef)) {
|
|
141
|
+
const text = yield* Effect.promise(() => textRef.load());
|
|
142
|
+
if (text) {
|
|
143
|
+
Obj.change(text, (mutable) => {
|
|
144
|
+
mutable.content = newContent;
|
|
145
|
+
});
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
Obj.change(doc, (mutable) => {
|
|
150
|
+
mutable.content = Ref.make(Text.make(newContent));
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
var findOrCreateSummariesCollection = Effect.fn(function* () {
|
|
154
|
+
const collections = yield* Database.runQuery(Query.type(Collection.Collection, {
|
|
155
|
+
name: SUMMARIES_COLLECTION_NAME
|
|
156
|
+
}));
|
|
157
|
+
if (collections.length > 0) {
|
|
158
|
+
return collections[0];
|
|
159
|
+
}
|
|
160
|
+
const collection = Collection.make({
|
|
161
|
+
name: SUMMARIES_COLLECTION_NAME
|
|
162
|
+
});
|
|
163
|
+
yield* CollectionModel.add({
|
|
164
|
+
object: collection
|
|
165
|
+
});
|
|
166
|
+
return collection;
|
|
167
|
+
});
|
|
168
|
+
export {
|
|
169
|
+
SUMMARY_STRUCTURE,
|
|
170
|
+
generate_default as default
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=generate-FSSCIHAO.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/functions/generate.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as LanguageModel from '@effect/ai/LanguageModel';\nimport * as Prompt from '@effect/ai/Prompt';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\nimport * as Schema from 'effect/Schema';\n\nimport { AiService, ToolExecutionService, ToolResolverService } from '@dxos/ai';\nimport { Collection, Database, Filter, Obj, Query, Ref, Type } from '@dxos/echo';\nimport { FunctionInvocationService, TracingService } from '@dxos/functions';\nimport { Operation } from '@dxos/operation';\nimport { Text } from '@dxos/schema';\nimport { CollectionModel } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { GenerateSummary } from './definitions';\n\nconst DEFAULT_LOOKBACK_HOURS = 24;\nconst SUMMARIES_COLLECTION_NAME = 'Summaries';\nconst SUMMARY_TITLE_PREFIX = 'Daily Summary —';\n\n/**\n * Predefined structure for the AI-generated daily summary.\n * Used as the system prompt for the summarization model.\n */\nexport const SUMMARY_STRUCTURE = trim`\n Given a list of recently modified objects,\n generate a concise daily summary in markdown, \n try to pull insights from the changes and the context of the changes.\n Focus on the meaningful changes and try to avoid changes in the system objects.\n\n Follow this exact structure:\n\n ## Highlights\n Bullet points capturing the most significant changes or accomplishments.\n\n ## TODOs\n List of TODOs that is inferred from the changes and the content of the changes.\n Make it short, do not force it, only strong call to action data should be included.\n Use - [ ] syntax for the TODOs.\n\n Rules:\n - Do NOT include the heading \"Daily Summary\" — the document already has a title.\n - Be concise. Each bullet should be one sentence.\n - If a previous summary is provided, note what changed since then.\n - Try to pull actionable points from the changes and the context of the changes.\n - Output raw markdown only, no wrapping code fences.\n`;\n\nconst MarkdownDocument = Schema.Struct({\n name: Schema.optional(Schema.String),\n content: Ref.Ref(Text.Text),\n}).pipe(Type.object({ typename: 'org.dxos.type.document', version: '0.1.0' }));\n\ntype MarkdownDoc = Schema.Schema.Type<typeof MarkdownDocument>;\n\nconst makeMarkdownDoc = ({ name, content }: { name: string; content: string }) => {\n const doc = Obj.make(MarkdownDocument, { name, content: Ref.make(Text.make(content)) });\n Obj.setParent(doc.content.target!, doc);\n return doc;\n};\n\nexport default GenerateSummary.pipe(\n Operation.withHandler(\n Effect.fnUntraced(\n function* ({ previousSummary, lookbackHours }) {\n const hours = lookbackHours ?? DEFAULT_LOOKBACK_HOURS;\n const cutoff = Date.now() - hours * 60 * 60 * 1000;\n const now = new Date();\n const dateLabel = now.toLocaleDateString('en-US', { month: 'long', day: 'numeric' });\n const docName = `${SUMMARY_TITLE_PREFIX} ${dateLabel}`;\n\n const recentObjects = yield* Database.runQuery(Filter.updated({ after: cutoff }));\n\n const objectDescriptions = recentObjects.map((obj) => {\n return JSON.stringify(Obj.toJSON(obj));\n });\n\n const content = yield* summarizeWithAi({\n dateLabel,\n objectDescriptions,\n previousSummary,\n hours,\n });\n\n const existingDoc = yield* findExistingDaySummary(docName);\n\n let doc;\n if (existingDoc) {\n yield* updateDocContent(existingDoc, content);\n doc = existingDoc;\n } else {\n doc = makeMarkdownDoc({ name: docName, content });\n const summariesCollection = yield* findOrCreateSummariesCollection();\n yield* CollectionModel.add({ object: doc, target: summariesCollection });\n }\n\n return {\n id: Obj.getDXN(doc).toString(),\n objectCount: recentObjects.length,\n date: dateLabel,\n };\n },\n Effect.provide(\n Layer.mergeAll(\n AiService.model('@anthropic/claude-haiku-4-5'),\n ToolResolverService.layerEmpty,\n ToolExecutionService.layerEmpty,\n TracingService.layerNoop,\n FunctionInvocationService.layerNotAvailable,\n ),\n ),\n ),\n ),\n);\n\nconst summarizeWithAi = Effect.fn(function* ({\n dateLabel,\n objectDescriptions,\n previousSummary,\n hours,\n}: {\n dateLabel: string;\n objectDescriptions: string[];\n previousSummary?: string;\n hours: number;\n}) {\n const userContent = [\n `Date: ${dateLabel}`,\n `Time window: last ${hours} hours`,\n `Total objects modified: ${objectDescriptions.length}`,\n '',\n 'Modified objects:',\n ...objectDescriptions,\n ...(previousSummary ? ['', 'Previous summary for context:', previousSummary] : []),\n ].join('\\n');\n\n const { text } = yield* LanguageModel.generateText({\n prompt: Prompt.fromMessages([\n Prompt.systemMessage({ content: SUMMARY_STRUCTURE }),\n Prompt.userMessage({ content: [Prompt.makePart('text', { text: userContent })] }),\n ]),\n });\n\n return text;\n});\n\nconst findExistingDaySummary = Effect.fn(function* (docName: string) {\n const docs = yield* Database.runQuery(Query.type(MarkdownDocument, { name: docName }));\n return docs.length > 0 ? docs[0] : null;\n});\n\nconst updateDocContent = Effect.fn(function* (doc: MarkdownDoc, newContent: string) {\n const textRef = doc.content;\n if (Ref.isRef(textRef)) {\n const text: Text.Text | undefined = yield* Effect.promise(() => textRef.load());\n if (text) {\n Obj.change(text, (mutable) => {\n mutable.content = newContent;\n });\n return;\n }\n }\n Obj.change(doc, (mutable) => {\n mutable.content = Ref.make(Text.make(newContent));\n });\n});\n\nconst findOrCreateSummariesCollection = Effect.fn(function* () {\n const collections = yield* Database.runQuery(Query.type(Collection.Collection, { name: SUMMARIES_COLLECTION_NAME }));\n\n if (collections.length > 0) {\n return collections[0];\n }\n\n const collection = Collection.make({ name: SUMMARIES_COLLECTION_NAME });\n yield* CollectionModel.add({ object: collection });\n return collection;\n});\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["LanguageModel", "Prompt", "Effect", "Layer", "Schema", "AiService", "ToolExecutionService", "ToolResolverService", "Collection", "Database", "Filter", "Obj", "Query", "Ref", "Type", "FunctionInvocationService", "TracingService", "Operation", "Text", "CollectionModel", "trim", "DEFAULT_LOOKBACK_HOURS", "SUMMARIES_COLLECTION_NAME", "SUMMARY_TITLE_PREFIX", "SUMMARY_STRUCTURE", "trim", "MarkdownDocument", "Struct", "name", "optional", "String", "content", "Ref", "Text", "pipe", "Type", "object", "typename", "version", "makeMarkdownDoc", "doc", "Obj", "make", "setParent", "target", "GenerateSummary", "Operation", "withHandler", "fnUntraced", "previousSummary", "lookbackHours", "hours", "cutoff", "Date", "now", "dateLabel", "toLocaleDateString", "month", "day", "docName", "recentObjects", "Database", "runQuery", "Filter", "updated", "after", "objectDescriptions", "map", "obj", "JSON", "stringify", "toJSON", "summarizeWithAi", "existingDoc", "findExistingDaySummary", "updateDocContent", "summariesCollection", "findOrCreateSummariesCollection", "CollectionModel", "add", "id", "getDXN", "toString", "objectCount", "length", "date", "provide", "mergeAll", "AiService", "model", "ToolResolverService", "layerEmpty", "ToolExecutionService", "TracingService", "layerNoop", "FunctionInvocationService", "layerNotAvailable", "fn", "userContent", "join", "text", "generateText", "prompt", "fromMessages", "systemMessage", "userMessage", "makePart", "docs", "Query", "type", "newContent", "textRef", "isRef", "promise", "load", "change", "mutable", "collections", "Collection", "collection"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-2TNDFGQB.mjs";
|
|
4
|
+
|
|
5
|
+
// src/DailySummaryPlugin.tsx
|
|
6
|
+
import { Plugin } from "@dxos/app-framework";
|
|
7
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
8
|
+
|
|
9
|
+
// src/capabilities/app-graph-builder/index.ts
|
|
10
|
+
import { Capability } from "@dxos/app-framework";
|
|
11
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./app-graph-builder-RHJEYETQ.mjs"));
|
|
12
|
+
|
|
13
|
+
// src/capabilities/blueprint-definition/index.ts
|
|
14
|
+
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
15
|
+
var BlueprintDefinition = Capability2.lazy("BlueprintDefinition", () => import("./blueprint-definition-XOEDPUVU.mjs"));
|
|
16
|
+
|
|
17
|
+
// src/capabilities/react-surface/index.ts
|
|
18
|
+
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
19
|
+
var ReactSurface = Capability3.lazy("ReactSurface", () => import("./react-surface-WCGJVZCQ.mjs"));
|
|
20
|
+
|
|
21
|
+
// src/translations.ts
|
|
22
|
+
var translations = [
|
|
23
|
+
{
|
|
24
|
+
"en-US": {
|
|
25
|
+
[meta.id]: {
|
|
26
|
+
"plugin name": "Daily Summary",
|
|
27
|
+
"create trigger label": "Create daily summary trigger",
|
|
28
|
+
"create trigger description": "Create a timer trigger that generates an AI-powered daily summary. After creation, edit the schedule in the Automation panel."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
// src/DailySummaryPlugin.tsx
|
|
35
|
+
var DailySummaryPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
36
|
+
activate: AppGraphBuilder
|
|
37
|
+
}), AppPlugin.addBlueprintDefinitionModule({
|
|
38
|
+
activate: BlueprintDefinition
|
|
39
|
+
}), AppPlugin.addSurfaceModule({
|
|
40
|
+
activate: ReactSurface
|
|
41
|
+
}), AppPlugin.addTranslationsModule({
|
|
42
|
+
translations
|
|
43
|
+
}), Plugin.make);
|
|
44
|
+
export {
|
|
45
|
+
DailySummaryPlugin,
|
|
46
|
+
meta
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/DailySummaryPlugin.tsx", "../../../src/capabilities/app-graph-builder/index.ts", "../../../src/capabilities/blueprint-definition/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, BlueprintDefinition, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\n\nexport const DailySummaryPlugin = Plugin.define(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.make,\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Daily Summary',\n 'create trigger label': 'Create daily summary trigger',\n 'create trigger description':\n 'Create a timer trigger that generates an AI-powered daily summary. After creation, edit the schedule in the Automation panel.',\n },\n },\n },\n] as const satisfies Resource[];\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;;;ACD1B,SAASC,kBAAkB;AAEpB,IAAMC,kBAAkBC,WAAWC,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;;;ACF/E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,sBAAsBC,YAAWC,KAAK,uBAAuB,MAAM,OAAO,qCAAA,CAAA;;;ACFvF,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACElE,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,wBAAwB;QACxB,8BACE;MACJ;IACF;EACF;;;;AJPK,IAAMC,qBAAqBC,OAAOC,OAAOC,IAAAA,EAAMC,KACpDC,UAAUC,kBAAkB;EAAEC,UAAUC;AAAgB,CAAA,GACxDH,UAAUI,6BAA6B;EAAEF,UAAUG;AAAoB,CAAA,GACvEL,UAAUM,iBAAiB;EAAEJ,UAAUK;AAAa,CAAA,GACpDP,UAAUQ,sBAAsB;EAAEC;AAAa,CAAA,GAC/Cb,OAAOc,IAAI;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "Capability", "AppGraphBuilder", "Capability", "lazy", "Capability", "BlueprintDefinition", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "translations", "meta", "id", "DailySummaryPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addBlueprintDefinitionModule", "BlueprintDefinition", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/meta.ts":{"bytes":1984,"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytes":4729,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/app-graph-builder/index.ts":{"bytes":959,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/app-graph-builder/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"}],"format":"esm"},"src/blueprints/functions/definitions.ts":{"bytes":5226,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"format":"esm"},"src/blueprints/functions/generate.ts":{"bytes":21177,"imports":[{"path":"@effect/ai/LanguageModel","kind":"import-statement","external":true},{"path":"@effect/ai/Prompt","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"}],"format":"esm"},"src/blueprints/functions/index.ts":{"bytes":1043,"imports":[{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"./definitions"},{"path":"src/blueprints/functions/generate.ts","kind":"dynamic-import","original":"./generate"}],"format":"esm"},"src/blueprints/daily-summary-blueprint.ts":{"bytes":3684,"imports":[{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"src/blueprints/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/blueprints/index.ts":{"bytes":833,"imports":[{"path":"src/blueprints/daily-summary-blueprint.ts","kind":"import-statement","original":"./daily-summary-blueprint"},{"path":"src/blueprints/functions/index.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"src/capabilities/blueprint-definition/blueprint-definition.ts":{"bytes":2034,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/blueprints/index.ts","kind":"import-statement","original":"../../blueprints"}],"format":"esm"},"src/capabilities/blueprint-definition/index.ts":{"bytes":993,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/blueprint-definition/blueprint-definition.ts","kind":"dynamic-import","original":"./blueprint-definition"}],"format":"esm"},"src/containers/DailySummarySettings/DailySummarySettings.tsx":{"bytes":7225,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"src/blueprints/functions/definitions.ts","kind":"import-statement","original":"../../blueprints/functions/definitions"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/containers/DailySummarySettings/index.ts":{"bytes":752,"imports":[{"path":"src/containers/DailySummarySettings/DailySummarySettings.tsx","kind":"import-statement","original":"./DailySummarySettings"}],"format":"esm"},"src/containers/index.ts":{"bytes":861,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/containers/DailySummarySettings/index.ts","kind":"dynamic-import","original":"./DailySummarySettings"}],"format":"esm"},"src/capabilities/react-surface/react-surface.tsx":{"bytes":3667,"imports":[{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"src/containers/index.ts","kind":"import-statement","original":"../../containers"},{"path":"src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"src/capabilities/react-surface/index.ts":{"bytes":925,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"src/capabilities/react-surface/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"src/capabilities/index.ts":{"bytes":731,"imports":[{"path":"src/capabilities/app-graph-builder/index.ts","kind":"import-statement","original":"./app-graph-builder"},{"path":"src/capabilities/blueprint-definition/index.ts","kind":"import-statement","original":"./blueprint-definition"},{"path":"src/capabilities/react-surface/index.ts","kind":"import-statement","original":"./react-surface"}],"format":"esm"},"src/translations.ts":{"bytes":1753,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"src/DailySummaryPlugin.tsx":{"bytes":2677,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"},"src/index.ts":{"bytes":710,"imports":[{"path":"src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"src/DailySummaryPlugin.tsx","kind":"import-statement","original":"./DailySummaryPlugin"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3221},"dist/lib/browser/index.mjs":{"imports":[{"path":"dist/lib/browser/chunk-2TNDFGQB.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/app-graph-builder-RHJEYETQ.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/blueprint-definition-XOEDPUVU.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"dist/lib/browser/react-surface-WCGJVZCQ.mjs","kind":"dynamic-import"}],"exports":["DailySummaryPlugin","meta"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0},"src/DailySummaryPlugin.tsx":{"bytesInOutput":407},"src/capabilities/app-graph-builder/index.ts":{"bytesInOutput":158},"src/capabilities/index.ts":{"bytesInOutput":0},"src/capabilities/blueprint-definition/index.ts":{"bytesInOutput":185},"src/capabilities/react-surface/index.ts":{"bytesInOutput":164},"src/translations.ts":{"bytesInOutput":350}},"bytes":1616},"dist/lib/browser/app-graph-builder-RHJEYETQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2297},"dist/lib/browser/app-graph-builder-RHJEYETQ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-2TNDFGQB.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/capabilities/app-graph-builder/app-graph-builder.ts","inputs":{"src/capabilities/app-graph-builder/app-graph-builder.ts":{"bytesInOutput":1085}},"bytes":1299},"dist/lib/browser/generate-FSSCIHAO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":11083},"dist/lib/browser/generate-FSSCIHAO.mjs":{"imports":[{"path":"dist/lib/browser/chunk-UYXGTD3T.mjs","kind":"import-statement"},{"path":"@effect/ai/LanguageModel","kind":"import-statement","external":true},{"path":"@effect/ai/Prompt","kind":"import-statement","external":true},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"effect/Layer","kind":"import-statement","external":true},{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["SUMMARY_STRUCTURE","default"],"entryPoint":"src/blueprints/functions/generate.ts","inputs":{"src/blueprints/functions/generate.ts":{"bytesInOutput":5454}},"bytes":5663},"dist/lib/browser/blueprint-definition-XOEDPUVU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3174},"dist/lib/browser/blueprint-definition-XOEDPUVU.mjs":{"imports":[{"path":"dist/lib/browser/chunk-UYXGTD3T.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-toolkit","kind":"import-statement","external":true},{"path":"@dxos/blueprints","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"dist/lib/browser/generate-FSSCIHAO.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/capabilities/blueprint-definition/blueprint-definition.ts","inputs":{"src/capabilities/blueprint-definition/blueprint-definition.ts":{"bytesInOutput":371},"src/blueprints/daily-summary-blueprint.ts":{"bytesInOutput":847},"src/blueprints/functions/index.ts":{"bytesInOutput":149},"src/blueprints/index.ts":{"bytesInOutput":0}},"bytes":1800},"dist/lib/browser/DailySummarySettings-RF6P6R5M.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4075},"dist/lib/browser/DailySummarySettings-RF6P6R5M.mjs":{"imports":[{"path":"dist/lib/browser/chunk-UYXGTD3T.mjs","kind":"import-statement"},{"path":"dist/lib/browser/chunk-2TNDFGQB.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"src/containers/DailySummarySettings/index.ts","inputs":{"src/containers/DailySummarySettings/DailySummarySettings.tsx":{"bytesInOutput":1731},"src/containers/DailySummarySettings/index.ts":{"bytesInOutput":57}},"bytes":2120},"dist/lib/browser/chunk-UYXGTD3T.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2516},"dist/lib/browser/chunk-UYXGTD3T.mjs":{"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/ai","kind":"import-statement","external":true},{"path":"@dxos/echo","kind":"import-statement","external":true},{"path":"@dxos/operation","kind":"import-statement","external":true}],"exports":["GenerateSummary"],"inputs":{"src/blueprints/functions/definitions.ts":{"bytesInOutput":1199}},"bytes":1317},"dist/lib/browser/react-surface-WCGJVZCQ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2168},"dist/lib/browser/react-surface-WCGJVZCQ.mjs":{"imports":[{"path":"dist/lib/browser/chunk-2TNDFGQB.mjs","kind":"import-statement"},{"path":"effect/Effect","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-framework/ui","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"dist/lib/browser/DailySummarySettings-RF6P6R5M.mjs","kind":"dynamic-import"}],"exports":["default"],"entryPoint":"src/capabilities/react-surface/react-surface.tsx","inputs":{"src/capabilities/react-surface/react-surface.tsx":{"bytesInOutput":755},"src/containers/index.ts":{"bytesInOutput":116}},"bytes":1151},"dist/lib/browser/chunk-2TNDFGQB.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":940},"dist/lib/browser/chunk-2TNDFGQB.mjs":{"imports":[{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["meta"],"inputs":{"src/meta.ts":{"bytesInOutput":488}},"bytes":567}}}
|