@yaklabs-ai/plugin-sdk 0.15.2 → 0.26.3

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.
@@ -2,7 +2,7 @@
2
2
  import { readFile } from "node:fs/promises";
3
3
  import { parse as parseYaml } from "yaml";
4
4
 
5
- // packages/herd-uri/dist/connection.js
5
+ // packages/herd-uri/dist/claims.js
6
6
  var CONNECTION_SELECTOR_RE = /^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)@([^/]+)(?:\/(.*))?$/;
7
7
  function parseUriConnectionSelector(input) {
8
8
  const match = CONNECTION_SELECTOR_RE.exec(input.trim());
@@ -269,7 +269,7 @@ var PLUGIN_DISCLOSURE_RULES = [
269
269
  "help-throws",
270
270
  "help-uri-malformed",
271
271
  "help-uri-throws",
272
- // (c) the verb-documentation floor (#2863, #2935) — what a permission surface renders
272
+ // (c) the verb-documentation floor (#2863, #2935) - what a permission surface renders
273
273
  "verb-coverage-missing",
274
274
  "template-operation-docs-missing",
275
275
  "verb-docs-missing",
@@ -304,7 +304,7 @@ var PLUGIN_DISCLOSURE_RULES = [
304
304
  // though the function and its prose were renamed (see PR that renamed `auditSkillCodegenPairs` to
305
305
  // free "twin" for the Skills v2 product concept): `test/disclosure/conformance-contract.test.ts`
306
306
  // pins CONTRACT_HISTORY's contract-1 entry byte-for-byte as the published SDK 0.3.0 floor, and
307
- // changing a rule id string is exactly the kind of edit that test exists to catch — it would
307
+ // changing a rule id string is exactly the kind of edit that test exists to catch - it would
308
308
  // require appending a new CONTRACT_HISTORY entry, bumping `PLUGIN_DISCLOSURE_CONTRACT`, and
309
309
  // cutting a new SDK release, none of which this rename earns. A rule id is a wire-visible
310
310
  // string a third-party plugin's own suite may already assert on; renaming the function is free,
@@ -722,6 +722,13 @@ async function auditSkillCodegenPairFile(skill, declaration, packageDir) {
722
722
  return violations;
723
723
  }
724
724
 
725
+ // packages/plugin-sdk/dist/kay-agent/endpoints.js
726
+ function createUnavailableEndpoints(message) {
727
+ return {
728
+ invoke: async () => ({ ok: false, reason: "unavailable", message })
729
+ };
730
+ }
731
+
725
732
  // packages/plugin-sdk/dist/kay-agent/interaction.js
726
733
  function unavailableInteractionSurface(message) {
727
734
  const refused = async () => ({ ok: false, reason: "unavailable", message });
@@ -741,6 +748,30 @@ function unavailableInteractionSurfaces(message) {
741
748
  };
742
749
  }
743
750
 
751
+ // packages/plugin-sdk/dist/log.js
752
+ function createKayPluginLog(write, bound = {}) {
753
+ const at = (level) => (name, message, details) => {
754
+ try {
755
+ write({
756
+ level,
757
+ name,
758
+ message,
759
+ ...details?.error === void 0 ? {} : { error: details.error },
760
+ ...details?.sessionId === void 0 ? {} : { sessionId: details.sessionId },
761
+ attributes: { ...bound, ...details?.attributes }
762
+ });
763
+ } catch {
764
+ }
765
+ };
766
+ return {
767
+ debug: at("debug"),
768
+ info: at("info"),
769
+ warn: at("warn"),
770
+ error: at("error"),
771
+ child: (attributes) => createKayPluginLog(write, { ...bound, ...attributes })
772
+ };
773
+ }
774
+
744
775
  // packages/system-one/dist/errors.js
745
776
  var SystemOneError = class extends Error {
746
777
  cause;
@@ -841,6 +872,7 @@ function createKayAgentProbeCapabilityHandles() {
841
872
  network: INERT_NETWORK,
842
873
  webSession: INERT_WEB_SESSION,
843
874
  process: INERT_PROCESS,
875
+ compiler: { bundleBrowser: inertResult },
844
876
  whiteboard: INERT_WHITEBOARD,
845
877
  // Answers `unavailable` at once: a probe must never reach the user's browser or desktop.
846
878
  interaction: unavailableInteractionSurfaces("Interaction surfaces are not available while a plugin is being probed."),
@@ -851,7 +883,10 @@ function createKayAgentProbeCapabilityHandles() {
851
883
  // Fire-and-forget on the real api too, so dropping is the inert shape: nothing to hang on.
852
884
  events: { publish: () => {
853
885
  } },
854
- // A probe has no user-time port, so it answers the zone as unknown — the same contract the
886
+ // Dropped: a probe's activation is not the plugin running, so its lines are not the plugin's.
887
+ log: createKayPluginLog(() => {
888
+ }),
889
+ // A probe has no user-time port, so it answers the zone as unknown - the same contract the
855
890
  // real capability keeps for a zone the host cannot read.
856
891
  time: {
857
892
  snapshot: () => ({ nowMs: 0, zone: "UTC", zoneSource: "utc-fallback" })
@@ -868,7 +903,11 @@ function createKayAgentProbeCapabilityHandles() {
868
903
  rename: inertResult
869
904
  },
870
905
  // A probe runs outside any session, and must not create a folder on the user's disk.
871
- familyFolder: { path: async () => void 0 }
906
+ familyFolder: { path: async () => void 0 },
907
+ // Inert like the network broker: a probe must never reach an MCP server.
908
+ vendoredMcp: { port: () => ({ invoke: inertResult }) },
909
+ // Answers `unavailable` at once: a probe runs no app part, so no endpoint exists.
910
+ endpoints: createUnavailableEndpoints("Endpoints are not available while a plugin is being probed.")
872
911
  };
873
912
  }
874
913
 
@@ -882,6 +921,8 @@ function collectUriModulesFromKayAgentActivate(activate) {
882
921
  }
883
922
  },
884
923
  ...createKayAgentProbeCapabilityHandles(),
924
+ implementTool: () => {
925
+ },
885
926
  registerTool: () => {
886
927
  },
887
928
  registerSearchProvider: () => {
@@ -891,13 +932,9 @@ function collectUriModulesFromKayAgentActivate(activate) {
891
932
  registerConverter: () => {
892
933
  },
893
934
  auth: {
894
- advertiseService: () => {
895
- },
896
- declareOAuthPkceScheme: () => {
935
+ registerValidator: () => {
897
936
  },
898
- declareApiKeyScheme: () => {
899
- },
900
- declareExternalCliScheme: () => {
937
+ registerAccountResolver: () => {
901
938
  },
902
939
  declareDelegatedScheme: () => {
903
940
  },
@@ -908,58 +945,10 @@ function collectUriModulesFromKayAgentActivate(activate) {
908
945
  activate(fakeApi);
909
946
  return modules;
910
947
  }
911
-
912
- // packages/plugin-sdk/dist/disclosure/probe-kay-agent-auth.js
913
- function collectAuthDeclarationsFromKayAgentActivate(activate) {
914
- const services = [];
915
- const oauthPkceSchemes = [];
916
- const apiKeySchemes = [];
917
- const delegatedSchemes = [];
918
- const fakeApi = {
919
- uri: {
920
- registerModule: () => {
921
- }
922
- },
923
- ...createKayAgentProbeCapabilityHandles(),
924
- registerTool: () => {
925
- },
926
- registerSearchProvider: () => {
927
- },
928
- registerInteractionDriver: () => {
929
- },
930
- registerConverter: () => {
931
- },
932
- auth: {
933
- advertiseService: (descriptor) => {
934
- services.push(descriptor);
935
- },
936
- declareOAuthPkceScheme: (serviceId, scheme) => {
937
- oauthPkceSchemes.push({ serviceId, scheme });
938
- },
939
- declareApiKeyScheme: (serviceId, scheme) => {
940
- apiKeySchemes.push({ serviceId, scheme });
941
- },
942
- declareExternalCliScheme: () => {
943
- },
944
- declareDelegatedScheme: (serviceId, scheme) => {
945
- delegatedSchemes.push({ serviceId, scheme });
946
- },
947
- registerDelegatedServiceSource: (source) => {
948
- for (const { descriptor, scheme } of source()) {
949
- services.push(descriptor);
950
- delegatedSchemes.push({ serviceId: descriptor.id, scheme });
951
- }
952
- }
953
- }
954
- };
955
- activate(fakeApi);
956
- return { services, oauthPkceSchemes, apiKeySchemes, delegatedSchemes };
957
- }
958
948
  export {
959
949
  PLUGIN_DISCLOSURE_CONTRACT,
960
950
  PLUGIN_DISCLOSURE_RULES,
961
951
  auditPluginDisclosure,
962
952
  auditSkillCodegenPairs,
963
- collectAuthDeclarationsFromKayAgentActivate,
964
953
  collectUriModulesFromKayAgentActivate
965
954
  };