dsh-working-activity 0.2.3 → 0.2.5
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 +28 -28
- package/README.i18n.yaml +6 -6
- package/README.md +122 -122
- package/README.zh.md +113 -113
- package/cordis.patch.yml +19 -19
- package/lib/client.js +7 -7
- package/lib/client.js.map +1 -1
- package/lib/types/index.d.ts +1 -18
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +11 -0
- package/lib/types/registration.d.ts +7 -0
- package/lib/types/registration.d.ts.map +1 -0
- package/lib/types/registration.js +94 -0
- package/package.json +116 -107
- package/src/client/WorkingLine.module.css +74 -74
- package/src/client/WorkingLine.tsx +37 -37
- package/src/client/activity.ts +50 -50
- package/src/client/css-modules.d.ts +6 -6
- package/src/client/index.ts +42 -42
- package/src/events.ts +45 -45
- package/src/index.ts +228 -217
- package/src/invariant.ts +69 -69
- package/src/phrases.ts +180 -180
- package/src/registration.ts +99 -0
- package/src/status.ts +501 -501
package/lib/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["css"],"sources":["../src/client/WorkingLine.tsx","../src/client/index.ts"],"sourcesContent":["// Working-line dock entry: one dim full-width row above the composer card\
|
|
1
|
+
{"version":3,"file":"client.js","names":["css"],"sources":["../src/client/WorkingLine.tsx","../src/client/index.ts"],"sourcesContent":["// Working-line dock entry: one dim full-width row above the composer card\n// showing the live working-activity snapshot — phase-colored breathing\n// marker, the host-composed status line, and the turn's tool count badge.\n// Renders for every live phase (waiting/thinking/tool) and the done summary;\n// hides while idle or before the first publish.\n//\n// The 'conversation.input.dock' SlotMap declaration lives in\n// @deepseek-ai/dsh-client-ui-conversation/client (contract/slots.ts); this\n// entry contributes into it without owning it.\nimport type { PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots'\nimport css from './WorkingLine.module.css'\n\n/** Full props of the dock entry: the input-zone runtime share (session standard kit). */\nexport type WorkingLineProps = PropsRuntime<'conversation.input.dock'>\n\n/** Tool-count badge copy (no locale seat: the line text itself is host-composed). */\nconst TOOLS_LABEL = 'tools this turn'\n\n/**\n * Working-line dock entry: reads the latest activity snapshot off the\n * conversation snapshot and renders the row, or nothing when idle/absent.\n */\nexport function WorkingLine({ useSession }: WorkingLineProps) {\n const activity = useSession(s => s.activity)\n if (activity === null || activity.phase === 'idle' || activity.line === '') return null\n return (\n <div className={css.line} data-activity-phase={activity.phase}>\n <span className={css.marker} aria-hidden=\"true\" />\n <span className={css.text}>{activity.line}</span>\n {activity.toolCount > 0 && (\n <span className={css.tools} title={`${activity.toolCount} ${TOOLS_LABEL}`}>\n {activity.toolCount}\n </span>\n )}\n </div>\n )\n}\n","/**\n * Working-activity surface plugin, browser half: the working-line entry in\n * the conversation.input.dock strip. This package's node half emits\n * `activity/status` session events; the web runtime patch narrows them into\n * the conversation snapshot's `activity` member, so this dock entry reads\n * the live frame through the standard session kit and owns no store, no\n * refresh chain, and no event listener.\n *\n * Mount contract (see the root README's \"Web UI 集成\" section): the web\n * client's client-modules host scans loader entries for `dsh.client`\n * declarations and serves this package's `./client` bundle at\n * /plugins/dsh-working-activity/client.js. The entry contributes into the\n * input dock — no official-source patch is involved.\n */\nimport type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client'\n// Type-only: pulls the ui-conversation SlotMap merge (the input.dock entry)\n// through the Client assembly boundary.\nimport type {} from '@deepseek-ai/dsh-client-ui-conversation/client'\nimport { WorkingLine } from './WorkingLine.tsx'\nimport type { ActivityPhase, ActivitySnapshot } from './activity.ts'\n\nexport { WorkingLine, type WorkingLineProps } from './WorkingLine.tsx'\nexport type { ActivityPhase, ActivitySnapshot } from './activity.ts'\n\n/** Required services for the dock registration. */\nexport const inject = ['slots']\n\n/**\n * Client plugin body: the working-line dock entry.\n * @param ctx - client root context.\n */\nexport function apply(ctx: ClientContext): void {\n ctx.slots.inject('conversation.input.dock', () => ctx.slots.register({\n name: 'conversation.input.dock',\n // The pre-slots patch used the same id in ui-conversation; entries with\n // equal order render in registration order, and goal (10) / queue (20)\n // keep their seats — this row sits between them.\n id: 'activity',\n order: 15,\n registrant: 'dsh-working-activity',\n }, WorkingLine))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,cAAc;;;;;EAMpB,SAAgB,YAAY,EAAE,cAAgC;GAC5D,MAAM,WAAW,YAAW,MAAK,EAAE,QAAQ;GAC3C,IAAI,aAAa,QAAQ,SAAS,UAAU,UAAU,SAAS,SAAS,IAAI,OAAO;GACnF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;IAAK,WAAWA,+BAAI;IAAM,uBAAqB,SAAS;IAAxD,UAAA;KACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAQ,eAAY;KAAQ,CAAA;KACjD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAO,UAAA,SAAS;KAAW,CAAA;KAC/C,SAAS,YAAY,KACpB,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAWA,+BAAI;MAAO,OAAO,GAAG,SAAS,UAAU,GAAG;MACzD,UAAA,SAAS;KACN,CAAA;IAEL;;EAET;;;;ECXA,MAAa,SAAS,CAAC,OAAO;;;;;EAM9B,SAAgB,MAAM,KAA0B;GAC9C,IAAI,MAAM,OAAO,iCAAiC,IAAI,MAAM,SAAS;IACnE,MAAM;IAIN,IAAI;IACJ,OAAO;IACP,YAAY;GACd,GAAG,WAAW,CAAC;EACjB"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* @module @deepseek-ai/dsh-working-activity
|
|
16
16
|
*/
|
|
17
17
|
import type { Context } from '@deepseek-ai/cordis';
|
|
18
|
-
import z from '@deepseek-ai/schemastery';
|
|
19
18
|
export type * from './events.js';
|
|
20
19
|
export declare const name = "working-activity";
|
|
21
20
|
/** Configurable knobs; every key has a sane default. */
|
|
@@ -41,23 +40,7 @@ export type Config = {
|
|
|
41
40
|
/** Inject the `⏵` self-narration contract into the system prompt and surface it. */
|
|
42
41
|
narrate?: boolean;
|
|
43
42
|
};
|
|
44
|
-
export declare const Config:
|
|
45
|
-
phrases: z<boolean, boolean>;
|
|
46
|
-
publish: z<boolean, boolean>;
|
|
47
|
-
tickMs: z<number, number>;
|
|
48
|
-
publishIntervalMs: z<number, number>;
|
|
49
|
-
detailLimit: z<number, number>;
|
|
50
|
-
customActions: z<import("@deepseek-ai/cosmokit").Dict<string[], string>, import("@deepseek-ai/cosmokit").Dict<string[], string>>;
|
|
51
|
-
narrate: z<boolean, boolean>;
|
|
52
|
-
}>, Schemastery.ObjectT<{
|
|
53
|
-
phrases: z<boolean, boolean>;
|
|
54
|
-
publish: z<boolean, boolean>;
|
|
55
|
-
tickMs: z<number, number>;
|
|
56
|
-
publishIntervalMs: z<number, number>;
|
|
57
|
-
detailLimit: z<number, number>;
|
|
58
|
-
customActions: z<import("@deepseek-ai/cosmokit").Dict<string[], string>, import("@deepseek-ai/cosmokit").Dict<string[], string>>;
|
|
59
|
-
narrate: z<boolean, boolean>;
|
|
60
|
-
}>>;
|
|
43
|
+
export declare const Config: Schemastery<Config>;
|
|
61
44
|
/**
|
|
62
45
|
* Wire the working-activity plugin.
|
|
63
46
|
* @param ctx - Cordis context (agent loop + session services composed).
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAalD,mBAAmB,aAAa,CAAA;AAEhC,eAAO,MAAM,IAAI,qBAAqB,CAAA;AAEtC,wDAAwD;AACxD,MAAM,MAAM,MAAM,GAAG;IACnB,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;;mCAM+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IACxC,oFAAoF;IACpF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAMD,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,MAAM,CAQrC,CAAA;AAyBF;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,MAAW,GAAG,IAAI,CA+H7D"}
|
package/lib/types/index.js
CHANGED
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import z from '@deepseek-ai/schemastery';
|
|
18
18
|
import { ActivityTracker } from './status.js';
|
|
19
|
+
import { registerActivityEventType } from './registration.js';
|
|
19
20
|
export const name = 'working-activity';
|
|
21
|
+
// Explicit annotation: the inferred z.dict output references cosmokit's
|
|
22
|
+
// Dict through a pnpm-virtual path, which is not portable in declaration
|
|
23
|
+
// emit (TS2883) when the dependency graph shifts. The global `Schemastery`
|
|
24
|
+
// interface comes from schemastery's own d.ts (declare global).
|
|
20
25
|
export const Config = z.object({
|
|
21
26
|
phrases: z.boolean().default(true),
|
|
22
27
|
publish: z.boolean().default(false),
|
|
@@ -34,6 +39,12 @@ const NARRATE_INSTRUCTION = '[状态栏] 你有一个状态栏展示给用户。
|
|
|
34
39
|
* @param config - Validated plugin config (schema defaults applied).
|
|
35
40
|
*/
|
|
36
41
|
export function apply(ctx, config = {}) {
|
|
42
|
+
// Register the event type BEFORE anything can publish or validate: the
|
|
43
|
+
// strict read paths (resume seed validation, persistence load) refuse
|
|
44
|
+
// logs with unknown non-ignorable types. Registration is unconditional —
|
|
45
|
+
// it also protects READING logs written by an earlier publish:true era
|
|
46
|
+
// in processes where publishing itself is off. See registration.ts.
|
|
47
|
+
registerActivityEventType();
|
|
37
48
|
const resolved = {
|
|
38
49
|
phrases: config.phrases ?? true,
|
|
39
50
|
publish: config.publish ?? false,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register `activity/status` as a known session-event type in every
|
|
3
|
+
* reachable dsh-session copy. Idempotent; silently skips anchors whose
|
|
4
|
+
* resolution fails.
|
|
5
|
+
*/
|
|
6
|
+
export declare function registerActivityEventType(): void;
|
|
7
|
+
//# sourceMappingURL=registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../../src/registration.ts"],"names":[],"mappings":"AA8CA;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,IAAI,CAyBhD"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime registration of the `activity/status` session-event type.
|
|
3
|
+
*
|
|
4
|
+
* dsh-session's read paths (resume seed validation, persistence load)
|
|
5
|
+
* refuse any log containing a type outside KNOWN_SESSION_EVENT_TYPES unless
|
|
6
|
+
* every such event carries the envelope's `ignorable` marker — and
|
|
7
|
+
* `session.append()` exposes no ignorable flag, so this plugin's published
|
|
8
|
+
* snapshots used to make the whole session unresumable (and broke tolerant
|
|
9
|
+
* title reads). Upstream's catalog header defers a registration surface
|
|
10
|
+
* "until such a consumer exists" — this plugin is that consumer, so it
|
|
11
|
+
* registers its own type at load.
|
|
12
|
+
*
|
|
13
|
+
* Why "every reachable copy": a runtime can load dsh-session more than
|
|
14
|
+
* once. The dsh CLI tree and a plugin profile tree resolve different
|
|
15
|
+
* physical copies (e.g. rc.5 vs rc.6 during upgrade windows), and the
|
|
16
|
+
* strict validators consult only THEIR copy's Set. Registering through the
|
|
17
|
+
* plugin's own import alone would leave the validator's copy untouched.
|
|
18
|
+
* Anchors: this module (plugin/profile tree) and the process entry point
|
|
19
|
+
* (the CLI tree the persistence backend resolves from). Each anchor covers
|
|
20
|
+
* its own tree's top-level copy, then walks one edge further — through
|
|
21
|
+
* `@deepseek-ai/dsh-session-persistence`'s own resolution — because the
|
|
22
|
+
* strict validators (persistence load / resume seed checks) consult the
|
|
23
|
+
* copy THEY resolve, a third physical copy under nested or split-tree
|
|
24
|
+
* layouts that neither anchor's top-level resolution can reach. Copies are
|
|
25
|
+
* deduped by realpath; a copy that cannot be resolved from an anchor simply
|
|
26
|
+
* is not there; registration never throws.
|
|
27
|
+
*
|
|
28
|
+
* Self-adjusting per the compat house rules: when upstream's generated
|
|
29
|
+
* catalog adopts `activity/status` (or a real registration API ships), the
|
|
30
|
+
* add() calls are no-ops and this module can be deleted.
|
|
31
|
+
* @module dsh-working-activity/registration
|
|
32
|
+
*/
|
|
33
|
+
import { realpathSync } from 'node:fs';
|
|
34
|
+
import { createRequire } from 'node:module';
|
|
35
|
+
/** The session-event type this plugin publishes. */
|
|
36
|
+
const ACTIVITY_EVENT_TYPE = 'activity/status';
|
|
37
|
+
/** The package whose own resolution chain leads to the validators' dsh-session copy. */
|
|
38
|
+
const PERSISTENCE_PACKAGE = '@deepseek-ai/dsh-session-persistence';
|
|
39
|
+
const SESSION_PACKAGE = '@deepseek-ai/dsh-session';
|
|
40
|
+
/**
|
|
41
|
+
* Register `activity/status` as a known session-event type in every
|
|
42
|
+
* reachable dsh-session copy. Idempotent; silently skips anchors whose
|
|
43
|
+
* resolution fails.
|
|
44
|
+
*/
|
|
45
|
+
export function registerActivityEventType() {
|
|
46
|
+
const anchors = [import.meta.url, process.argv[1]].filter((anchor) => typeof anchor === 'string' && anchor.length > 0);
|
|
47
|
+
/** Realpaths already registered — split trees symlink heavily, and require caches by realpath. */
|
|
48
|
+
const registered = new Set();
|
|
49
|
+
for (const anchor of anchors) {
|
|
50
|
+
let req;
|
|
51
|
+
try {
|
|
52
|
+
req = createRequire(anchor);
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
continue; // Anchor not on disk (e.g. no argv[1] under some runners) — skip.
|
|
56
|
+
}
|
|
57
|
+
registerSessionCopy(req, registered);
|
|
58
|
+
// The validator edge: persistence's load()/resume seed checks consult
|
|
59
|
+
// THEIR OWN resolved dsh-session copy — a third physical copy under
|
|
60
|
+
// nested/split-tree layouts (CLI/profile split, rc.5↔rc.6 upgrade
|
|
61
|
+
// windows, pnpm nesting) that the anchor's top-level resolution misses.
|
|
62
|
+
try {
|
|
63
|
+
const persistenceReq = createRequire(req.resolve(PERSISTENCE_PACKAGE));
|
|
64
|
+
registerSessionCopy(persistenceReq, registered);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// No persistence package reachable from this anchor — nothing more to cover.
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Register into the dsh-session copy resolved by `req`, once per realpath.
|
|
73
|
+
* @param req - require anchored at the tree (or nested package) to probe.
|
|
74
|
+
* @param registered - realpaths already handled in this registration pass.
|
|
75
|
+
*/
|
|
76
|
+
function registerSessionCopy(req, registered) {
|
|
77
|
+
try {
|
|
78
|
+
const resolved = req.resolve(SESSION_PACKAGE);
|
|
79
|
+
let key = resolved;
|
|
80
|
+
try {
|
|
81
|
+
key = realpathSync(resolved);
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Vanished between resolve and realpath — dedupe by the resolved path.
|
|
85
|
+
}
|
|
86
|
+
if (registered.has(key))
|
|
87
|
+
return;
|
|
88
|
+
registered.add(key);
|
|
89
|
+
req(resolved).KNOWN_SESSION_EVENT_TYPES?.add(ACTIVITY_EVENT_TYPE);
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
// No resolvable dsh-session copy from this anchor — nothing to register into.
|
|
93
|
+
}
|
|
94
|
+
}
|
package/package.json
CHANGED
|
@@ -1,107 +1,116 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-working-activity",
|
|
3
|
-
"description": "Live model working-status line: playful copy, running tool, turn elapsed — for TUI prompt and Web UI",
|
|
4
|
-
"version": "0.2.
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/types/index.js",
|
|
7
|
-
"types": "lib/types/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./lib/types/index.d.ts",
|
|
11
|
-
"default": "./lib/types/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./client": {
|
|
14
|
-
"types": "./lib/types/client/index.d.ts",
|
|
15
|
-
"default": "./lib/client.js"
|
|
16
|
-
},
|
|
17
|
-
"./events": {
|
|
18
|
-
"types": "./lib/types/events.d.ts",
|
|
19
|
-
"default": "./lib/types/events.js"
|
|
20
|
-
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/types/invariant.js"
|
|
24
|
-
},
|
|
25
|
-
"./status": {
|
|
26
|
-
"types": "./lib/types/status.d.ts",
|
|
27
|
-
"default": "./lib/types/status.js"
|
|
28
|
-
},
|
|
29
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
30
|
-
"./src/*": "./src/*",
|
|
31
|
-
"./package.json": "./package.json"
|
|
32
|
-
},
|
|
33
|
-
"files": [
|
|
34
|
-
"lib",
|
|
35
|
-
"src",
|
|
36
|
-
"cordis.patch.yml"
|
|
37
|
-
],
|
|
38
|
-
"engines": {
|
|
39
|
-
"node": "^22.19 || >=24"
|
|
40
|
-
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
|
|
43
|
-
"build:client": "tsdown -c tsdown.config.ts"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"@deepseek-ai/
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"@deepseek-ai/
|
|
75
|
-
"@deepseek-ai/dsh-
|
|
76
|
-
"@deepseek-ai/dsh-
|
|
77
|
-
"@deepseek-ai/dsh-
|
|
78
|
-
"@deepseek-ai/
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"@deepseek-ai/
|
|
83
|
-
"@deepseek-ai/dsh-
|
|
84
|
-
"@deepseek-ai/dsh-
|
|
85
|
-
"@deepseek-ai/dsh-
|
|
86
|
-
"@
|
|
87
|
-
"@
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"@deepseek-ai/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
"optional": true
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-working-activity",
|
|
3
|
+
"description": "Live model working-status line: playful copy, running tool, turn elapsed — for TUI prompt and Web UI",
|
|
4
|
+
"version": "0.2.5",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/types/index.js",
|
|
7
|
+
"types": "lib/types/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/types/index.d.ts",
|
|
11
|
+
"default": "./lib/types/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"types": "./lib/types/client/index.d.ts",
|
|
15
|
+
"default": "./lib/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./events": {
|
|
18
|
+
"types": "./lib/types/events.d.ts",
|
|
19
|
+
"default": "./lib/types/events.js"
|
|
20
|
+
},
|
|
21
|
+
"./invariant": {
|
|
22
|
+
"types": "./lib/types/invariant.d.ts",
|
|
23
|
+
"default": "./lib/types/invariant.js"
|
|
24
|
+
},
|
|
25
|
+
"./status": {
|
|
26
|
+
"types": "./lib/types/status.d.ts",
|
|
27
|
+
"default": "./lib/types/status.js"
|
|
28
|
+
},
|
|
29
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
30
|
+
"./src/*": "./src/*",
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"lib",
|
|
35
|
+
"src",
|
|
36
|
+
"cordis.patch.yml"
|
|
37
|
+
],
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": "^22.19 || >=24"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc -p tsconfig.json && tsc -p tsconfig.client.json",
|
|
43
|
+
"build:client": "tsdown -c tsdown.config.ts",
|
|
44
|
+
"verify:deps": "node scripts/verify-manifest-deps.mjs",
|
|
45
|
+
"prepublishOnly": "npm run verify:deps && npm run build && npm run build:client"
|
|
46
|
+
},
|
|
47
|
+
"license": "BSD-3-Clause",
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/ccch1mneyyy/working-activity.git"
|
|
51
|
+
},
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/ccch1mneyyy/working-activity/issues"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/ccch1mneyyy/working-activity#readme",
|
|
56
|
+
"dsh": {
|
|
57
|
+
"bundle": {
|
|
58
|
+
"patch": "./cordis.patch.yml"
|
|
59
|
+
},
|
|
60
|
+
"client": {
|
|
61
|
+
"platform": "web",
|
|
62
|
+
"inject": [
|
|
63
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-slots"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
71
|
+
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
72
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.6",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
75
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
76
|
+
"@deepseek-ai/dsh-session": "^0.1.0-rc.6",
|
|
77
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.6",
|
|
78
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
79
|
+
"react": "^18.2.0"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
83
|
+
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
84
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.0-rc.6",
|
|
85
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.0-rc.6",
|
|
86
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.0-rc.6",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
89
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
90
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
91
|
+
"@deepseek-ai/dsh-session": "^0.1.0-rc.6",
|
|
92
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.6",
|
|
93
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
94
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
95
|
+
"@types/node": "^22.0.0",
|
|
96
|
+
"@types/react": "~18.3.1",
|
|
97
|
+
"lightningcss": "^1.32.0",
|
|
98
|
+
"react": "^18.2.0",
|
|
99
|
+
"tsdown": "^0.22.2",
|
|
100
|
+
"typescript": "^6.0.3"
|
|
101
|
+
},
|
|
102
|
+
"peerDependenciesMeta": {
|
|
103
|
+
"@deepseek-ai/dsh-client-runtime": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"@deepseek-ai/dsh-client-ui-conversation": {
|
|
107
|
+
"optional": true
|
|
108
|
+
},
|
|
109
|
+
"@deepseek-ai/dsh-client-ui-slots": {
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
112
|
+
"react": {
|
|
113
|
+
"optional": true
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
/* Working line row: one dim line with a phase-colored breathing marker and
|
|
2
|
-
the turn's tool-count badge, sized to the composer dock inset like the
|
|
3
|
-
queue strip. Mirrors the pre-slots patch's WorkingLine visuals, re-targeted
|
|
4
|
-
at the rc.6 design tokens. */
|
|
5
|
-
|
|
6
|
-
.line {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
gap: 8px;
|
|
11
|
-
width: 100%;
|
|
12
|
-
max-width: var(--dsh-composer-card-max-width);
|
|
13
|
-
margin: 0 auto;
|
|
14
|
-
padding: 4px 16px 0;
|
|
15
|
-
font-family: var(--dsw-font-family);
|
|
16
|
-
font-size: 13px;
|
|
17
|
-
line-height: 18px;
|
|
18
|
-
color: var(--dsw-alias-label-secondary);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.marker {
|
|
22
|
-
flex: none;
|
|
23
|
-
width: 7px;
|
|
24
|
-
height: 7px;
|
|
25
|
-
border-radius: 50%;
|
|
26
|
-
background: var(--dsw-alias-label-tertiary);
|
|
27
|
-
animation: working-pulse 1.6s ease-in-out infinite;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* The model's turn is done: steady marker in the brand tone, no pulse. */
|
|
31
|
-
.line[data-activity-phase='done'] .marker {
|
|
32
|
-
background: var(--dsw-alias-state-business-primary);
|
|
33
|
-
animation: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* A tool is actually executing: brand-tone pulse. */
|
|
37
|
-
.line[data-activity-phase='tool'] .marker {
|
|
38
|
-
background: var(--dsw-alias-state-business-primary);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Waiting for the first token: muted pulse. */
|
|
42
|
-
.line[data-activity-phase='waiting'] .marker {
|
|
43
|
-
background: var(--dsw-alias-label-tertiary);
|
|
44
|
-
opacity: 0.6;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.text {
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
text-overflow: ellipsis;
|
|
50
|
-
white-space: nowrap;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.tools {
|
|
54
|
-
flex: none;
|
|
55
|
-
min-width: 18px;
|
|
56
|
-
padding: 0 5px;
|
|
57
|
-
border-radius: 9px;
|
|
58
|
-
background: var(--dsw-alias-surface-tertiary);
|
|
59
|
-
color: var(--dsw-alias-label-secondary);
|
|
60
|
-
font-size: 11px;
|
|
61
|
-
line-height: 18px;
|
|
62
|
-
text-align: center;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@keyframes working-pulse {
|
|
66
|
-
0%,
|
|
67
|
-
100% {
|
|
68
|
-
opacity: 1;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
50% {
|
|
72
|
-
opacity: 0.35;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
/* Working line row: one dim line with a phase-colored breathing marker and
|
|
2
|
+
the turn's tool-count badge, sized to the composer dock inset like the
|
|
3
|
+
queue strip. Mirrors the pre-slots patch's WorkingLine visuals, re-targeted
|
|
4
|
+
at the rc.6 design tokens. */
|
|
5
|
+
|
|
6
|
+
.line {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
gap: 8px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
max-width: var(--dsh-composer-card-max-width);
|
|
13
|
+
margin: 0 auto;
|
|
14
|
+
padding: 4px 16px 0;
|
|
15
|
+
font-family: var(--dsw-font-family);
|
|
16
|
+
font-size: 13px;
|
|
17
|
+
line-height: 18px;
|
|
18
|
+
color: var(--dsw-alias-label-secondary);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.marker {
|
|
22
|
+
flex: none;
|
|
23
|
+
width: 7px;
|
|
24
|
+
height: 7px;
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
background: var(--dsw-alias-label-tertiary);
|
|
27
|
+
animation: working-pulse 1.6s ease-in-out infinite;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* The model's turn is done: steady marker in the brand tone, no pulse. */
|
|
31
|
+
.line[data-activity-phase='done'] .marker {
|
|
32
|
+
background: var(--dsw-alias-state-business-primary);
|
|
33
|
+
animation: none;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* A tool is actually executing: brand-tone pulse. */
|
|
37
|
+
.line[data-activity-phase='tool'] .marker {
|
|
38
|
+
background: var(--dsw-alias-state-business-primary);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Waiting for the first token: muted pulse. */
|
|
42
|
+
.line[data-activity-phase='waiting'] .marker {
|
|
43
|
+
background: var(--dsw-alias-label-tertiary);
|
|
44
|
+
opacity: 0.6;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.text {
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tools {
|
|
54
|
+
flex: none;
|
|
55
|
+
min-width: 18px;
|
|
56
|
+
padding: 0 5px;
|
|
57
|
+
border-radius: 9px;
|
|
58
|
+
background: var(--dsw-alias-surface-tertiary);
|
|
59
|
+
color: var(--dsw-alias-label-secondary);
|
|
60
|
+
font-size: 11px;
|
|
61
|
+
line-height: 18px;
|
|
62
|
+
text-align: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes working-pulse {
|
|
66
|
+
0%,
|
|
67
|
+
100% {
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
50% {
|
|
72
|
+
opacity: 0.35;
|
|
73
|
+
}
|
|
74
|
+
}
|