@pmndre/pine 0.22.0 → 0.33.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.
Files changed (99) hide show
  1. package/README.md +2 -1
  2. package/changes.json +265 -0
  3. package/docs/SKILL.md +31 -7
  4. package/docs/references/agents.md +245 -21
  5. package/docs/references/coding.md +1 -1
  6. package/docs/references/computer.md +1 -1
  7. package/docs/references/configuration.md +14 -5
  8. package/docs/references/mcp.md +9 -0
  9. package/docs/references/operations.md +20 -9
  10. package/docs/references/overview.md +3 -1
  11. package/docs/references/security.md +83 -24
  12. package/docs/references/setup.md +55 -9
  13. package/docs/references/source-types.md +1418 -0
  14. package/docs/references/sources.md +333 -19
  15. package/docs/references/stack.md +1 -0
  16. package/docs/references/tui.md +86 -12
  17. package/examples/home/AGENTS.md +4 -0
  18. package/examples/home/TOOLS.md +5 -0
  19. package/examples/home/agents/main/workspace/AGENTS.md +1 -1
  20. package/examples/home/agents/main/workspace/TOOLS.md +5 -0
  21. package/mcp/browser.d.ts +6 -0
  22. package/mcp/browser.js +19 -0
  23. package/mcp/render.d.ts +1 -0
  24. package/mcp/render.js +237 -0
  25. package/package.json +3 -1
  26. package/src/actions.d.ts +6 -1
  27. package/src/actions.js +17 -4
  28. package/src/admin.d.ts +4 -0
  29. package/src/admin.js +25 -6
  30. package/src/agents.d.ts +167 -2
  31. package/src/agents.js +912 -45
  32. package/src/catalogue.d.ts +60 -0
  33. package/src/catalogue.js +791 -0
  34. package/src/cli.js +10 -7
  35. package/src/config.d.ts +53 -4
  36. package/src/config.js +30 -5
  37. package/src/goals.d.ts +1 -1
  38. package/src/goals.js +14 -1
  39. package/src/manual.js +24 -2
  40. package/src/mime.d.ts +78 -0
  41. package/src/mime.js +342 -0
  42. package/src/net.d.ts +11 -0
  43. package/src/net.js +29 -2
  44. package/src/pine.js +10 -1
  45. package/src/router.js +3 -3
  46. package/src/sandbox-linux.d.ts +3 -1
  47. package/src/sandbox-linux.js +5 -0
  48. package/src/security.d.ts +22 -6
  49. package/src/security.js +44 -13
  50. package/src/slots.d.ts +106 -0
  51. package/src/slots.js +250 -0
  52. package/src/source-types.d.ts +20 -0
  53. package/src/sources/calendar.d.ts +24 -0
  54. package/src/sources/calendar.js +265 -0
  55. package/src/sources/command.js +109 -4
  56. package/src/sources/discord.d.ts +4 -0
  57. package/src/sources/discord.js +298 -0
  58. package/src/sources/feed.d.ts +19 -0
  59. package/src/sources/feed.js +257 -0
  60. package/src/sources/http.js +154 -103
  61. package/src/sources/mail.d.ts +51 -0
  62. package/src/sources/mail.js +1013 -0
  63. package/src/sources/matrix.d.ts +4 -0
  64. package/src/sources/matrix.js +232 -0
  65. package/src/sources/modbus.d.ts +15 -0
  66. package/src/sources/modbus.js +240 -0
  67. package/src/sources/onvif.d.ts +35 -0
  68. package/src/sources/onvif.js +326 -0
  69. package/src/sources/presence.d.ts +80 -0
  70. package/src/sources/presence.js +480 -0
  71. package/src/sources/serial.d.ts +21 -0
  72. package/src/sources/serial.js +220 -0
  73. package/src/sources/slack.d.ts +16 -0
  74. package/src/sources/slack.js +1062 -0
  75. package/src/sources/smtp.d.ts +4 -0
  76. package/src/sources/smtp.js +360 -0
  77. package/src/sources/stream.d.ts +68 -0
  78. package/src/sources/stream.js +534 -0
  79. package/src/sources/syslog.d.ts +32 -0
  80. package/src/sources/syslog.js +243 -0
  81. package/src/sources/system.d.ts +14 -0
  82. package/src/sources/system.js +236 -0
  83. package/src/sources/system.swift +102 -0
  84. package/src/sources/telegram.js +34 -1
  85. package/src/sources.d.ts +41 -1
  86. package/src/sources.js +147 -24
  87. package/src/tools.d.ts +1 -1
  88. package/src/tools.js +304 -23
  89. package/src/tui/app.d.ts +35 -2
  90. package/src/tui/app.js +306 -43
  91. package/src/tui/levels.d.ts +68 -0
  92. package/src/tui/levels.js +273 -0
  93. package/src/tui/picture.d.ts +17 -1
  94. package/src/tui/picture.js +72 -5
  95. package/src/types.d.ts +3 -0
  96. package/src/update.d.ts +9 -1
  97. package/src/update.js +75 -3
  98. package/src/watching.d.ts +156 -0
  99. package/src/watching.js +609 -4
