pinokiod 7.2.16 → 7.2.18
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/kernel/agent_instructions.js +166 -0
- package/kernel/api/index.js +137 -12
- package/kernel/bin/huggingface.js +1 -1
- package/kernel/environment.js +23 -9
- package/kernel/plugin_sources.js +57 -4
- package/kernel/prototype.js +4 -0
- package/kernel/shell.js +2 -0
- package/kernel/watch/index.js +31 -4
- package/package.json +1 -1
- package/server/features/index.js +4 -4
- package/server/features/{drafts → notes}/index.js +9 -9
- package/server/features/{drafts → notes}/parser.js +12 -7
- package/server/features/notes/public/notes.css +955 -0
- package/server/features/notes/public/notes.js +1149 -0
- package/server/features/{drafts → notes}/registry_import.js +59 -74
- package/server/features/notes/routes.js +156 -0
- package/server/features/notes/service.js +326 -0
- package/server/features/{drafts → notes}/watcher.js +14 -16
- package/server/index.js +61 -30
- package/server/lib/content_validation.js +19 -8
- package/server/lib/workspace_catalog.js +18 -18
- package/server/public/task-launcher.css +11 -3
- package/server/public/tasker.css +336 -0
- package/server/public/tasker.js +407 -0
- package/server/views/d.ejs +33 -2
- package/server/views/partials/menu.ejs +1 -1
- package/server/views/partials/workspace_row.ejs +11 -11
- package/server/views/pre.ejs +1 -1
- package/server/views/task_launch.ejs +10 -10
- package/server/views/tasker.ejs +40 -0
- package/server/views/terminal.ejs +15 -6
- package/server/views/terminals.ejs +0 -1
- package/server/views/workspaces.ejs +2 -1
- package/system/plugin/antigravity/pinokio.js +2 -4
- package/system/plugin/claude/pinokio.js +2 -4
- package/system/plugin/claude-auto/pinokio.js +2 -4
- package/system/plugin/claude-desktop/pinokio.js +2 -4
- package/system/plugin/codex/pinokio.js +2 -4
- package/system/plugin/codex-auto/pinokio.js +2 -4
- package/system/plugin/codex-desktop/pinokio.js +2 -4
- package/system/plugin/crush/pinokio.js +2 -4
- package/system/plugin/cursor/pinokio.js +2 -4
- package/system/plugin/gemini/pinokio.js +2 -4
- package/system/plugin/gemini-auto/pinokio.js +2 -4
- package/system/plugin/qwen/pinokio.js +2 -4
- package/system/plugin/vscode/pinokio.js +2 -4
- package/system/plugin/windsurf/pinokio.js +2 -4
- package/test/plugin-sources.test.js +45 -0
- package/server/features/drafts/public/drafts.js +0 -1569
- package/server/features/drafts/routes.js +0 -68
- package/server/features/drafts/service.js +0 -261
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const {
|
|
2
|
-
const
|
|
3
|
-
const
|
|
1
|
+
const { createNoteService } = require("./service")
|
|
2
|
+
const registerNoteRoutes = require("./routes")
|
|
3
|
+
const NoteWatcher = require("./watcher")
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
function createNoteFeature(options = {}) {
|
|
6
6
|
const { app, kernel } = options
|
|
7
7
|
if (!app) {
|
|
8
8
|
throw new Error("app is required")
|
|
@@ -11,18 +11,18 @@ function createDraftFeature(options = {}) {
|
|
|
11
11
|
throw new Error("kernel is required")
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const service =
|
|
14
|
+
const service = createNoteService({
|
|
15
15
|
kernel,
|
|
16
16
|
taskWorkspaceLinks: options.taskWorkspaceLinks
|
|
17
17
|
})
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
registerNoteRoutes(app, {
|
|
20
20
|
...options,
|
|
21
|
-
|
|
21
|
+
notes: service
|
|
22
22
|
})
|
|
23
23
|
|
|
24
24
|
if (kernel.watch && typeof kernel.watch.registerHandler === "function") {
|
|
25
|
-
kernel.watch.registerHandler("
|
|
25
|
+
kernel.watch.registerHandler("note", new NoteWatcher({ notes: service }))
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
return {
|
|
@@ -37,5 +37,5 @@ function createDraftFeature(options = {}) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
module.exports = {
|
|
40
|
-
|
|
40
|
+
createNoteFeature
|
|
41
41
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const fs = require("fs")
|
|
2
2
|
const path = require("path")
|
|
3
3
|
|
|
4
|
-
const RESULT_RELATIVE_DIR = path.join(".pinokio", "
|
|
5
|
-
const
|
|
4
|
+
const RESULT_RELATIVE_DIR = path.join(".pinokio", "notes")
|
|
5
|
+
const NOTE_FILENAME = "note.md"
|
|
6
6
|
const METADATA_FILENAME = "pinokio.json"
|
|
7
7
|
const DEFAULT_READY_FILENAME = METADATA_FILENAME
|
|
8
8
|
const PREVIEW_CHARS = 1200
|
|
@@ -32,17 +32,17 @@ function extractTitle(markdown, workspaceName) {
|
|
|
32
32
|
for (const line of lines) {
|
|
33
33
|
const match = line.match(/^#\s+(.+?)\s*#*\s*$/)
|
|
34
34
|
if (match && match[1]) {
|
|
35
|
-
return normalizeWhitespace(match[1]).slice(0, 140) || "
|
|
35
|
+
return normalizeWhitespace(match[1]).slice(0, 140) || "Note"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
return workspaceName ? `
|
|
38
|
+
return workspaceName ? `Note for ${workspaceName}` : "Note"
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function normalizeTitle(value) {
|
|
42
42
|
return normalizeWhitespace(value).slice(0, 160)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
function
|
|
45
|
+
function parseNoteMetadata(raw) {
|
|
46
46
|
const parsed = JSON.parse(String(raw || ""))
|
|
47
47
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
48
48
|
return {}
|
|
@@ -53,6 +53,11 @@ function parseDraftMetadata(raw) {
|
|
|
53
53
|
} else {
|
|
54
54
|
delete metadata.title
|
|
55
55
|
}
|
|
56
|
+
if (typeof metadata.content === "string") {
|
|
57
|
+
metadata.content = metadata.content.trim().replace(/\\/g, "/")
|
|
58
|
+
} else {
|
|
59
|
+
delete metadata.content
|
|
60
|
+
}
|
|
56
61
|
return metadata
|
|
57
62
|
}
|
|
58
63
|
|
|
@@ -157,7 +162,7 @@ module.exports = {
|
|
|
157
162
|
METADATA_FILENAME,
|
|
158
163
|
DEFAULT_READY_FILENAME,
|
|
159
164
|
RESULT_RELATIVE_DIR,
|
|
160
|
-
|
|
165
|
+
NOTE_FILENAME,
|
|
161
166
|
buildExcerpt,
|
|
162
167
|
collectMarkdownRefs,
|
|
163
168
|
describeMediaRefs,
|
|
@@ -165,5 +170,5 @@ module.exports = {
|
|
|
165
170
|
extractTitleAndBody,
|
|
166
171
|
normalizeMarkdownRef,
|
|
167
172
|
normalizeTitle,
|
|
168
|
-
|
|
173
|
+
parseNoteMetadata
|
|
169
174
|
}
|