@parall/cli 1.59.0 → 1.60.0
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/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +7 -5
- package/dist/lib/wiki-index.d.ts +67 -0
- package/dist/lib/wiki-index.d.ts.map +1 -0
- package/dist/lib/wiki-index.js +758 -0
- package/dist/lib/wiki-merge.d.ts +113 -6
- package/dist/lib/wiki-merge.d.ts.map +1 -1
- package/dist/lib/wiki-merge.js +236 -31
- package/dist/lib/wiki-propose.d.ts +43 -0
- package/dist/lib/wiki-propose.d.ts.map +1 -0
- package/dist/lib/wiki-propose.js +335 -0
- package/dist/lib/wiki-shared.d.ts +291 -0
- package/dist/lib/wiki-shared.d.ts.map +1 -0
- package/dist/lib/wiki-shared.js +407 -0
- package/dist/lib/wiki-sync.d.ts +109 -0
- package/dist/lib/wiki-sync.d.ts.map +1 -0
- package/dist/lib/wiki-sync.js +637 -0
- package/dist/lib/wiki-workspace.d.ts +58 -0
- package/dist/lib/wiki-workspace.d.ts.map +1 -0
- package/dist/lib/wiki-workspace.js +255 -0
- package/dist/lib/wiki.d.ts +6 -312
- package/dist/lib/wiki.d.ts.map +1 -1
- package/dist/lib/wiki.js +53 -2208
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBzC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGxD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,GAAE,IAAiB,GACrB,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,OAAO,CAAC,CAe/C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,CAiBzD;AAKD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4G5D"}
|
package/dist/commands/watch.js
CHANGED
|
@@ -8,8 +8,10 @@ import { printError, printJson } from '../lib/output.js';
|
|
|
8
8
|
// and a temporary flip: `<value> until <time>` receives <value> until then
|
|
9
9
|
// and goes back to the other value. `--catch-up` on `mentions until` asks
|
|
10
10
|
// for one wake when the mute lapses with unread activity.
|
|
11
|
-
// Targets: a chat (cht_)
|
|
12
|
-
//
|
|
11
|
+
// Targets: a chat (cht_), a thread root (msg_) or an external IM
|
|
12
|
+
// conversation root (chv_ — a Slack/Feishu group the agent's bound channel
|
|
13
|
+
// sees; thread rows inherit). Threads are watched on first use; chats need
|
|
14
|
+
// membership; a DM with a person (in-app or external) has no setting.
|
|
13
15
|
// Tasks carry no setting: `parall watch <task>` / `parall unwatch <task>`.
|
|
14
16
|
// A temporary setting needs the runtime contract — older runtimes get 422
|
|
15
17
|
// RUNTIME_CONTRACT_REQUIRED.
|
|
@@ -88,7 +90,7 @@ export function registerWatchCommands(program) {
|
|
|
88
90
|
return;
|
|
89
91
|
}
|
|
90
92
|
if (!id.startsWith('msg_')) {
|
|
91
|
-
throw new Error('watch takes a thread root (msg_) or a task (tsk_); for a chat use `parall watch set <
|
|
93
|
+
throw new Error('watch takes a thread root (msg_) or a task (tsk_); for a chat or external conversation use `parall watch set <target> all|mentions`');
|
|
92
94
|
}
|
|
93
95
|
const body = { target_uri: uri, level: 'all' };
|
|
94
96
|
if (opts.until)
|
|
@@ -113,8 +115,8 @@ export function registerWatchCommands(program) {
|
|
|
113
115
|
});
|
|
114
116
|
watch
|
|
115
117
|
.command('set')
|
|
116
|
-
.description('Set what you receive on a chat or
|
|
117
|
-
.argument('<target>', 'prll:// URI (cht_
|
|
118
|
+
.description('Set what you receive on a chat, thread root or external conversation: all | mentions [until <time>]')
|
|
119
|
+
.argument('<target>', 'prll:// URI: chat (cht_), thread root (msg_) or external conversation (chv_)')
|
|
118
120
|
.argument('<value...>', 'all | mentions [until tomorrow|2h|RFC3339]')
|
|
119
121
|
.option('--catch-up', 'with `mentions until`: one wake when the mute lapses with unread activity')
|
|
120
122
|
.action(async (target, value, opts) => {
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type MarkdownFile, type ParallContext, type ReadableWiki, type WikiContentSource, type WikiNodeSection, type WikiQueryDocument, type WikiQuerySectionResult, type WikiSearchResult } from './wiki-shared.js';
|
|
2
|
+
type CachedNodeSection = WikiNodeSection & {
|
|
3
|
+
content: string;
|
|
4
|
+
};
|
|
5
|
+
type IndexedNode = {
|
|
6
|
+
section: CachedNodeSection;
|
|
7
|
+
content: string;
|
|
8
|
+
lowerPath: string;
|
|
9
|
+
lowerTitle: string;
|
|
10
|
+
lowerBody: string;
|
|
11
|
+
lowerJoined: string;
|
|
12
|
+
termFreq: Map<string, number>;
|
|
13
|
+
docLen: number;
|
|
14
|
+
};
|
|
15
|
+
type MarkdownFileDescriptor = {
|
|
16
|
+
path: string;
|
|
17
|
+
size: number;
|
|
18
|
+
mtime_ms: number;
|
|
19
|
+
};
|
|
20
|
+
type LocalNodeSectionFileArtifact = MarkdownFileDescriptor & {
|
|
21
|
+
nodes: CachedNodeSection[];
|
|
22
|
+
};
|
|
23
|
+
type LocalNodeSectionArtifact = {
|
|
24
|
+
version: number;
|
|
25
|
+
generated_at: string;
|
|
26
|
+
wiki_id: string;
|
|
27
|
+
wiki_slug: string;
|
|
28
|
+
wiki_name: string;
|
|
29
|
+
file_count: number;
|
|
30
|
+
files: LocalNodeSectionFileArtifact[];
|
|
31
|
+
};
|
|
32
|
+
type LoadedNodeSectionSet = {
|
|
33
|
+
kind: WikiContentSource;
|
|
34
|
+
generatedAt: string;
|
|
35
|
+
fileCount: number;
|
|
36
|
+
sections: CachedNodeSection[];
|
|
37
|
+
};
|
|
38
|
+
export declare function loadWikiNodeSections(ctx: ParallContext, wiki: ReadableWiki, options?: {
|
|
39
|
+
ref?: string;
|
|
40
|
+
pathPrefix?: string;
|
|
41
|
+
}): Promise<LoadedNodeSectionSet>;
|
|
42
|
+
export declare function tryLoadLocalNodeSections(ctx: ParallContext, wiki: ReadableWiki, pathPrefix?: string): Promise<LocalNodeSectionArtifact | null>;
|
|
43
|
+
export declare function findLocalNodeSection(artifact: LocalNodeSectionArtifact, nodeId: string): CachedNodeSection | undefined;
|
|
44
|
+
export declare function stripNodeSectionContent(section: CachedNodeSection): WikiNodeSection;
|
|
45
|
+
export declare function buildIndexNodes(sections: CachedNodeSection[]): IndexedNode[];
|
|
46
|
+
export declare function parseMarkdownFile(wiki: ReadableWiki, file: MarkdownFile): CachedNodeSection[];
|
|
47
|
+
export declare function scoreNodes(nodes: IndexedNode[], query: string, options: {
|
|
48
|
+
limit?: number;
|
|
49
|
+
includeContent?: boolean;
|
|
50
|
+
source: 'local_mount' | 'api';
|
|
51
|
+
}): WikiSearchResult[];
|
|
52
|
+
export declare function planWikiQuery(sections: CachedNodeSection[], query: string, options: {
|
|
53
|
+
limit?: number;
|
|
54
|
+
includeContent?: boolean;
|
|
55
|
+
source: WikiContentSource;
|
|
56
|
+
}): {
|
|
57
|
+
documents: WikiQueryDocument[];
|
|
58
|
+
sections: WikiQuerySectionResult[];
|
|
59
|
+
};
|
|
60
|
+
export declare function detectFrontMatterEnd(lines: string[]): number;
|
|
61
|
+
export declare function parseNodeId(nodeId: string): {
|
|
62
|
+
path: string;
|
|
63
|
+
kind: 'doc' | 'preface' | 'line';
|
|
64
|
+
line?: number;
|
|
65
|
+
};
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=wiki-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wiki-index.d.ts","sourceRoot":"","sources":["../../src/lib/wiki-index.ts"],"names":[],"mappings":"AAQA,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAWtB,MAAM,kBAAkB,CAAC;AAE1B,KAAK,iBAAiB,GAAG,eAAe,GAAG;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAqBF,KAAK,sBAAsB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,4BAA4B,GAAG,sBAAsB,GAAG;IAC3D,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAG9B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,4BAA4B,EAAE,CA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