@@ -0,0 +1,60 @@
1
+ import { Type } from "typebox";
2
+ export declare const FIND_TOOLS = "find_tools";
3
+ /** Tools that stay declared by themselves: what almost every conversation uses. */
4
+ export declare const DECLARED: string[];
5
+ /** Of pine's bundled MCP servers, those whose tools stay declared by themselves (by the `pine` name of the server). */
6
+ export declare const DECLARED_SERVERS: string[];
7
+ /** What a sub-agent is told when it calls what is not its to do. */
8
+ /** What a sub-agent is told where its owner would be asked: it works by itself, and nobody is asked on its behalf. */
9
+ export declare const SUBAGENT_CANNOT_ASK = "You are a sub-agent: your owner is not asked on your behalf, and this needs their yes. Do not retry and do not look for another way. Say in your answer what you needed and why; the conversation that started you can ask.";
10
+ export declare const NOT_A_SUBAGENTS = "You are a sub-agent: this is not yours to do. Say in your answer what should be done, and the conversation that started you sees to it.";
11
+ interface Tool {
12
+ name: string;
13
+ description: string;
14
+ parameters: any;
15
+ }
16
+ /** Everything about one tool, as text: for a call that got its arguments wrong, and for find_tools. */
17
+ export declare function helpOf(tool: Tool, short: string): string;
18
+ /** One declaration, short. */
19
+ export declare function shortTool(name: string, description: string, parameters: any): {
20
+ description: string;
21
+ parameters: any;
22
+ };
23
+ /**
24
+ * The request as it goes to the model server: every tool's declaration short, and all of them
25
+ * in one order. `asIs` names tools whose declaration is somebody else's to write (the families).
26
+ *
27
+ * The order: pi declares tools in the order they became active, which differs between
28
+ * conversations (one that goes on from its file, one that is new) and with the order MCP
29
+ * servers connected in. The same tools then made a different request, and a model server read
30
+ * all of it again. Here: first what every session on a model has in the same words (the
31
+ * built-in tools, pine's everyday ones, the MCP servers), then what differs with who is asking
32
+ * (a sub-agent has less, the main agent more), the most widely held first.
33
+ */
34
+ export declare function shortDeclarations(payload: any, asIs?: Set<string>): any;
35
+ /** Make arguments that have one reading into what the tool takes. Changes `args` in place and returns it. */
36
+ export declare function ease(name: string, args: any): any;
37
+ /** Arguments made to fit a schema where the difference is one of form: a number as text, one value where a list is taken, a choice in other letters, an object as JSON text, a key in other spelling. */
38
+ export declare function fit(schema: any, args: any): any;
39
+ /**
40
+ * The families of a session: one tool per group, the tool that gives a tool's whole text, and
41
+ * the extension that puts them into the request. `leaf`: the session is a sub-agent, which is
42
+ * declared what its conversation is declared (so that the model server reads on from what it
43
+ * has kept) and is told so when it calls what is not its to do.
44
+ */
45
+ export declare function families(opts: {
46
+ servers: Array<{
47
+ name: string;
48
+ namespace: string;
49
+ kind?: string;
50
+ about?: string;
51
+ }>;
52
+ leaf?: boolean;
53
+ }): {
54
+ tools: ((import("@earendil-works/pi-coding-agent").ToolDefinition<Type.TObject<{}>, unknown, any> & import("@earendil-works/pi-coding-agent").ToolDefinition<any, any, any>) | (import("@earendil-works/pi-coding-agent").ToolDefinition<Type.TObject<{
55
+ names: Type.TUnion<[Type.TString, Type.TArray<Type.TString>]>;
56
+ }>, {}, any> & import("@earendil-works/pi-coding-agent").ToolDefinition<any, any, any>))[];
57
+ extension: (pi: any) => void;
58
+ names: string[];
59
+ };
60
+ export {};