@compilr-dev/sdk 0.2.8 → 0.2.10

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/agent.js CHANGED
@@ -121,6 +121,7 @@ class CompilrAgentImpl {
121
121
  contextManager,
122
122
  autoContextManagement: contextManager !== undefined,
123
123
  hooks: config?.hooks,
124
+ pins: {},
124
125
  permissions: {
125
126
  defaultLevel: permissionsConfig.defaultLevel,
126
127
  onPermissionRequest: permissionsConfig.onPermissionRequest,
@@ -201,10 +202,14 @@ class CompilrAgentImpl {
201
202
  this.agent.registerTool(tool);
202
203
  return this;
203
204
  }
204
- addAnchor(input) {
205
- this.agent.addAnchor(input);
205
+ addPin(input) {
206
+ this.agent.addPin(input);
206
207
  return this;
207
208
  }
209
+ /** @deprecated Use addPin() instead */
210
+ addAnchor(input) {
211
+ return this.addPin(input);
212
+ }
208
213
  getHistory() {
209
214
  return this.agent.getHistory();
210
215
  }
package/dist/config.d.ts CHANGED
@@ -158,7 +158,9 @@ export interface CompilrAgent {
158
158
  chat(message: string, options?: RunOptions): Promise<RunResult>;
159
159
  /** Add a tool at runtime */
160
160
  addTool(tool: Tool): this;
161
- /** Add an anchor (critical info that survives compaction) */
161
+ /** Add a pin (critical info that survives compaction) */
162
+ addPin(input: AnchorInput): this;
163
+ /** @deprecated Use addPin() instead */
162
164
  addAnchor(input: AnchorInput): this;
163
165
  /** Get conversation history */
164
166
  getHistory(): Message[];
@@ -201,10 +201,10 @@ export class TeamAgent {
201
201
  this._agent = await agentFactory(this.agentConfig, finalSystemPromptAddition || undefined, this.useMinimalSystemPrompt, this.noTools, this.toolFilter, // Pass tool filter to factory
202
202
  this._modelTier // Pass model tier to factory
203
203
  );
204
- // Set the team roster as an anchor (dynamically re-injected on every LLM call).
204
+ // Set the team roster as a pin (dynamically re-injected on every LLM call).
205
205
  // This ensures roster updates (agent added/removed) are always visible.
206
- if (sharedContext && sharedContext.hasTeamRoster() && this._agent.hasAnchors()) {
207
- this._agent.addAnchor({
206
+ if (sharedContext && sharedContext.hasTeamRoster() && this._agent.hasPins()) {
207
+ this._agent.addPin({
208
208
  id: 'team-roster',
209
209
  content: sharedContext.formatTeamRoster(),
210
210
  priority: 'info',
package/dist/team/team.js CHANGED
@@ -568,14 +568,14 @@ export class AgentTeam {
568
568
  updateTeamRoster() {
569
569
  const roster = this.buildTeamRoster();
570
570
  this._sharedContext.updateTeamRoster(roster);
571
- // Push updated roster to all initialized agents via anchors.
572
- // Anchors are re-injected on every LLM call, so agents always see the latest roster.
571
+ // Push updated roster to all initialized agents via pins.
572
+ // Pins are re-injected on every LLM call, so agents always see the latest roster.
573
573
  if (this._sharedContext.hasTeamRoster()) {
574
574
  const rosterContent = this._sharedContext.formatTeamRoster();
575
575
  for (const [, teamAgent] of this.agents) {
576
576
  const agent = teamAgent.agent;
577
- if (agent && agent.hasAnchors()) {
578
- agent.addAnchor({
577
+ if (agent && agent.hasPins()) {
578
+ agent.addPin({
579
579
  id: 'team-roster',
580
580
  content: rosterContent,
581
581
  priority: 'info',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@anthropic-ai/sdk": "^0.78.0",
70
- "@compilr-dev/agents": "^0.3.25",
70
+ "@compilr-dev/agents": "^0.3.26",
71
71
  "@compilr-dev/agents-coding": "^1.0.2",
72
72
  "@eslint/js": "^9.39.1",
73
73
  "@opentelemetry/api": "^1.9.0",