@jacques-ai/core 0.0.7-alpha.1
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/archive/archive-store.d.ts +166 -0
- package/dist/archive/archive-store.d.ts.map +1 -0
- package/dist/archive/archive-store.js +612 -0
- package/dist/archive/archive-store.js.map +1 -0
- package/dist/archive/bulk-archive.d.ts +63 -0
- package/dist/archive/bulk-archive.d.ts.map +1 -0
- package/dist/archive/bulk-archive.js +315 -0
- package/dist/archive/bulk-archive.js.map +1 -0
- package/dist/archive/filename-utils.d.ts +39 -0
- package/dist/archive/filename-utils.d.ts.map +1 -0
- package/dist/archive/filename-utils.js +78 -0
- package/dist/archive/filename-utils.js.map +1 -0
- package/dist/archive/index.d.ts +21 -0
- package/dist/archive/index.d.ts.map +1 -0
- package/dist/archive/index.js +45 -0
- package/dist/archive/index.js.map +1 -0
- package/dist/archive/manifest-extractor.d.ts +40 -0
- package/dist/archive/manifest-extractor.d.ts.map +1 -0
- package/dist/archive/manifest-extractor.js +456 -0
- package/dist/archive/manifest-extractor.js.map +1 -0
- package/dist/archive/migration.d.ts +59 -0
- package/dist/archive/migration.d.ts.map +1 -0
- package/dist/archive/migration.js +172 -0
- package/dist/archive/migration.js.map +1 -0
- package/dist/archive/plan-cataloger.d.ts +24 -0
- package/dist/archive/plan-cataloger.d.ts.map +1 -0
- package/dist/archive/plan-cataloger.js +100 -0
- package/dist/archive/plan-cataloger.js.map +1 -0
- package/dist/archive/plan-extractor.d.ts +84 -0
- package/dist/archive/plan-extractor.d.ts.map +1 -0
- package/dist/archive/plan-extractor.js +371 -0
- package/dist/archive/plan-extractor.js.map +1 -0
- package/dist/archive/search-indexer.d.ts +50 -0
- package/dist/archive/search-indexer.d.ts.map +1 -0
- package/dist/archive/search-indexer.js +294 -0
- package/dist/archive/search-indexer.js.map +1 -0
- package/dist/archive/subagent-store.d.ts +113 -0
- package/dist/archive/subagent-store.d.ts.map +1 -0
- package/dist/archive/subagent-store.js +173 -0
- package/dist/archive/subagent-store.js.map +1 -0
- package/dist/archive/types.d.ts +236 -0
- package/dist/archive/types.d.ts.map +1 -0
- package/dist/archive/types.js +30 -0
- package/dist/archive/types.js.map +1 -0
- package/dist/branding.d.ts +9 -0
- package/dist/branding.d.ts.map +1 -0
- package/dist/branding.js +50 -0
- package/dist/branding.js.map +1 -0
- package/dist/cache/git-utils.d.ts +36 -0
- package/dist/cache/git-utils.d.ts.map +1 -0
- package/dist/cache/git-utils.js +160 -0
- package/dist/cache/git-utils.js.map +1 -0
- package/dist/cache/hidden-projects.d.ts +19 -0
- package/dist/cache/hidden-projects.d.ts.map +1 -0
- package/dist/cache/hidden-projects.js +48 -0
- package/dist/cache/hidden-projects.js.map +1 -0
- package/dist/cache/index.d.ts +15 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +20 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/metadata-extractor.d.ts +62 -0
- package/dist/cache/metadata-extractor.d.ts.map +1 -0
- package/dist/cache/metadata-extractor.js +574 -0
- package/dist/cache/metadata-extractor.js.map +1 -0
- package/dist/cache/mode-detector.d.ts +19 -0
- package/dist/cache/mode-detector.d.ts.map +1 -0
- package/dist/cache/mode-detector.js +161 -0
- package/dist/cache/mode-detector.js.map +1 -0
- package/dist/cache/persistence.d.ts +39 -0
- package/dist/cache/persistence.d.ts.map +1 -0
- package/dist/cache/persistence.js +98 -0
- package/dist/cache/persistence.js.map +1 -0
- package/dist/cache/project-discovery.d.ts +41 -0
- package/dist/cache/project-discovery.d.ts.map +1 -0
- package/dist/cache/project-discovery.js +212 -0
- package/dist/cache/project-discovery.js.map +1 -0
- package/dist/cache/session-index.d.ts +258 -0
- package/dist/cache/session-index.d.ts.map +1 -0
- package/dist/cache/session-index.js +1030 -0
- package/dist/cache/session-index.js.map +1 -0
- package/dist/cache/types.d.ts +159 -0
- package/dist/cache/types.d.ts.map +1 -0
- package/dist/cache/types.js +29 -0
- package/dist/cache/types.js.map +1 -0
- package/dist/catalog/bulk-extractor.d.ts +18 -0
- package/dist/catalog/bulk-extractor.d.ts.map +1 -0
- package/dist/catalog/bulk-extractor.js +150 -0
- package/dist/catalog/bulk-extractor.js.map +1 -0
- package/dist/catalog/extractor.d.ts +53 -0
- package/dist/catalog/extractor.d.ts.map +1 -0
- package/dist/catalog/extractor.js +522 -0
- package/dist/catalog/extractor.js.map +1 -0
- package/dist/catalog/index.d.ts +10 -0
- package/dist/catalog/index.d.ts.map +1 -0
- package/dist/catalog/index.js +11 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/catalog/types.d.ts +134 -0
- package/dist/catalog/types.d.ts.map +1 -0
- package/dist/catalog/types.js +8 -0
- package/dist/catalog/types.js.map +1 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +5 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/websocket-client.d.ts +96 -0
- package/dist/client/websocket-client.d.ts.map +1 -0
- package/dist/client/websocket-client.js +222 -0
- package/dist/client/websocket-client.js.map +1 -0
- package/dist/context/index.d.ts +13 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +26 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/indexer.d.ts +73 -0
- package/dist/context/indexer.d.ts.map +1 -0
- package/dist/context/indexer.js +233 -0
- package/dist/context/indexer.js.map +1 -0
- package/dist/context/manager.d.ts +66 -0
- package/dist/context/manager.d.ts.map +1 -0
- package/dist/context/manager.js +310 -0
- package/dist/context/manager.js.map +1 -0
- package/dist/context/types.d.ts +149 -0
- package/dist/context/types.d.ts.map +1 -0
- package/dist/context/types.js +36 -0
- package/dist/context/types.js.map +1 -0
- package/dist/handoff/catalog.d.ts +54 -0
- package/dist/handoff/catalog.d.ts.map +1 -0
- package/dist/handoff/catalog.js +121 -0
- package/dist/handoff/catalog.js.map +1 -0
- package/dist/handoff/generator.d.ts +107 -0
- package/dist/handoff/generator.d.ts.map +1 -0
- package/dist/handoff/generator.js +603 -0
- package/dist/handoff/generator.js.map +1 -0
- package/dist/handoff/index.d.ts +13 -0
- package/dist/handoff/index.d.ts.map +1 -0
- package/dist/handoff/index.js +12 -0
- package/dist/handoff/index.js.map +1 -0
- package/dist/handoff/llm-generator.d.ts +77 -0
- package/dist/handoff/llm-generator.d.ts.map +1 -0
- package/dist/handoff/llm-generator.js +513 -0
- package/dist/handoff/llm-generator.js.map +1 -0
- package/dist/handoff/prompts.d.ts +18 -0
- package/dist/handoff/prompts.d.ts.map +1 -0
- package/dist/handoff/prompts.js +22 -0
- package/dist/handoff/prompts.js.map +1 -0
- package/dist/handoff/types.d.ts +28 -0
- package/dist/handoff/types.d.ts.map +1 -0
- package/dist/handoff/types.js +7 -0
- package/dist/handoff/types.js.map +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +132 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/claude-operations.d.ts +111 -0
- package/dist/logging/claude-operations.d.ts.map +1 -0
- package/dist/logging/claude-operations.js +132 -0
- package/dist/logging/claude-operations.js.map +1 -0
- package/dist/logging/error-utils.d.ts +18 -0
- package/dist/logging/error-utils.d.ts.map +1 -0
- package/dist/logging/error-utils.js +37 -0
- package/dist/logging/error-utils.js.map +1 -0
- package/dist/logging/index.d.ts +11 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +10 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/logger.d.ts +25 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +39 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/notifications/constants.d.ts +16 -0
- package/dist/notifications/constants.d.ts.map +1 -0
- package/dist/notifications/constants.js +49 -0
- package/dist/notifications/constants.js.map +1 -0
- package/dist/notifications/index.d.ts +9 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +8 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/types.d.ts +28 -0
- package/dist/notifications/types.d.ts.map +1 -0
- package/dist/notifications/types.js +7 -0
- package/dist/notifications/types.js.map +1 -0
- package/dist/notifications/utils.d.ts +20 -0
- package/dist/notifications/utils.d.ts.map +1 -0
- package/dist/notifications/utils.js +37 -0
- package/dist/notifications/utils.js.map +1 -0
- package/dist/plan/index.d.ts +12 -0
- package/dist/plan/index.d.ts.map +1 -0
- package/dist/plan/index.js +15 -0
- package/dist/plan/index.js.map +1 -0
- package/dist/plan/plan-parser.d.ts +33 -0
- package/dist/plan/plan-parser.d.ts.map +1 -0
- package/dist/plan/plan-parser.js +189 -0
- package/dist/plan/plan-parser.js.map +1 -0
- package/dist/plan/progress-computer.d.ts +34 -0
- package/dist/plan/progress-computer.d.ts.map +1 -0
- package/dist/plan/progress-computer.js +211 -0
- package/dist/plan/progress-computer.js.map +1 -0
- package/dist/plan/progress-matcher.d.ts +34 -0
- package/dist/plan/progress-matcher.d.ts.map +1 -0
- package/dist/plan/progress-matcher.js +297 -0
- package/dist/plan/progress-matcher.js.map +1 -0
- package/dist/plan/task-extractor.d.ts +30 -0
- package/dist/plan/task-extractor.d.ts.map +1 -0
- package/dist/plan/task-extractor.js +435 -0
- package/dist/plan/task-extractor.js.map +1 -0
- package/dist/plan/types.d.ts +131 -0
- package/dist/plan/types.d.ts.map +1 -0
- package/dist/plan/types.js +8 -0
- package/dist/plan/types.js.map +1 -0
- package/dist/project/aggregator.d.ts +43 -0
- package/dist/project/aggregator.d.ts.map +1 -0
- package/dist/project/aggregator.js +218 -0
- package/dist/project/aggregator.js.map +1 -0
- package/dist/project/index.d.ts +9 -0
- package/dist/project/index.d.ts.map +1 -0
- package/dist/project/index.js +9 -0
- package/dist/project/index.js.map +1 -0
- package/dist/project/types.d.ts +65 -0
- package/dist/project/types.d.ts.map +1 -0
- package/dist/project/types.js +27 -0
- package/dist/project/types.js.map +1 -0
- package/dist/session/detector.d.ts +113 -0
- package/dist/session/detector.d.ts.map +1 -0
- package/dist/session/detector.js +333 -0
- package/dist/session/detector.js.map +1 -0
- package/dist/session/filters.d.ts +32 -0
- package/dist/session/filters.d.ts.map +1 -0
- package/dist/session/filters.js +100 -0
- package/dist/session/filters.js.map +1 -0
- package/dist/session/format-title.d.ts +16 -0
- package/dist/session/format-title.d.ts.map +1 -0
- package/dist/session/format-title.js +54 -0
- package/dist/session/format-title.js.map +1 -0
- package/dist/session/index.d.ts +16 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +10 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/parser.d.ts +264 -0
- package/dist/session/parser.d.ts.map +1 -0
- package/dist/session/parser.js +588 -0
- package/dist/session/parser.js.map +1 -0
- package/dist/session/token-estimator.d.ts +32 -0
- package/dist/session/token-estimator.d.ts.map +1 -0
- package/dist/session/token-estimator.js +139 -0
- package/dist/session/token-estimator.js.map +1 -0
- package/dist/session/transformer.d.ts +126 -0
- package/dist/session/transformer.d.ts.map +1 -0
- package/dist/session/transformer.js +158 -0
- package/dist/session/transformer.js.map +1 -0
- package/dist/setup/hooks-config.d.ts +35 -0
- package/dist/setup/hooks-config.d.ts.map +1 -0
- package/dist/setup/hooks-config.js +107 -0
- package/dist/setup/hooks-config.js.map +1 -0
- package/dist/setup/hooks-symlink.d.ts +17 -0
- package/dist/setup/hooks-symlink.d.ts.map +1 -0
- package/dist/setup/hooks-symlink.js +89 -0
- package/dist/setup/hooks-symlink.js.map +1 -0
- package/dist/setup/index.d.ts +13 -0
- package/dist/setup/index.d.ts.map +1 -0
- package/dist/setup/index.js +12 -0
- package/dist/setup/index.js.map +1 -0
- package/dist/setup/prerequisites.d.ts +11 -0
- package/dist/setup/prerequisites.d.ts.map +1 -0
- package/dist/setup/prerequisites.js +72 -0
- package/dist/setup/prerequisites.js.map +1 -0
- package/dist/setup/settings-merge.d.ts +33 -0
- package/dist/setup/settings-merge.d.ts.map +1 -0
- package/dist/setup/settings-merge.js +131 -0
- package/dist/setup/settings-merge.js.map +1 -0
- package/dist/setup/skills-install.d.ts +17 -0
- package/dist/setup/skills-install.d.ts.map +1 -0
- package/dist/setup/skills-install.js +60 -0
- package/dist/setup/skills-install.js.map +1 -0
- package/dist/setup/types.d.ts +39 -0
- package/dist/setup/types.d.ts.map +1 -0
- package/dist/setup/types.js +7 -0
- package/dist/setup/types.js.map +1 -0
- package/dist/setup/verification.d.ts +9 -0
- package/dist/setup/verification.d.ts.map +1 -0
- package/dist/setup/verification.js +91 -0
- package/dist/setup/verification.js.map +1 -0
- package/dist/shortcuts/index.d.ts +8 -0
- package/dist/shortcuts/index.d.ts.map +1 -0
- package/dist/shortcuts/index.js +6 -0
- package/dist/shortcuts/index.js.map +1 -0
- package/dist/shortcuts/key-utils.d.ts +54 -0
- package/dist/shortcuts/key-utils.d.ts.map +1 -0
- package/dist/shortcuts/key-utils.js +129 -0
- package/dist/shortcuts/key-utils.js.map +1 -0
- package/dist/shortcuts/shortcut-registry.d.ts +37 -0
- package/dist/shortcuts/shortcut-registry.d.ts.map +1 -0
- package/dist/shortcuts/shortcut-registry.js +322 -0
- package/dist/shortcuts/shortcut-registry.js.map +1 -0
- package/dist/sources/config.d.ts +91 -0
- package/dist/sources/config.d.ts.map +1 -0
- package/dist/sources/config.js +229 -0
- package/dist/sources/config.js.map +1 -0
- package/dist/sources/googledocs.d.ts +43 -0
- package/dist/sources/googledocs.d.ts.map +1 -0
- package/dist/sources/googledocs.js +298 -0
- package/dist/sources/googledocs.js.map +1 -0
- package/dist/sources/index.d.ts +14 -0
- package/dist/sources/index.d.ts.map +1 -0
- package/dist/sources/index.js +19 -0
- package/dist/sources/index.js.map +1 -0
- package/dist/sources/notion.d.ts +35 -0
- package/dist/sources/notion.d.ts.map +1 -0
- package/dist/sources/notion.js +352 -0
- package/dist/sources/notion.js.map +1 -0
- package/dist/sources/obsidian.d.ts +38 -0
- package/dist/sources/obsidian.d.ts.map +1 -0
- package/dist/sources/obsidian.js +228 -0
- package/dist/sources/obsidian.js.map +1 -0
- package/dist/sources/types.d.ts +133 -0
- package/dist/sources/types.d.ts.map +1 -0
- package/dist/sources/types.js +19 -0
- package/dist/sources/types.js.map +1 -0
- package/dist/storage/index.d.ts +6 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +5 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/writer.d.ts +86 -0
- package/dist/storage/writer.d.ts.map +1 -0
- package/dist/storage/writer.js +137 -0
- package/dist/storage/writer.js.map +1 -0
- package/dist/types.d.ts +203 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/claude-token.d.ts +49 -0
- package/dist/utils/claude-token.d.ts.map +1 -0
- package/dist/utils/claude-token.js +169 -0
- package/dist/utils/claude-token.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +13 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/settings.d.ts +100 -0
- package/dist/utils/settings.d.ts.map +1 -0
- package/dist/utils/settings.js +206 -0
- package/dist/utils/settings.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger
|
|
3
|
+
*
|
|
4
|
+
* Lightweight logger interface for core modules.
|
|
5
|
+
* Silent by default — callers opt into logging by injecting a non-silent logger.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Logger interface compatible with server's logger-factory.
|
|
9
|
+
*/
|
|
10
|
+
export interface Logger {
|
|
11
|
+
log: (...args: unknown[]) => void;
|
|
12
|
+
warn: (...args: unknown[]) => void;
|
|
13
|
+
error: (...args: unknown[]) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create a logger instance.
|
|
17
|
+
*
|
|
18
|
+
* @param options.silent - If true (default), all output is suppressed.
|
|
19
|
+
* @param options.prefix - Optional prefix prepended to all messages (e.g., "[Cache]").
|
|
20
|
+
*/
|
|
21
|
+
export declare function createLogger(options?: {
|
|
22
|
+
silent?: boolean;
|
|
23
|
+
prefix?: string;
|
|
24
|
+
}): Logger;
|
|
25
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logging/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IAClC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACnC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACrC;AASD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,CAsBT"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger
|
|
3
|
+
*
|
|
4
|
+
* Lightweight logger interface for core modules.
|
|
5
|
+
* Silent by default — callers opt into logging by injecting a non-silent logger.
|
|
6
|
+
*/
|
|
7
|
+
/** A logger that does nothing (default for all core functions). */
|
|
8
|
+
const silentLogger = {
|
|
9
|
+
log: () => { },
|
|
10
|
+
warn: () => { },
|
|
11
|
+
error: () => { },
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Create a logger instance.
|
|
15
|
+
*
|
|
16
|
+
* @param options.silent - If true (default), all output is suppressed.
|
|
17
|
+
* @param options.prefix - Optional prefix prepended to all messages (e.g., "[Cache]").
|
|
18
|
+
*/
|
|
19
|
+
export function createLogger(options) {
|
|
20
|
+
const { silent = true, prefix } = options || {};
|
|
21
|
+
if (silent) {
|
|
22
|
+
return silentLogger;
|
|
23
|
+
}
|
|
24
|
+
const formatArgs = (args) => {
|
|
25
|
+
if (prefix && args.length > 0 && typeof args[0] === "string") {
|
|
26
|
+
return [`${prefix} ${args[0]}`, ...args.slice(1)];
|
|
27
|
+
}
|
|
28
|
+
if (prefix) {
|
|
29
|
+
return [prefix, ...args];
|
|
30
|
+
}
|
|
31
|
+
return args;
|
|
32
|
+
};
|
|
33
|
+
return {
|
|
34
|
+
log: (...args) => console.log(...formatArgs(args)),
|
|
35
|
+
warn: (...args) => console.warn(...formatArgs(args)),
|
|
36
|
+
error: (...args) => console.error(...formatArgs(args)),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logging/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,mEAAmE;AACnE,MAAM,YAAY,GAAW;IAC3B,GAAG,EAAE,GAAG,EAAE,GAAE,CAAC;IACb,IAAI,EAAE,GAAG,EAAE,GAAE,CAAC;IACd,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,OAG5B;IACC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAEhD,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM,UAAU,GAAG,CAAC,IAAe,EAAa,EAAE;QAChD,IAAI,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;YAC7D,OAAO,CAAC,GAAG,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QACpD,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;KACvD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification constants for Jacques.
|
|
3
|
+
*
|
|
4
|
+
* Shared between server, GUI, and CLI.
|
|
5
|
+
*/
|
|
6
|
+
import type { NotificationCategory, NotificationSettings } from './types.js';
|
|
7
|
+
export declare const DEFAULT_NOTIFICATION_SETTINGS: NotificationSettings;
|
|
8
|
+
/** Cooldown periods per category in milliseconds */
|
|
9
|
+
export declare const NOTIFICATION_COOLDOWNS: Record<NotificationCategory, number>;
|
|
10
|
+
/** Unicode symbols per notification category */
|
|
11
|
+
export declare const CATEGORY_SYMBOLS: Record<NotificationCategory, string>;
|
|
12
|
+
/** Human-readable labels per notification category */
|
|
13
|
+
export declare const CATEGORY_LABELS: Record<NotificationCategory, string>;
|
|
14
|
+
/** Maximum number of notifications to keep in history */
|
|
15
|
+
export declare const MAX_NOTIFICATION_HISTORY = 50;
|
|
16
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/notifications/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE7E,eAAO,MAAM,6BAA6B,EAAE,oBAa3C,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAOvE,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAOjE,CAAC;AAEF,sDAAsD;AACtD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAOhE,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,wBAAwB,KAAK,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification constants for Jacques.
|
|
3
|
+
*
|
|
4
|
+
* Shared between server, GUI, and CLI.
|
|
5
|
+
*/
|
|
6
|
+
export const DEFAULT_NOTIFICATION_SETTINGS = {
|
|
7
|
+
enabled: false, // OFF by default — user must opt in
|
|
8
|
+
categories: {
|
|
9
|
+
context: true,
|
|
10
|
+
operation: false,
|
|
11
|
+
plan: true,
|
|
12
|
+
'auto-compact': true,
|
|
13
|
+
handoff: true,
|
|
14
|
+
'bug-alert': false,
|
|
15
|
+
},
|
|
16
|
+
largeOperationThreshold: 50_000,
|
|
17
|
+
contextThresholds: [50, 70], // Only 50% and 70%
|
|
18
|
+
bugAlertThreshold: 5,
|
|
19
|
+
};
|
|
20
|
+
/** Cooldown periods per category in milliseconds */
|
|
21
|
+
export const NOTIFICATION_COOLDOWNS = {
|
|
22
|
+
context: 60_000,
|
|
23
|
+
operation: 10_000,
|
|
24
|
+
plan: 30_000,
|
|
25
|
+
'auto-compact': 60_000,
|
|
26
|
+
handoff: 10_000,
|
|
27
|
+
'bug-alert': 120_000,
|
|
28
|
+
};
|
|
29
|
+
/** Unicode symbols per notification category */
|
|
30
|
+
export const CATEGORY_SYMBOLS = {
|
|
31
|
+
context: '◆',
|
|
32
|
+
operation: '⚡',
|
|
33
|
+
plan: '◇',
|
|
34
|
+
'auto-compact': '▲',
|
|
35
|
+
handoff: '✓',
|
|
36
|
+
'bug-alert': '⚠',
|
|
37
|
+
};
|
|
38
|
+
/** Human-readable labels per notification category */
|
|
39
|
+
export const CATEGORY_LABELS = {
|
|
40
|
+
context: 'Context',
|
|
41
|
+
operation: 'Operation',
|
|
42
|
+
plan: 'Plan',
|
|
43
|
+
'auto-compact': 'Compact',
|
|
44
|
+
handoff: 'Handoff',
|
|
45
|
+
'bug-alert': 'Bug Alert',
|
|
46
|
+
};
|
|
47
|
+
/** Maximum number of notifications to keep in history */
|
|
48
|
+
export const MAX_NOTIFICATION_HISTORY = 50;
|
|
49
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/notifications/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,6BAA6B,GAAyB;IACjE,OAAO,EAAE,KAAK,EAAE,oCAAoC;IACpD,UAAU,EAAE;QACV,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,KAAK;QAChB,IAAI,EAAE,IAAI;QACV,cAAc,EAAE,IAAI;QACpB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,KAAK;KACnB;IACD,uBAAuB,EAAE,MAAM;IAC/B,iBAAiB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,mBAAmB;IAChD,iBAAiB,EAAE,CAAC;CACrB,CAAC;AAEF,oDAAoD;AACpD,MAAM,CAAC,MAAM,sBAAsB,GAAyC;IAC1E,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,OAAO;CACrB,CAAC;AAEF,gDAAgD;AAChD,MAAM,CAAC,MAAM,gBAAgB,GAAyC;IACpE,OAAO,EAAE,GAAG;IACZ,SAAS,EAAE,GAAG;IACd,IAAI,EAAE,GAAG;IACT,cAAc,EAAE,GAAG;IACnB,OAAO,EAAE,GAAG;IACZ,WAAW,EAAE,GAAG;CACjB,CAAC;AAEF,sDAAsD;AACtD,MAAM,CAAC,MAAM,eAAe,GAAyC;IACnE,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,SAAS;IACzB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,WAAW;CACzB,CAAC;AAEF,yDAAyD;AACzD,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jacques-ai/core/notifications — barrel export
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for notification types, constants, and utilities.
|
|
5
|
+
*/
|
|
6
|
+
export type { NotificationCategory, NotificationPriority, NotificationItem, NotificationSettings, } from './types.js';
|
|
7
|
+
export { DEFAULT_NOTIFICATION_SETTINGS, NOTIFICATION_COOLDOWNS, CATEGORY_SYMBOLS, CATEGORY_LABELS, MAX_NOTIFICATION_HISTORY, } from './constants.js';
|
|
8
|
+
export { getContextThresholdPriority, generateNotificationId, formatNotificationAge, } from './utils.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jacques-ai/core/notifications — barrel export
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for notification types, constants, and utilities.
|
|
5
|
+
*/
|
|
6
|
+
export { DEFAULT_NOTIFICATION_SETTINGS, NOTIFICATION_COOLDOWNS, CATEGORY_SYMBOLS, CATEGORY_LABELS, MAX_NOTIFICATION_HISTORY, } from './constants.js';
|
|
7
|
+
export { getContextThresholdPriority, generateNotificationId, formatNotificationAge, } from './utils.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared notification types for Jacques.
|
|
3
|
+
*
|
|
4
|
+
* Used by server, GUI, and CLI — the single source of truth.
|
|
5
|
+
*/
|
|
6
|
+
export type NotificationCategory = 'context' | 'operation' | 'plan' | 'auto-compact' | 'handoff' | 'bug-alert';
|
|
7
|
+
export type NotificationPriority = 'low' | 'medium' | 'high' | 'critical';
|
|
8
|
+
export interface NotificationItem {
|
|
9
|
+
id: string;
|
|
10
|
+
category: NotificationCategory;
|
|
11
|
+
title: string;
|
|
12
|
+
body: string;
|
|
13
|
+
priority: NotificationPriority;
|
|
14
|
+
timestamp: number;
|
|
15
|
+
sessionId?: string;
|
|
16
|
+
/** Project name for contextual display (e.g., "my-project") */
|
|
17
|
+
projectName?: string;
|
|
18
|
+
/** Git branch name for contextual display (e.g., "feat/auth") */
|
|
19
|
+
branchName?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface NotificationSettings {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
categories: Record<NotificationCategory, boolean>;
|
|
24
|
+
largeOperationThreshold: number;
|
|
25
|
+
contextThresholds: number[];
|
|
26
|
+
bugAlertThreshold: number;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/notifications/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,cAAc,GAAG,SAAS,GAAG,WAAW,CAAC;AAC/G,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAE1E,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAClD,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/notifications/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification utility functions for Jacques.
|
|
3
|
+
*
|
|
4
|
+
* Shared between server, GUI, and CLI.
|
|
5
|
+
*/
|
|
6
|
+
import type { NotificationPriority } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Returns priority based on a context threshold level.
|
|
9
|
+
* >=70 → high, <70 → medium
|
|
10
|
+
*/
|
|
11
|
+
export declare function getContextThresholdPriority(threshold: number): NotificationPriority;
|
|
12
|
+
/**
|
|
13
|
+
* Generate a unique notification ID.
|
|
14
|
+
*/
|
|
15
|
+
export declare function generateNotificationId(category: string, key: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Format a timestamp as a human-readable age string.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatNotificationAge(timestamp: number): string;
|
|
20
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/notifications/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,oBAAoB,CAGnF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAS/D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notification utility functions for Jacques.
|
|
3
|
+
*
|
|
4
|
+
* Shared between server, GUI, and CLI.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Returns priority based on a context threshold level.
|
|
8
|
+
* >=70 → high, <70 → medium
|
|
9
|
+
*/
|
|
10
|
+
export function getContextThresholdPriority(threshold) {
|
|
11
|
+
if (threshold >= 70)
|
|
12
|
+
return 'high';
|
|
13
|
+
return 'medium';
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Generate a unique notification ID.
|
|
17
|
+
*/
|
|
18
|
+
export function generateNotificationId(category, key) {
|
|
19
|
+
return `notif-${category}-${key}-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Format a timestamp as a human-readable age string.
|
|
23
|
+
*/
|
|
24
|
+
export function formatNotificationAge(timestamp) {
|
|
25
|
+
const seconds = Math.floor((Date.now() - timestamp) / 1000);
|
|
26
|
+
if (seconds < 60)
|
|
27
|
+
return 'just now';
|
|
28
|
+
const minutes = Math.floor(seconds / 60);
|
|
29
|
+
if (minutes < 60)
|
|
30
|
+
return `${minutes}m ago`;
|
|
31
|
+
const hours = Math.floor(minutes / 60);
|
|
32
|
+
if (hours < 24)
|
|
33
|
+
return `${hours}h ago`;
|
|
34
|
+
const days = Math.floor(hours / 24);
|
|
35
|
+
return `${days}d ago`;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/notifications/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,SAAiB;IAC3D,IAAI,SAAS,IAAI,EAAE;QAAE,OAAO,MAAM,CAAC;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAgB,EAAE,GAAW;IAClE,OAAO,SAAS,QAAQ,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAC5F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,SAAiB;IACrD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;IAC5D,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,UAAU,CAAC;IACpC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACzC,IAAI,OAAO,GAAG,EAAE;QAAE,OAAO,GAAG,OAAO,OAAO,CAAC;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACvC,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,GAAG,KAAK,OAAO,CAAC;IACvC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;IACpC,OAAO,GAAG,IAAI,OAAO,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan Progress Module
|
|
3
|
+
*
|
|
4
|
+
* Track completion status of plan items by extracting task signals
|
|
5
|
+
* from JSONL transcripts and matching them to plan markdown items.
|
|
6
|
+
*/
|
|
7
|
+
export type { PlanItem, ParsedPlan, TaskSignal, PlanItemMatch, PlanItemStatus, PlanItemProgress, PlanProgressSummary, PlanProgress, PlanProgressListItem, } from "./types.js";
|
|
8
|
+
export { parsePlanMarkdown, normalizeText, extractKeywords } from "./plan-parser.js";
|
|
9
|
+
export { extractTaskSignals, getModifiedFiles } from "./task-extractor.js";
|
|
10
|
+
export { matchSignalsToPlanItems, determineItemStatus, isTrackableForProgress, } from "./progress-matcher.js";
|
|
11
|
+
export { computePlanProgress, computePlanProgressSummary, clearProgressCache, clearAllProgressCache, } from "./progress-computer.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plan/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,QAAQ,EACR,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,GACrB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGrF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG3E,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan Progress Module
|
|
3
|
+
*
|
|
4
|
+
* Track completion status of plan items by extracting task signals
|
|
5
|
+
* from JSONL transcripts and matching them to plan markdown items.
|
|
6
|
+
*/
|
|
7
|
+
// Parser
|
|
8
|
+
export { parsePlanMarkdown, normalizeText, extractKeywords } from "./plan-parser.js";
|
|
9
|
+
// Task extraction
|
|
10
|
+
export { extractTaskSignals, getModifiedFiles } from "./task-extractor.js";
|
|
11
|
+
// Matching
|
|
12
|
+
export { matchSignalsToPlanItems, determineItemStatus, isTrackableForProgress, } from "./progress-matcher.js";
|
|
13
|
+
// Progress computation
|
|
14
|
+
export { computePlanProgress, computePlanProgressSummary, clearProgressCache, clearAllProgressCache, } from "./progress-computer.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plan/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,SAAS;AACT,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAErF,kBAAkB;AAClB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE3E,WAAW;AACX,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAE/B,uBAAuB;AACvB,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan Parser
|
|
3
|
+
*
|
|
4
|
+
* Parses plan markdown into structured trackable items.
|
|
5
|
+
* Handles headings, numbered lists, bullets, and checkboxes.
|
|
6
|
+
*/
|
|
7
|
+
import type { ParsedPlan } from "./types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Parse plan markdown content into structured items.
|
|
10
|
+
*
|
|
11
|
+
* Trackable items:
|
|
12
|
+
* - Numbered items (1., 2., etc.)
|
|
13
|
+
* - Bullet items (-, *)
|
|
14
|
+
* - Checkbox items (- [ ], - [x])
|
|
15
|
+
* - Subsection headings (##, ###)
|
|
16
|
+
*
|
|
17
|
+
* Skipped:
|
|
18
|
+
* - Top-level # title
|
|
19
|
+
* - Code blocks (``` fences)
|
|
20
|
+
* - Plain paragraphs
|
|
21
|
+
* - Tables
|
|
22
|
+
*/
|
|
23
|
+
export declare function parsePlanMarkdown(content: string): ParsedPlan;
|
|
24
|
+
/**
|
|
25
|
+
* Normalize text for comparison.
|
|
26
|
+
* Lowercase, remove extra whitespace, remove punctuation.
|
|
27
|
+
*/
|
|
28
|
+
export declare function normalizeText(text: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Extract keywords from text (words > 3 chars).
|
|
31
|
+
*/
|
|
32
|
+
export declare function extractKeywords(text: string): Set<string>;
|
|
33
|
+
//# sourceMappingURL=plan-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-parser.d.ts","sourceRoot":"","sources":["../../src/plan/plan-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAY,UAAU,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CA4E7D;AA6GD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMlD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAGzD"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plan Parser
|
|
3
|
+
*
|
|
4
|
+
* Parses plan markdown into structured trackable items.
|
|
5
|
+
* Handles headings, numbered lists, bullets, and checkboxes.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Parse plan markdown content into structured items.
|
|
9
|
+
*
|
|
10
|
+
* Trackable items:
|
|
11
|
+
* - Numbered items (1., 2., etc.)
|
|
12
|
+
* - Bullet items (-, *)
|
|
13
|
+
* - Checkbox items (- [ ], - [x])
|
|
14
|
+
* - Subsection headings (##, ###)
|
|
15
|
+
*
|
|
16
|
+
* Skipped:
|
|
17
|
+
* - Top-level # title
|
|
18
|
+
* - Code blocks (``` fences)
|
|
19
|
+
* - Plain paragraphs
|
|
20
|
+
* - Tables
|
|
21
|
+
*/
|
|
22
|
+
export function parsePlanMarkdown(content) {
|
|
23
|
+
const lines = content.split("\n");
|
|
24
|
+
const items = [];
|
|
25
|
+
const lineToItem = new Map();
|
|
26
|
+
let inCodeBlock = false;
|
|
27
|
+
let itemCounter = 0;
|
|
28
|
+
const depthStack = [];
|
|
29
|
+
for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {
|
|
30
|
+
const line = lines[lineIndex];
|
|
31
|
+
const lineNumber = lineIndex + 1; // 1-indexed
|
|
32
|
+
// Track code blocks
|
|
33
|
+
if (line.trim().startsWith("```")) {
|
|
34
|
+
inCodeBlock = !inCodeBlock;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
// Skip content inside code blocks
|
|
38
|
+
if (inCodeBlock) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
// Skip empty lines
|
|
42
|
+
if (line.trim() === "") {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
// Try to parse the line as a trackable item
|
|
46
|
+
const parsed = parseLine(line, lineNumber, ++itemCounter);
|
|
47
|
+
if (!parsed) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
// Skip top-level heading (depth 0) - it's just the title
|
|
51
|
+
if (parsed.type === "heading" && parsed.depth === 0) {
|
|
52
|
+
itemCounter--; // Don't count it
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
// Determine parent based on depth
|
|
56
|
+
while (depthStack.length > 0 &&
|
|
57
|
+
depthStack[depthStack.length - 1].depth >= parsed.depth) {
|
|
58
|
+
depthStack.pop();
|
|
59
|
+
}
|
|
60
|
+
const parentId = depthStack.length > 0 ? depthStack[depthStack.length - 1].id : null;
|
|
61
|
+
parsed.parentId = parentId;
|
|
62
|
+
// Update parent's childIds
|
|
63
|
+
if (parentId) {
|
|
64
|
+
const parent = items.find((item) => item.id === parentId);
|
|
65
|
+
if (parent) {
|
|
66
|
+
parent.childIds.push(parsed.id);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Push to stack for nesting
|
|
70
|
+
depthStack.push({ id: parsed.id, depth: parsed.depth });
|
|
71
|
+
items.push(parsed);
|
|
72
|
+
lineToItem.set(lineNumber, parsed);
|
|
73
|
+
}
|
|
74
|
+
// Count trackable items (items that represent actual work, not just structure)
|
|
75
|
+
const trackableCount = items.filter((item) => isTrackableItem(item)).length;
|
|
76
|
+
return {
|
|
77
|
+
items,
|
|
78
|
+
trackableCount,
|
|
79
|
+
lineToItem,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Parse a single line into a PlanItem if it's a trackable item.
|
|
84
|
+
* Returns null if the line is not a trackable item.
|
|
85
|
+
*/
|
|
86
|
+
function parseLine(line, lineNumber, itemNumber) {
|
|
87
|
+
const trimmed = line.trim();
|
|
88
|
+
// Skip table lines
|
|
89
|
+
if (trimmed.startsWith("|") || /^[-:|]+$/.test(trimmed)) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
// Skip blockquotes
|
|
93
|
+
if (trimmed.startsWith(">")) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
// Check for heading (## or deeper)
|
|
97
|
+
const headingMatch = line.match(/^(#{1,6})\s+(.+)$/);
|
|
98
|
+
if (headingMatch) {
|
|
99
|
+
const depth = headingMatch[1].length - 1; // # = 0, ## = 1, etc.
|
|
100
|
+
const text = headingMatch[2].trim();
|
|
101
|
+
return {
|
|
102
|
+
id: `item-${itemNumber}`,
|
|
103
|
+
text,
|
|
104
|
+
depth,
|
|
105
|
+
type: "heading",
|
|
106
|
+
lineNumber,
|
|
107
|
+
parentId: null,
|
|
108
|
+
childIds: [],
|
|
109
|
+
isCheckedInSource: false,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
// Calculate indentation for list items
|
|
113
|
+
const leadingSpaces = line.match(/^(\s*)/)?.[1].length ?? 0;
|
|
114
|
+
const indentDepth = Math.floor(leadingSpaces / 2); // 2 spaces per indent level
|
|
115
|
+
// Check for checkbox (- [ ] or - [x] or * [ ] or * [x])
|
|
116
|
+
const checkboxMatch = trimmed.match(/^[-*]\s+\[([ xX])\]\s+(.+)$/);
|
|
117
|
+
if (checkboxMatch) {
|
|
118
|
+
const isChecked = checkboxMatch[1].toLowerCase() === "x";
|
|
119
|
+
const text = checkboxMatch[2].trim();
|
|
120
|
+
return {
|
|
121
|
+
id: `item-${itemNumber}`,
|
|
122
|
+
text,
|
|
123
|
+
depth: 3 + indentDepth, // Base depth 3 for list items
|
|
124
|
+
type: "checkbox",
|
|
125
|
+
lineNumber,
|
|
126
|
+
parentId: null,
|
|
127
|
+
childIds: [],
|
|
128
|
+
isCheckedInSource: isChecked,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
// Check for numbered item (1., 2., etc.)
|
|
132
|
+
const numberedMatch = trimmed.match(/^(\d+)\.\s+(.+)$/);
|
|
133
|
+
if (numberedMatch) {
|
|
134
|
+
const text = numberedMatch[2].trim();
|
|
135
|
+
return {
|
|
136
|
+
id: `item-${itemNumber}`,
|
|
137
|
+
text,
|
|
138
|
+
depth: 3 + indentDepth,
|
|
139
|
+
type: "numbered",
|
|
140
|
+
lineNumber,
|
|
141
|
+
parentId: null,
|
|
142
|
+
childIds: [],
|
|
143
|
+
isCheckedInSource: false,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
// Check for bullet item (- or *)
|
|
147
|
+
const bulletMatch = trimmed.match(/^[-*]\s+(.+)$/);
|
|
148
|
+
if (bulletMatch) {
|
|
149
|
+
const text = bulletMatch[1].trim();
|
|
150
|
+
return {
|
|
151
|
+
id: `item-${itemNumber}`,
|
|
152
|
+
text,
|
|
153
|
+
depth: 3 + indentDepth,
|
|
154
|
+
type: "bullet",
|
|
155
|
+
lineNumber,
|
|
156
|
+
parentId: null,
|
|
157
|
+
childIds: [],
|
|
158
|
+
isCheckedInSource: false,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
// Not a trackable item
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Determine if an item represents actual trackable work.
|
|
166
|
+
* Headings are structural; lists and checkboxes are trackable.
|
|
167
|
+
*/
|
|
168
|
+
function isTrackableItem(item) {
|
|
169
|
+
return item.type !== "heading";
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Normalize text for comparison.
|
|
173
|
+
* Lowercase, remove extra whitespace, remove punctuation.
|
|
174
|
+
*/
|
|
175
|
+
export function normalizeText(text) {
|
|
176
|
+
return text
|
|
177
|
+
.toLowerCase()
|
|
178
|
+
.replace(/[^\w\s]/g, " ")
|
|
179
|
+
.replace(/\s+/g, " ")
|
|
180
|
+
.trim();
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Extract keywords from text (words > 3 chars).
|
|
184
|
+
*/
|
|
185
|
+
export function extractKeywords(text) {
|
|
186
|
+
const normalized = normalizeText(text);
|
|
187
|
+
return new Set(normalized.split(" ").filter((w) => w.length > 3));
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=plan-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-parser.js","sourceRoot":"","sources":["../../src/plan/plan-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,MAAM,UAAU,GAAG,IAAI,GAAG,EAAoB,CAAC;IAE/C,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,MAAM,UAAU,GAAoC,EAAE,CAAC;IAEvD,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;QAC9D,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;QAC9B,MAAM,UAAU,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,YAAY;QAE9C,oBAAoB;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
|
3
|
+
*
|
|
4
|
+
* Orchestrates plan progress computation:
|
|
5
|
+
* 1. Parse plan markdown
|
|
6
|
+
* 2. Load linked sessions
|
|
7
|
+
* 3. Extract task signals
|
|
8
|
+
* 4. Match signals to plan items
|
|
9
|
+
* 5. Compute and cache progress
|
|
10
|
+
*/
|
|
11
|
+
import type { PlanEntry } from "../context/types.js";
|
|
12
|
+
import type { PlanProgress, PlanProgressListItem } from "./types.js";
|
|
13
|
+
/**
|
|
14
|
+
* Compute full progress for a plan.
|
|
15
|
+
*
|
|
16
|
+
* @param plan - The plan entry from the project index
|
|
17
|
+
* @param planContent - The markdown content of the plan
|
|
18
|
+
* @param cwd - The project working directory
|
|
19
|
+
*/
|
|
20
|
+
export declare function computePlanProgress(plan: PlanEntry, planContent: string, cwd: string): Promise<PlanProgress>;
|
|
21
|
+
/**
|
|
22
|
+
* Compute a lightweight progress summary for list views.
|
|
23
|
+
* Faster than full progress - only computes the percentage.
|
|
24
|
+
*/
|
|
25
|
+
export declare function computePlanProgressSummary(plan: PlanEntry, planContent: string, cwd: string): Promise<PlanProgressListItem>;
|
|
26
|
+
/**
|
|
27
|
+
* Clear the progress cache for a plan.
|
|
28
|
+
*/
|
|
29
|
+
export declare function clearProgressCache(planId: string): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Clear all progress cache.
|
|
32
|
+
*/
|
|
33
|
+
export declare function clearAllProgressCache(): Promise<void>;
|
|
34
|
+
//# sourceMappingURL=progress-computer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-computer.d.ts","sourceRoot":"","sources":["../../src/plan/progress-computer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AASrD,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EAGrB,MAAM,YAAY,CAAC;AAKpB;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,YAAY,CAAC,CAwEvB;AAED;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,oBAAoB,CAAC,CAe/B;AA+FD;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOtE;AAED;;GAEG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAM3D"}
|