@vincemakes/kiso-code 0.39.2 → 0.40.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/index.d.ts CHANGED
@@ -24,6 +24,7 @@
24
24
  * makeAgent, and main.
25
25
  */
26
26
  import { type ContextPolicy } from "@vincemakes/kiso-runtime";
27
+ import { type SessionRoute } from "./projects.js";
27
28
  export { applyProjectMerges } from "./trust-ui.js";
28
29
  /**
29
30
  * A area: the coding-agent system prompt — ONE constant, byte-stable for the
@@ -38,11 +39,17 @@ export declare const SYSTEM_PROMPT = "You are kiso, a coding agent. You work in
38
39
  * return it as an injected section, or "" when none exists. Truncated at
39
40
  * 8KB with an explicit note. Pure — read once per session, so the prompt
40
41
  * is byte-stable for the session's lifetime.
42
+ *
43
+ * kiso never serves its own credential store to a model, and this read is
44
+ * the one that needs no model at all: a cloned repository whose AGENTS.md
45
+ * is a symlink to the store would put it in the SYSTEM PROMPT of every
46
+ * request, with no tool call and no trust prompt. A file that resolves to
47
+ * a protected one is skipped as though absent.
41
48
  */
42
- export declare function readProjectInstructions(cwd: string): string;
49
+ export declare function readProjectInstructions(cwd: string, protectedFiles?: readonly string[]): string;
43
50
  /** A area: the session's system prompt — the constant plus any project
44
51
  * instructions found in the workspace. Deterministic per cwd. */
45
- export declare function composeSystemPrompt(cwd: string): string;
52
+ export declare function composeSystemPrompt(cwd: string, protectedFiles?: readonly string[]): string;
46
53
  /**
47
54
  * E6: the run-start context policy, OFF unless env-armed (invalid values
48
55
  * are ABSENT, never a crash — the autoCompactFromEnv convention).
@@ -61,3 +68,15 @@ export declare function composeSystemPrompt(cwd: string): string;
61
68
  * arms the session-aware override (MIN_TURNS = the no-fire guard).
62
69
  */
63
70
  export declare function contextPolicyFromEnv(): ContextPolicy | undefined;
71
+ export { workspaceRoot } from "./state.js";
72
+ /**
73
+ * 0.40.0 (the owner's dogfood: a uooki session resumed from flowpix2) —
74
+ * whether a session id may open in this project. Its own folder: yes. A
75
+ * session another project RECORDED: refused, with where to go. One whose
76
+ * project is unknown, or was only inferred, is never refused and never
77
+ * moved (the lead's ruling: a resume changes no placement) — it opens where
78
+ * it is, and the line says the tools work here. A pure read. `null` = not
79
+ * found anywhere (the caller's own rule applies: a new session, or "no
80
+ * such session").
81
+ */
82
+ export declare function routeSession(id: string): SessionRoute | null;