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.
Files changed (51) hide show
  1. package/kernel/agent_instructions.js +166 -0
  2. package/kernel/api/index.js +137 -12
  3. package/kernel/bin/huggingface.js +1 -1
  4. package/kernel/environment.js +23 -9
  5. package/kernel/plugin_sources.js +57 -4
  6. package/kernel/prototype.js +4 -0
  7. package/kernel/shell.js +2 -0
  8. package/kernel/watch/index.js +31 -4
  9. package/package.json +1 -1
  10. package/server/features/index.js +4 -4
  11. package/server/features/{drafts → notes}/index.js +9 -9
  12. package/server/features/{drafts → notes}/parser.js +12 -7
  13. package/server/features/notes/public/notes.css +955 -0
  14. package/server/features/notes/public/notes.js +1149 -0
  15. package/server/features/{drafts → notes}/registry_import.js +59 -74
  16. package/server/features/notes/routes.js +156 -0
  17. package/server/features/notes/service.js +326 -0
  18. package/server/features/{drafts → notes}/watcher.js +14 -16
  19. package/server/index.js +61 -30
  20. package/server/lib/content_validation.js +19 -8
  21. package/server/lib/workspace_catalog.js +18 -18
  22. package/server/public/task-launcher.css +11 -3
  23. package/server/public/tasker.css +336 -0
  24. package/server/public/tasker.js +407 -0
  25. package/server/views/d.ejs +33 -2
  26. package/server/views/partials/menu.ejs +1 -1
  27. package/server/views/partials/workspace_row.ejs +11 -11
  28. package/server/views/pre.ejs +1 -1
  29. package/server/views/task_launch.ejs +10 -10
  30. package/server/views/tasker.ejs +40 -0
  31. package/server/views/terminal.ejs +15 -6
  32. package/server/views/terminals.ejs +0 -1
  33. package/server/views/workspaces.ejs +2 -1
  34. package/system/plugin/antigravity/pinokio.js +2 -4
  35. package/system/plugin/claude/pinokio.js +2 -4
  36. package/system/plugin/claude-auto/pinokio.js +2 -4
  37. package/system/plugin/claude-desktop/pinokio.js +2 -4
  38. package/system/plugin/codex/pinokio.js +2 -4
  39. package/system/plugin/codex-auto/pinokio.js +2 -4
  40. package/system/plugin/codex-desktop/pinokio.js +2 -4
  41. package/system/plugin/crush/pinokio.js +2 -4
  42. package/system/plugin/cursor/pinokio.js +2 -4
  43. package/system/plugin/gemini/pinokio.js +2 -4
  44. package/system/plugin/gemini-auto/pinokio.js +2 -4
  45. package/system/plugin/qwen/pinokio.js +2 -4
  46. package/system/plugin/vscode/pinokio.js +2 -4
  47. package/system/plugin/windsurf/pinokio.js +2 -4
  48. package/test/plugin-sources.test.js +45 -0
  49. package/server/features/drafts/public/drafts.js +0 -1569
  50. package/server/features/drafts/routes.js +0 -68
  51. package/server/features/drafts/service.js +0 -261
@@ -1,8 +1,8 @@
1
- const { createDraftService } = require("./service")
2
- const registerDraftRoutes = require("./routes")
3
- const DraftWatcher = require("./watcher")
1
+ const { createNoteService } = require("./service")
2
+ const registerNoteRoutes = require("./routes")
3
+ const NoteWatcher = require("./watcher")
4
4
 
5
- function createDraftFeature(options = {}) {
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 = createDraftService({
14
+ const service = createNoteService({
15
15
  kernel,
16
16
  taskWorkspaceLinks: options.taskWorkspaceLinks
17
17
  })
18
18
 
19
- registerDraftRoutes(app, {
19
+ registerNoteRoutes(app, {
20
20
  ...options,
21
- drafts: service
21
+ notes: service
22
22
  })
23
23
 
24
24
  if (kernel.watch && typeof kernel.watch.registerHandler === "function") {
25
- kernel.watch.registerHandler("draft", new DraftWatcher({ drafts: service }))
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
- createDraftFeature
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", "draft")
5
- const POST_FILENAME = "post.md"
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) || "Draft"
35
+ return normalizeWhitespace(match[1]).slice(0, 140) || "Note"
36
36
  }
37
37
  }
38
- return workspaceName ? `Draft for ${workspaceName}` : "Draft"
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 parseDraftMetadata(raw) {
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
- POST_FILENAME,
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
- parseDraftMetadata
173
+ parseNoteMetadata
169
174
  }